Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Use about page instead of design type in signup tests #851

Merged
merged 4 commits into from Dec 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/default.json
Expand Up @@ -73,7 +73,7 @@
[ "skipThemesSelectionModal_20170830", "show" ],
[ "gsuiteUpsell_20171025", "hide" ],
[ "domainsCheckoutLocalizedAddresses_20171025", "showDefaultAddressFormat" ],
[ "signupSiteSegmentStep_20170329", "control" ],
[ "signupSiteSegmentStep_20170329", "variant" ],
[ "checklistThankYouForFreeUser_20171204", "hide" ],
[ "checklistThankYouForPaidUser_20171204", "hide" ]
]
Expand Down
14 changes: 14 additions & 0 deletions lib/pages/signup/about-page.js
@@ -0,0 +1,14 @@
import { By } from 'selenium-webdriver';
import * as driverHelper from '../../driver-helper.js';

import BaseContainer from '../../base-container.js';

export default class AboutPage extends BaseContainer {
constructor( driver ) {
super( driver, By.css( '.about__wrapper' ) );
}

submitForm() {
return driverHelper.clickWhenClickable( this.driver, By.css( '.about__submit-wrapper button.is-primary' ), this.explicitWaitMS );
}
}
18 changes: 0 additions & 18 deletions lib/pages/signup/design-type-choice-page.js

This file was deleted.

88 changes: 43 additions & 45 deletions specs/wp-signup-spec.js
Expand Up @@ -9,7 +9,7 @@ import * as driverHelper from '../lib/driver-helper.js';
import WPHomePage from '../lib/pages/wp-home-page.js';
import ChooseAThemePage from '../lib/pages/signup/choose-a-theme-page.js';
import StartPage from '../lib/pages/signup/start-page.js';
import DesignTypeChoicePage from '../lib/pages/signup/design-type-choice-page.js';
import AboutPage from '../lib/pages/signup/about-page.js';
import DomainFirstPage from '../lib/pages/signup/domain-first-page';
import PickAPlanPage from '../lib/pages/signup/pick-a-plan-page.js';
import CreateYourAccountPage from '../lib/pages/signup/create-your-account-page.js';
Expand Down Expand Up @@ -77,19 +77,19 @@ testDescribe( `[${host}] Sign Up (${screenSize}, ${locale})`, function() {
return driverManager.ensureNotLoggedIn( driver );
} );

