Skip to content

Commit

Permalink
Merge pull request #3374 from chenba/3364-support-form-functional-tests
Browse files Browse the repository at this point in the history
fix(tests): update a support form functional test
  • Loading branch information
chenba committed Nov 15, 2019
2 parents b80c0c8 + 2eaf78d commit 7c08e5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Expand Up @@ -257,6 +257,7 @@ module.exports = {
PROFILE_HEADER: '#fxa-settings-profile-header .card-header',
PROFILE_SUB_HEADER: '#fxa-settings-profile-header .card-subheader',
SIGNOUT: '#signout',
SUB_PANELS: '#sub-panels',
SUCCESS: '.settings-success',
},
SETTINGS_AVATAR: {
Expand Down
13 changes: 3 additions & 10 deletions packages/fxa-content-server/tests/functional/support.js
Expand Up @@ -5,7 +5,6 @@
'use strict';

const { registerSuite } = intern.getInterface('object');
const { assert } = require('chai');
const TestHelpers = require('../lib/helpers');
const FunctionalHelpers = require('./lib/helpers');
const selectors = require('./lib/selectors');
Expand All @@ -20,9 +19,9 @@ const {
click,
createUser,
fillOutEmailFirstSignIn,
getQueryParamValue,
openPage,
subscribeToTestProduct,
testUrlPathnameEquals,
testElementExists,
type,
} = FunctionalHelpers;
Expand All @@ -47,14 +46,8 @@ registerSuite('support form without active subscriptions', {
.then(openPage(ENTER_EMAIL_URL, selectors.ENTER_EMAIL.HEADER))
.then(fillOutEmailFirstSignIn(email, PASSWORD))
.then(testElementExists(selectors.SETTINGS.HEADER))
.then(openPage(SUPPORT_URL, '.subscription-management'))
.then(getQueryParamValue('device_id'))
.then(deviceId => assert.ok(deviceId))
.then(getQueryParamValue('flow_begin_time'))
.then(flowBeginTime => assert.ok(flowBeginTime))
.then(getQueryParamValue('flow_id'))
.then(flowId => assert.ok(flowId))
.then(testElementExists(selectors.SETTINGS.HEADER));
.then(openPage(SUPPORT_URL, selectors.SETTINGS.SUB_PANELS))
.then(testUrlPathnameEquals('/settings'));
},
},
});
Expand Down

0 comments on commit 7c08e5a

Please sign in to comment.