Skip to content

Commit a44b006

Browse files
feat: support for steps in create satellite witard (#8)
1 parent f623492 commit a44b006

2 files changed

Lines changed: 22 additions & 3 deletions

File tree

src/constants/test-ids.constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ export const testIds = {
1313
actions: 'btn-open-actions'
1414
},
1515
createSatellite: {
16+
continueToMetadata: 'btn-continue-metadata',
17+
continueToOptions: 'btn-continue-options',
18+
continueToReview: 'btn-continue-review',
1619
create: 'btn-create-satellite',
1720
input: 'input-satellite-name',
1821
website: 'input-radio-satellite-website',

src/page-objects/console.page.ts

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,31 @@ export class ConsolePage extends BrowserPage {
6666
}
6767

6868
private async createSatelliteWizard({kind}: {kind: 'website' | 'application'}): Promise<void> {
69-
await expect(this.page.getByTestId(testIds.createSatellite.create)).toBeVisible({
70-
timeout: 15000
71-
});
69+
// Initial step
70+
await expect(this.page.getByTestId(testIds.createSatellite.continueToMetadata)).toBeVisible(
71+
TIMEOUT_SHORT
72+
);
73+
74+
await this.page.getByTestId(testIds.createSatellite.continueToMetadata).click();
75+
76+
// Metadata step
77+
await expect(this.page.getByTestId(testIds.createSatellite.continueToOptions)).toBeVisible();
7278

7379
await this.page.getByTestId(testIds.createSatellite.input).fill('Test');
80+
await this.page.getByTestId(testIds.createSatellite.continueToOptions).click();
81+
82+
// Options step
83+
await expect(this.page.getByTestId(testIds.createSatellite.continueToReview)).toBeVisible();
84+
7485
await this.page.getByTestId(testIds.createSatellite[kind]).click();
86+
await this.page.getByTestId(testIds.createSatellite.continueToReview).click();
87+
88+
// Review step
89+
await expect(this.page.getByTestId(testIds.createSatellite.create)).toBeVisible();
7590

7691
await this.page.getByTestId(testIds.createSatellite.create).click();
7792

93+
// Done
7894
await expect(this.page.getByTestId(testIds.createSatellite.continue)).toBeVisible(
7995
TIMEOUT_AVERAGE
8096
);

0 commit comments

Comments
 (0)