test.describe( `Step ${stepNum}: Design Type Choice`, function() {
test.describe( `Step ${stepNum}: About Page`, function() {
stepNum++;

test.it( 'Can see the design type choice page', function() {
test.it( 'Can see the about page', function() {
this.startPage = new StartPage( driver, { visit: true, culture: locale } );
this.designTypeChoicePage = new DesignTypeChoicePage( driver );
return this.designTypeChoicePage.displayed().then( ( displayed ) => {
return assert.equal( displayed, true, 'The design type choice page is not displayed' );
this.aboutPage = new AboutPage( driver );
return this.aboutPage.displayed().then( ( displayed ) => {
return assert.equal( displayed, true, 'The about page is not displayed' );
} );
} );

test.it( 'Can select the first design type', function() {
this.designTypeChoicePage.selectFirstDesignType();
test.it( 'Can accept defaults for about page', function() {
this.aboutPage.submitForm();
} );

test.describe( `Step ${stepNum}: Domains`, function() {
Expand Down Expand Up @@ -264,19 +264,19 @@ testDescribe( `[${host}] Sign Up (${screenSize}, ${locale})`, function() {
return this.WPHomePage.setSandboxModeForPayments( sandboxCookieValue );
} );

test.describe( `Step ${stepNum}: Design Type Choice`, function() {
test.describe( `Step ${stepNum}: About Page`, function() {
stepNum++;

test.it( 'Can see the design type choice page', function() {
test.it( 'Can see the about page', function() {
this.startPage = new StartPage( driver, { visit: true, culture: locale } );
this.designTypeChoicePage = new DesignTypeChoicePage( driver );
return this.designTypeChoicePage.displayed().then( ( displayed ) => {
return assert.equal( displayed, true, 'The design type choice page is not displayed' );
this.aboutPage = new AboutPage( driver );
return this.aboutPage.displayed().then( ( displayed ) => {
return assert.equal( displayed, true, 'The about page is not displayed' );
} );
} );

test.it( 'Can select the first design type', function() {
return this.designTypeChoicePage.selectFirstDesignType();
test.it( 'Can accept defaults for about page', function() {
this.aboutPage.submitForm();
} );

test.describe( `Step ${stepNum}: Domains`, function() {
Expand Down Expand Up @@ -410,19 +410,19 @@ testDescribe( `[${host}] Sign Up (${screenSize}, ${locale})`, function() {
return this.WPHomePage.setSandboxModeForPayments( sandboxCookieValue );
} );

test.describe( `Step ${stepNum}: Design Type Choice`, function() {
test.describe( `Step ${stepNum}: About Page`, function() {
stepNum++;

test.it( 'Can see the design type choice page', function() {
test.it( 'Can see the about page', function() {
this.startPage = new StartPage( driver, { visit: true, culture: locale, flow: 'premium' } );
this.designTypeChoicePage = new DesignTypeChoicePage( driver );
return this.designTypeChoicePage.displayed().then( ( displayed ) => {
return assert.equal( displayed, true, 'The design type choice page is not displayed' );
this.aboutPage = new AboutPage( driver );
return this.aboutPage.displayed().then( ( displayed ) => {
return assert.equal( displayed, true, 'The about page is not displayed' );
} );
} );

test.it( 'Can select the first design type', function() {
return this.designTypeChoicePage.selectFirstDesignType();
test.it( 'Can accept defaults for about page', function() {
this.aboutPage.submitForm();
} );

test.describe( `Step ${stepNum}: Themes`, function() {
Expand Down Expand Up @@ -720,20 +720,19 @@ testDescribe( `[${host}] Sign Up (${screenSize}, ${locale})`, function() {
this.WPHomePage.setSandboxModeForPayments( sandboxCookieValue );
} );

test.describe( `Step ${stepNum}: Design Type Choice`, function() {
test.describe( `Step ${stepNum}: About Page`, function() {
stepNum++;

test.it( 'Can see the design type choice page', function() {
test.it( 'Can see the about page', function() {
this.startPage = new StartPage( driver, { visit: true, culture: locale, flow: 'business' } );

this.designTypeChoicePage = new DesignTypeChoicePage( driver );
return this.designTypeChoicePage.displayed().then( ( displayed ) => {
return assert.equal( displayed, true, 'The design type choice page is not displayed' );
this.aboutPage = new AboutPage( driver );
return this.aboutPage.displayed().then( ( displayed ) => {
return assert.equal( displayed, true, 'The about page is not displayed' );
} );
} );

test.it( 'Can select the first design type', function() {
this.designTypeChoicePage.selectFirstDesignType();
test.it( 'Can accept defaults for about page', function() {
this.aboutPage.submitForm();
} );

test.describe( `Step ${stepNum}: Themes`, function() {
Expand Down Expand Up @@ -929,20 +928,19 @@ testDescribe( `[${host}] Sign Up (${screenSize}, ${locale})`, function() {
this.WPHomePage.setSandboxModeForPayments( sandboxCookieValue );
} );

test.describe( `Step ${stepNum}: Design Type Choice`, function() {
test.describe( `Step ${stepNum}: About Page`, function() {
stepNum++;

test.it( 'Can see the design type choice page', function() {
test.it( 'Can see the about page', function() {
this.startPage = new StartPage( driver, { visit: true, culture: locale } );

this.designTypeChoicePage = new DesignTypeChoicePage( driver );
return this.designTypeChoicePage.displayed().then( ( displayed ) => {
return assert.equal( displayed, true, 'The design type choice page is not displayed' );
this.aboutPage = new AboutPage( driver );
return this.aboutPage.displayed().then( ( displayed ) => {
return assert.equal( displayed, true, 'The about page is not displayed' );
} );
} );

test.it( 'Can select the first design type', function() {
this.designTypeChoicePage.selectFirstDesignType();
test.it( 'Can accept defaults for about page', function() {
this.aboutPage.submitForm();
} );

test.describe( `Step ${stepNum}: Domains`, function() {
Expand Down Expand Up @@ -1060,19 +1058,19 @@ testDescribe( `[${host}] Sign Up (${screenSize}, ${locale})`, function() {
return driverManager.ensureNotLoggedIn( driver );
} );

test.describe( `Step ${stepNum}: Design Type Choice`, function() {
test.describe( `Step ${stepNum}: About Page`, function() {
stepNum++;

test.it( 'Can see the design type choice page', function() {
test.it( 'Can see the about page', function() {
this.startPage = new StartPage( driver, { visit: true, culture: locale } );
this.designTypeChoicePage = new DesignTypeChoicePage( driver );
return this.designTypeChoicePage.displayed().then( ( displayed ) => {
return assert.equal( displayed, true, 'The design type choice page is not displayed' );
this.aboutPage = new AboutPage( driver );
return this.aboutPage.displayed().then( ( displayed ) => {
return assert.equal( displayed, true, 'The about page is not displayed' );
} );
} );

test.it( 'Can select the first design type', function() {
this.designTypeChoicePage.selectFirstDesignType();
test.it( 'Can accept defaults for about page', function() {
this.aboutPage.submitForm();
} );

test.describe( `Step ${stepNum}: Domains`, function() {
Expand Down