Files
Compass/tests/e2e/web/pages/onboardingPage.ts
Martin Braquet ba9b3cfb06 Add pretty formatting (#29)
* Test

* Add pretty formatting

* Fix Tests

* Fix Tests

* Fix Tests

* Fix

* Add pretty formatting fix

* Fix

* Test

* Fix tests

* Clean typeckech

* Add prettier check

* Fix api tsconfig

* Fix api tsconfig

* Fix tsconfig

* Fix

* Fix

* Prettier
2026-02-20 17:32:27 +01:00

53 lines
1.7 KiB
TypeScript

import {expect, Locator, Page} from '@playwright/test'
export class OnboardingPage {
private readonly continueButton: Locator
private readonly skipOnboardingLink: Locator
private readonly backButton: Locator
private readonly getStartedButton: Locator
private readonly exploreProfilesNowButton: Locator
private readonly refineProfileButton: Locator
constructor(public readonly page: Page) {
this.continueButton = page.getByRole('button', {name: 'Continue', exact: true})
this.skipOnboardingLink = page.getByRole('button', {name: 'Skip onboarding', exact: true})
this.backButton = page.getByRole('button', {name: 'Back'})
this.getStartedButton = page.getByRole('button', {name: 'Get started'})
this.exploreProfilesNowButton = page.getByRole('button', {
name: 'Explore Profiles Now',
exact: true,
})
this.refineProfileButton = page.getByRole('button', {name: 'Refine Profile', exact: true})
}
async clickContinueButton() {
await expect(this.continueButton).toBeVisible()
await this.continueButton.click()
}
async clickBackButton() {
await expect(this.backButton).toBeVisible()
await this.backButton.click()
}
async clickSkipOnboardingButton() {
await expect(this.skipOnboardingLink).toBeVisible()
await this.skipOnboardingLink.click()
}
async clickGetStartedButton() {
await expect(this.getStartedButton).toBeVisible()
await this.getStartedButton.click()
}
async clickExploreProfilesNowButton() {
await expect(this.exploreProfilesNowButton).toBeVisible()
await this.exploreProfilesNowButton.click()
}
async clickRefineProfileButton() {
await expect(this.refineProfileButton).toBeVisible()
await this.refineProfileButton.click()
}
}