Skip to content

Commit

Permalink
Merge pull request #244 from shopware/next-39785/customer-get-access-…
Browse files Browse the repository at this point in the history
…back-when-forgot-password

Next 39785/customer get access back when forgot password
  • Loading branch information
vanpham-sw authored Dec 18, 2024
2 parents f284d0f + cf65ffe commit d42b6f8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/page-objects/storefront/AccountLogin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export class AccountLogin implements PageObject {
public readonly logoutLink: Locator;
public readonly successAlert: Locator;
public readonly invalidCredentialsAlert: Locator;
public readonly passwordUpdatedAlert: Locator;

// Inputs for registration
public readonly personalFormArea: Locator;
Expand Down Expand Up @@ -54,6 +55,7 @@ export class AccountLogin implements PageObject {
this.registerButton = page.getByRole('button', { name: 'Continue' });
this.logoutLink = page.getByRole('link', { name: 'Log out'});
this.successAlert = page.getByText('Successfully logged out.');
this.passwordUpdatedAlert = page.getByText('Your password has been updated.');
}

url() {
Expand Down
13 changes: 12 additions & 1 deletion src/page-objects/storefront/AccountRecover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ export class AccountRecover implements PageObject {
public readonly requestEmailButton: Locator;
public readonly backButton: Locator;
public readonly passwordResetEmailSentMessage: Locator;
public readonly newPasswordInput: Locator;
public readonly newPasswordConfirmInput: Locator;
public readonly changePasswordButton: Locator;
public readonly invalidLinkMessage: Locator;

constructor(public readonly page: Page) {
this.passwordRecoveryForm = page.locator('.account-recover-password-form');
Expand All @@ -19,9 +23,16 @@ export class AccountRecover implements PageObject {
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.');
this.newPasswordInput = page.getByLabel('New password');
this.newPasswordConfirmInput = page.getByLabel('Password confirmation');
this.changePasswordButton = page.getByRole('button', { name: 'Change password' });
this.invalidLinkMessage = page.getByText('The password reset link seems to be invalid.');
}

url() {
url(recoverLink?: string) {
if (recoverLink) {
return recoverLink;
}
return 'account/recover';
}
}

0 comments on commit d42b6f8

Please sign in to comment.