diff --git a/src/constants/test-ids.constants.ts b/src/constants/test-ids.constants.ts index 23e1df7..09d4118 100644 --- a/src/constants/test-ids.constants.ts +++ b/src/constants/test-ids.constants.ts @@ -13,6 +13,9 @@ export const testIds = { actions: 'btn-open-actions' }, createSatellite: { + continueToMetadata: 'btn-continue-metadata', + continueToOptions: 'btn-continue-options', + continueToReview: 'btn-continue-review', create: 'btn-create-satellite', input: 'input-satellite-name', website: 'input-radio-satellite-website', diff --git a/src/page-objects/console.page.ts b/src/page-objects/console.page.ts index 2cb8fbd..1d419f8 100644 --- a/src/page-objects/console.page.ts +++ b/src/page-objects/console.page.ts @@ -66,15 +66,31 @@ export class ConsolePage extends BrowserPage { } private async createSatelliteWizard({kind}: {kind: 'website' | 'application'}): Promise { - await expect(this.page.getByTestId(testIds.createSatellite.create)).toBeVisible({ - timeout: 15000 - }); + // Initial step + await expect(this.page.getByTestId(testIds.createSatellite.continueToMetadata)).toBeVisible( + TIMEOUT_SHORT + ); + + await this.page.getByTestId(testIds.createSatellite.continueToMetadata).click(); + + // Metadata step + await expect(this.page.getByTestId(testIds.createSatellite.continueToOptions)).toBeVisible(); await this.page.getByTestId(testIds.createSatellite.input).fill('Test'); + await this.page.getByTestId(testIds.createSatellite.continueToOptions).click(); + + // Options step + await expect(this.page.getByTestId(testIds.createSatellite.continueToReview)).toBeVisible(); + await this.page.getByTestId(testIds.createSatellite[kind]).click(); + await this.page.getByTestId(testIds.createSatellite.continueToReview).click(); + + // Review step + await expect(this.page.getByTestId(testIds.createSatellite.create)).toBeVisible(); await this.page.getByTestId(testIds.createSatellite.create).click(); + // Done await expect(this.page.getByTestId(testIds.createSatellite.continue)).toBeVisible( TIMEOUT_AVERAGE );