19 lines
488 B
JavaScript
19 lines
488 B
JavaScript
export class MyAccountPage {
|
|
constructor(page) {
|
|
this.page = page
|
|
this.myAccountHeader = page.getByRole('heading', { name: 'My Account' })
|
|
this.errorMessage = page.locator('[data-qa="error-message"]')
|
|
}
|
|
|
|
visit = async () => {
|
|
await this.page.goto("/my-account")
|
|
}
|
|
|
|
checkForLogin = async () => {
|
|
await this.myAccountHeader.waitFor()
|
|
}
|
|
|
|
waitForErrorMessage = async () => {
|
|
await this.errorMessage.waitFor()
|
|
}
|
|
} |