diff --git a/tests/functional/oauth_preverified_sign_up.js b/tests/functional/oauth_preverified_sign_up.js index b1eb5a4b10..73db5c68dc 100644 --- a/tests/functional/oauth_preverified_sign_up.js +++ b/tests/functional/oauth_preverified_sign_up.js @@ -49,46 +49,43 @@ define([ 'preverified sign up': function () { var self = this; - return TestHelpers.getEmailPreverifyToken(email) - .then(function (token) { - var SIGNUP_URL = OAUTH_APP + 'api/preverified-signup?' + - 'email=' + encodeURIComponent(email); - - return self.get('remote') - .get(require.toUrl(SIGNUP_URL)) - .setFindTimeout(intern.config.pageLoadTimeout) - - .findByCssSelector('#fxa-signup-header') - .end() - - .findByCssSelector('form input.password') - .click() - .type(PASSWORD) - .end() - - .findByCssSelector('#fxa-age-year') - .click() - .end() - - .findById('fxa-' + (TOO_YOUNG_YEAR - 1)) - .pressMouseButton() - .releaseMouseButton() - .click() - .end() - - .findByCssSelector('button[type="submit"]') - .click() - .end() - - // user is pre-verified and sent directly to the RP. - .findByCssSelector('#loggedin') - .getVisibleText() - .then(function (text) { - // user is signed in as pre-verified email - assert.equal(text, email); - }) - .end(); - }); + var SIGNUP_URL = OAUTH_APP + 'api/preverified-signup?' + + 'email=' + encodeURIComponent(email); + + return self.get('remote') + .get(require.toUrl(SIGNUP_URL)) + .setFindTimeout(intern.config.pageLoadTimeout) + + .findByCssSelector('#fxa-signup-header') + .end() + + .findByCssSelector('form input.password') + .click() + .type(PASSWORD) + .end() + + .findByCssSelector('#fxa-age-year') + .click() + .end() + + .findById('fxa-' + (TOO_YOUNG_YEAR - 1)) + .pressMouseButton() + .releaseMouseButton() + .click() + .end() + + .findByCssSelector('button[type="submit"]') + .click() + .end() + + // user is pre-verified and sent directly to the RP. + .findByCssSelector('#loggedin') + .getVisibleText() + .then(function (text) { + // user is signed in as pre-verified email + assert.equal(text, email); + }) + .end(); } }); diff --git a/tests/functional_oauth.js b/tests/functional_oauth.js index 2c89389069..7485eec50c 100644 --- a/tests/functional_oauth.js +++ b/tests/functional_oauth.js @@ -6,10 +6,8 @@ define([ './functional/oauth_sign_in', './functional/oauth_sign_up', './functional/oauth_reset_password', - './functional/oauth_webchannel'/*, - TODO - enable this whenever 123done and the oauth-server are patched to handle - preverified emails. - './functional/oauth_preverified_sign_up'*/ + './functional/oauth_webchannel', + './functional/oauth_preverified_sign_up' ], function () { 'use strict'; });