From a8142d40ddda23b0f183ea0e760ddbff2319b1ac Mon Sep 17 00:00:00 2001 From: Shane Tomlinson Date: Tue, 13 Jun 2017 14:19:47 +0100 Subject: [PATCH] feat(test): Add functional tests to ensure fxaccounts:loaded is sent. --- tests/functional/mob_android_v1.js | 3 +++ tests/functional/mob_ios_v1.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/functional/mob_android_v1.js b/tests/functional/mob_android_v1.js index 73ffc05b8a..986c0e370a 100644 --- a/tests/functional/mob_android_v1.js +++ b/tests/functional/mob_android_v1.js @@ -24,6 +24,7 @@ define([ const COMMAND_CAN_LINK_ACCOUNT = 'fxaccounts:can_link_account'; const COMMAND_EMAIL_VERIFIED = 'fxaccounts:email_verified'; + const COMMAND_LOADED = 'fxaccounts:loaded'; const COMMAND_LOGIN = 'fxaccounts:login'; let email; @@ -61,6 +62,7 @@ define([ } })) .then(noSuchElement(selectors.SIGNUP.CUSTOMIZE_SYNC_CHECKBOX)) + .then(testIsBrowserNotified(COMMAND_LOADED)) .then(fillOutSignUp(email, PASSWORD)) .then(testElementExists(selectors.CONFIRM_SIGNUP.HEADER)) @@ -83,6 +85,7 @@ define([ [COMMAND_CAN_LINK_ACCOUNT]: { ok: true } } })) + .then(testIsBrowserNotified(COMMAND_LOADED)) .then(fillOutSignIn(email, PASSWORD)) .then(testElementExists(selectors.CONFIRM_SIGNIN.HEADER)) diff --git a/tests/functional/mob_ios_v1.js b/tests/functional/mob_ios_v1.js index 364ea4f0d3..f7ca5a9f9f 100644 --- a/tests/functional/mob_ios_v1.js +++ b/tests/functional/mob_ios_v1.js @@ -24,6 +24,7 @@ define([ const COMMAND_CAN_LINK_ACCOUNT = 'fxaccounts:can_link_account'; const COMMAND_EMAIL_VERIFIED = 'fxaccounts:email_verified'; + const COMMAND_LOADED = 'fxaccounts:loaded'; const COMMAND_LOGIN = 'fxaccounts:login'; let email; @@ -61,6 +62,7 @@ define([ } })) .then(noSuchElement(selectors.SIGNUP.CUSTOMIZE_SYNC_CHECKBOX)) + .then(testIsBrowserNotified(COMMAND_LOADED)) .then(fillOutSignUp(email, PASSWORD)) .then(testElementExists(selectors.CONFIRM_SIGNUP.HEADER)) @@ -83,6 +85,7 @@ define([ [COMMAND_CAN_LINK_ACCOUNT]: { ok: true } } })) + .then(testIsBrowserNotified(COMMAND_LOADED)) .then(fillOutSignIn(email, PASSWORD)) .then(testElementExists(selectors.CONFIRM_SIGNIN.HEADER))