This repository was archived by the owner on Apr 3, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-9
lines changed
Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -615,8 +615,17 @@ define([
615615 } ;
616616 }
617617
618- function openSignUpInNewTab ( context , windowName ) {
619- return getRemote ( context ) . execute ( openWindow , [ SIGNUP_URL , windowName ] ) ;
618+ /**
619+ * Open the signup page in a new tab.
620+ *
621+ * @param {string } windowName name of tab
622+ * @returns {promise } resolves when complete
623+ */
624+ function openSignUpInNewTab ( windowName ) {
625+ return function ( ) {
626+ return this . parent
627+ . execute ( openWindow , [ SIGNUP_URL , windowName ] ) ;
628+ } ;
620629 }
621630
622631 /**
Original file line number Diff line number Diff line change @@ -14,16 +14,14 @@ define([
1414 var PASSWORD = 'password' ;
1515 var email ;
1616
17- var thenify = FunctionalHelpers . thenify ;
18-
1917 var clearBrowserState = FunctionalHelpers . clearBrowserState ;
2018 var click = FunctionalHelpers . click ;
2119 var closeCurrentWindow = FunctionalHelpers . closeCurrentWindow ;
2220 var createUser = FunctionalHelpers . createUser ;
2321 var fillOutSignIn = FunctionalHelpers . fillOutSignIn ;
2422 var openPage = FunctionalHelpers . openPage ;
2523 var openSignInInNewTab = FunctionalHelpers . openSignInInNewTab ;
26- var openSignUpInNewTab = thenify ( FunctionalHelpers . openSignUpInNewTab ) ;
24+ var openSignUpInNewTab = FunctionalHelpers . openSignUpInNewTab ;
2725 var testAttributeMatches = FunctionalHelpers . testAttributeMatches ;
2826 var testErrorTextInclude = FunctionalHelpers . testErrorTextInclude ;
2927 var testElementExists = FunctionalHelpers . testElementExists ;
@@ -166,7 +164,7 @@ define([
166164 var windowName = 'sign-in inter-tab functional test' ;
167165 return this . remote
168166 . then ( createUser ( email , PASSWORD , { preVerified : true } ) )
169- . then ( openSignUpInNewTab ( this , windowName ) )
167+ . then ( openSignUpInNewTab ( windowName ) )
170168 . switchToWindow ( windowName )
171169
172170 . then ( testElementExists ( '#fxa-signup-header' ) )
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ define([
2727 var fillOutSignUp = FunctionalHelpers . fillOutSignUp ;
2828 var noPageTransition = FunctionalHelpers . noPageTransition ;
2929 var openPage = FunctionalHelpers . openPage ;
30+ var openSignUpInNewTab = FunctionalHelpers . openSignUpInNewTab ;
3031 var openVerificationLinkDifferentBrowser = thenify ( FunctionalHelpers . openVerificationLinkDifferentBrowser ) ;
3132 var openVerificationLinkInNewTab = FunctionalHelpers . openVerificationLinkInNewTab ;
3233 var openVerificationLinkInSameTab = FunctionalHelpers . openVerificationLinkInSameTab ;
@@ -390,9 +391,7 @@ define([
390391 return this . remote
391392 . then ( fillOutSignUp ( email , PASSWORD ) )
392393 . then ( testAtConfirmScreen ( email ) )
393- . then ( function ( ) {
394- return FunctionalHelpers . openSignUpInNewTab ( this . parent , windowName ) ;
395- } )
394+ . then ( openSignUpInNewTab ( windowName ) )
396395 . switchToWindow ( windowName )
397396
398397 . then ( testElementExists ( '#fxa-signup-header' ) )
You can’t perform that action at this time.
0 commit comments