-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add account recover page (#235)
- Loading branch information
1 parent
1a60727
commit c70ae47
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type { Page, Locator } from '@playwright/test'; | ||
import type { PageObject } from '../../types/PageObject'; | ||
|
||
export class AccountRecover implements PageObject { | ||
public readonly passwordRecoveryForm: Locator; | ||
public readonly title: Locator; | ||
public readonly subtitle: Locator; | ||
public readonly emailInput: Locator; | ||
public readonly requestEmailButton: Locator; | ||
public readonly backButton: Locator; | ||
public readonly passwordResetEmailSentMessage: Locator; | ||
|
||
constructor(public readonly page: Page) { | ||
this.passwordRecoveryForm = page.locator('.account-recover-password-form'); | ||
const cardTitle = this.passwordRecoveryForm.locator('.card-title'); | ||
this.title = cardTitle.getByText('Password recovery'); | ||
this.subtitle = cardTitle.getByText('We will send you a confirmation email. Click the link in that email in order to change your password.'); | ||
this.emailInput = this.passwordRecoveryForm.getByLabel('Your email address'); | ||
this.requestEmailButton = this.passwordRecoveryForm.getByRole('button', { name: 'Request email' }); | ||
this.backButton = this.passwordRecoveryForm.getByRole('link', { name: 'Back' }); | ||
this.passwordResetEmailSentMessage = page.getByText('If the provided email address is registered, a confirmation email including a password reset link has been sent.'); | ||
} | ||
|
||
url() { | ||
return 'account/recover'; | ||
} | ||
} |