Skip to content

Commit

Permalink
Fix E2E tests that failed due to Big Sky button labels changing
Browse files Browse the repository at this point in the history
  • Loading branch information
p-jackson committed Jan 31, 2025
1 parent c03a992 commit 44255a5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/calypso-e2e/src/lib/flows/start-site-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ const selectors = {
selectedGoalButton: ( goal: string ) =>
`.select-card-checkbox__container:has(:checked):has-text("${ goal }")`,

// Design choices
designChoiceButton: ( choice: string ) => `button.design-choice:has-text("${ choice }")`,

// Step containers
contentAgnosticContainer: '.step-container',
themePickerContainer: '.design-picker',
Expand Down Expand Up @@ -110,9 +107,9 @@ export class StartSiteFlow {
*/
async clickDesignChoice( choice: 'theme' | 'ai' ): Promise< void > {
// It's best to select the element using accessible text
const choiceLabel = choice === 'theme' ? 'Choose a theme' : 'Design with AI';
const choiceLabel = choice === 'theme' ? 'Start with a theme' : 'Create with AI (BETA)';

await this.page.click( selectors.designChoiceButton( choiceLabel ) );
await this.page.getByRole( 'button', { name: choiceLabel } ).click();
}

/**
Expand Down

0 comments on commit 44255a5

Please sign in to comment.