-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(accessibility): tab support at login, reset and signup pages, but…
- Loading branch information
1 parent
581ce5b
commit 096c9ea
Showing
26 changed files
with
441 additions
and
87 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,30 @@ | ||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. | ||
// See LICENSE.txt for license information. | ||
|
||
import {expect, Locator} from '@playwright/test'; | ||
|
||
export default class Footer { | ||
readonly container: Locator; | ||
|
||
readonly copyright; | ||
readonly aboutLink; | ||
readonly privacyPolicyLink; | ||
readonly termsLink; | ||
readonly helpLink; | ||
|
||
constructor(container: Locator) { | ||
this.container = container; | ||
|
||
this.copyright = container.locator('.footer-copyright'); | ||
this.aboutLink = container.locator('text=About'); | ||
this.privacyPolicyLink = container.locator('text=Privacy Policy'); | ||
this.termsLink = container.locator('text=Terms'); | ||
this.helpLink = container.locator('text=Help'); | ||
} | ||
|
||
async toBeVisible() { | ||
await expect(this.copyright).toBeVisible(); | ||
} | ||
} | ||
|
||
export {Footer}; |
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,24 @@ | ||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. | ||
// See LICENSE.txt for license information. | ||
|
||
import {expect, Locator} from '@playwright/test'; | ||
|
||
export default class MainHeader { | ||
readonly container: Locator; | ||
|
||
readonly logo; | ||
readonly backButton; | ||
|
||
constructor(container: Locator) { | ||
this.container = container; | ||
|
||
this.logo = container.locator('.header-logo-link'); | ||
this.backButton = container.getByTestId('back_button'); | ||
} | ||
|
||
async toBeVisible() { | ||
await expect(this.container).toBeVisible(); | ||
} | ||
} | ||
|
||
export {MainHeader}; |
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,51 @@ | ||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. | ||
// See LICENSE.txt for license information. | ||
|
||
import {expect, Page} from '@playwright/test'; | ||
|
||
import {components} from '@e2e-support/ui/components'; | ||
|
||
export default class ResetPasswordPage { | ||
readonly page: Page; | ||
|
||
readonly title; | ||
readonly subtitle; | ||
readonly emailInput; | ||
readonly resetButton; | ||
readonly formContainer; | ||
|
||
readonly header; | ||
readonly footer; | ||
|
||
constructor(page: Page) { | ||
this.page = page; | ||
|
||
this.title = page.locator('h1:has-text("Password Reset")'); | ||
this.subtitle = page.locator('text=To reset your password, enter the email address you used to sign up'); | ||
this.emailInput = page.locator(`[placeholder="Email"]`); | ||
this.resetButton = page.locator('#passwordResetButton'); | ||
this.formContainer = page.locator('.signup-team__container'); | ||
|
||
this.header = new components.MainHeader(page.locator('.signup-header')); | ||
this.footer = new components.Footer(page.locator('#footer_section')); | ||
} | ||
|
||
async toBeVisible() { | ||
await this.page.waitForLoadState('networkidle'); | ||
await expect(this.title).toBeVisible(); | ||
await expect(this.subtitle).toBeVisible(); | ||
await expect(this.emailInput).toBeVisible(); | ||
await expect(this.resetButton).toBeVisible(); | ||
} | ||
|
||
async goto() { | ||
await this.page.goto('/reset_password'); | ||
} | ||
|
||
async reset(email: string) { | ||
await this.emailInput.fill(email); | ||
await Promise.all([this.page.waitForNavigation(), this.resetButton.click()]); | ||
} | ||
} | ||
|
||
export {ResetPasswordPage}; |
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
Oops, something went wrong.