Skip to content

Commit

Permalink
Removed strictly typed checkbox labels (#97204)
Browse files Browse the repository at this point in the history
* Removed strictly typed checkbox labels

There are many more checkbox labels now

* Fix Write and Sell e2e tests

These goals now have new names
  • Loading branch information
p-jackson authored Dec 8, 2024
1 parent 3e0923d commit 640bfe8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions packages/calypso-e2e/src/lib/flows/start-site-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { Page } from 'playwright';
* @see client/landing/stepper/declarative-flow/site-setup-flow.ts for all step names
*/
export type StepName = 'goals' | 'vertical' | 'intent' | 'designSetup' | 'options';
type Goals = 'Write' | 'Promote' | 'Import Site' | 'Sell' | 'DIFM' | 'Other';
type WriteActions = 'Start writing' | 'Start learning' | 'View designs';

const selectors = {
Expand Down Expand Up @@ -86,7 +85,7 @@ export class StartSiteFlow {
*
* @param {string} goal The goal to select
*/
async selectGoal( goal: Goals ): Promise< void > {
async selectGoal( goal: string ): Promise< void > {
await this.page.click( selectors.goalButton( goal ) );
await this.page.waitForSelector( selectors.selectedGoalButton( goal ) );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ describe( 'Lifecyle: Signup, onboard, launch and cancel subscription', function
page.waitForURL( /setup\/site-setup\/goals\?/, { timeout: 30 * 1000 } );
} );

it( 'Select "Sell" goal', async function () {
await startSiteFlow.selectGoal( 'Sell' );
await startSiteFlow.clickButton( 'Continue' );
it( 'Select "Sell services or digital goods" goal', async function () {
await startSiteFlow.selectGoal( 'Sell services or digital goods' );
await startSiteFlow.clickButton( 'Next' );
} );
} );

Expand Down
6 changes: 3 additions & 3 deletions test/e2e/specs/onboarding/onboarding__write.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ describe( DataHelper.createSuiteTitle( 'Onboarding: Write Focus' ), function ()
expect( page.url() ).toContain( selectedFreeDomain );
} );

it( 'Select "Write" goal', async function () {
await startSiteFlow.selectGoal( 'Write' );
await startSiteFlow.clickButton( 'Continue' );
it( 'Select "Publish a blog" goal', async function () {
await startSiteFlow.selectGoal( 'Publish a blog' );
await startSiteFlow.clickButton( 'Next' );
} );

it( 'Select theme', async function () {
Expand Down

0 comments on commit 640bfe8

Please sign in to comment.