Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/constants/test-ids.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
22 changes: 19 additions & 3 deletions src/page-objects/console.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,31 @@ export class ConsolePage extends BrowserPage {
}

private async createSatelliteWizard({kind}: {kind: 'website' | 'application'}): Promise<void> {
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
);
Expand Down
Loading