2012-10-11 20:44:33 +04:00
|
|
|
/* Any copyright is dedicated to the Public Domain.
|
|
|
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
|
2013-04-09 19:48:36 +04:00
|
|
|
MARIONETTE_TIMEOUT = 60000;
|
2014-06-25 07:57:21 +04:00
|
|
|
MARIONETTE_HEAD_JS = 'head.js';
|
2012-10-11 20:44:33 +04:00
|
|
|
|
2013-03-07 20:12:56 +04:00
|
|
|
const REMOTE = "5559997777"; // the remote number
|
|
|
|
const EMULATOR = "15555215554"; // the emulator's number
|
2013-01-23 13:40:48 +04:00
|
|
|
|
2014-06-25 07:57:21 +04:00
|
|
|
const IN_TEXT = "Incoming SMS message. Mozilla Firefox OS!";
|
|
|
|
const OUT_TEXT = "Outgoing SMS message. Mozilla Firefox OS!";
|
2012-10-11 20:44:33 +04:00
|
|
|
|
2014-06-25 07:57:21 +04:00
|
|
|
startTestBase(function testCaseMain() {
|
|
|
|
let incomingSms, outgoingSms;
|
2012-10-11 20:44:33 +04:00
|
|
|
|
2014-06-25 07:57:21 +04:00
|
|
|
return ensureMobileMessage()
|
2012-10-11 20:44:33 +04:00
|
|
|
|
2014-06-25 07:57:21 +04:00
|
|
|
.then(() => sendTextSmsToEmulatorAndWait(REMOTE, IN_TEXT))
|
|
|
|
.then((aMessage) => { incomingSms = aMessage; })
|
2012-10-11 20:44:33 +04:00
|
|
|
|
2014-06-25 07:57:21 +04:00
|
|
|
.then(() => sendSmsWithSuccess(REMOTE, OUT_TEXT))
|
|
|
|
.then((aMessage) => { outgoingSms = aMessage; })
|
2012-10-11 20:44:33 +04:00
|
|
|
|
2014-06-25 07:57:21 +04:00
|
|
|
.then(() => getMessage(incomingSms.id))
|
|
|
|
.then((aMessage) => compareSmsMessage(aMessage, incomingSms))
|
2013-06-19 06:18:39 +04:00
|
|
|
|
2014-06-25 07:57:21 +04:00
|
|
|
.then(() => getMessage(outgoingSms.id))
|
|
|
|
.then((aMessage) => compareSmsMessage(aMessage, outgoingSms))
|
2012-10-11 20:44:33 +04:00
|
|
|
|
2014-06-25 07:57:21 +04:00
|
|
|
.then(deleteAllMessages);
|
|
|
|
});
|