forked from jwplayer/ott-web-app
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat / WCAG validation per page using axe-playwright
#192
Draft
langemike
wants to merge
15
commits into
develop
Choose a base branch
from
feat/e2e-wcag
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
566ee4f
chore(e2e): wcag compliance using axe-playwright
langemike 7c25d42
fix(a11y): axe heading-order rule
langemike 0c27c1c
fix(a11y): axe aria-valid-attr-value rule
langemike 9b35f02
chore: code cleanup
langemike 2fe06bc
chore: add ignore option for certain elements
langemike 41e2c38
chore: improve e2e stability for accessibility
langemike 80314ae
fix(a11y): aria-prohibited-attr rule and add account pages tests
MelissaDTH ef34132
fix(a11y): add epg test
MelissaDTH 5dd437a
fix(a11y): add search tests and fix its heading hierarchy
MelissaDTH dcfd08b
Merge branch 'develop' into feat/e2e-wcag
MelissaDTH f5bed39
fix(a11y): add hidden label and registration modal tests
MelissaDTH 053b2a5
chore: fix dropdown test and apply temp wait function to a11y tests
MelissaDTH 4b264b1
Merge branch 'develop' into feat/e2e-wcag
MelissaDTH 3c1b597
chore: fix search tests
MelissaDTH 2ab96b9
chore: add wait function to steps file
MelissaDTH File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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
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,125 @@ | ||
import { testConfigs } from '@jwp/ott-testing/constants'; | ||
|
||
import { LoginContext } from '#utils/password_utils'; | ||
import constants from '#utils/constants'; | ||
|
||
Feature('Accessibility'); | ||
|
||
let paidLoginContext: LoginContext; | ||
|
||
const disableRetryFailedStep = (test: { disableRetryFailedStep: boolean }): void => { | ||
test.disableRetryFailedStep = true; | ||
}; | ||
|
||
Scenario('WCAG compliant - Home Page', async ({ I }) => { | ||
I.useConfig(testConfigs.basicNoAuth); | ||
I.amOnPage('/'); | ||
I.checkA11y(); | ||
}).config(disableRetryFailedStep); | ||
|
||
Scenario('WCAG compliant - Video Detail Page', async ({ I }) => { | ||
I.useConfig(testConfigs.basicNoAuth); | ||
I.amOnPage('/m/awWEFyPu/big-buck-bunny'); | ||
I.checkA11y(); | ||
}).config(disableRetryFailedStep); | ||
|
||
Scenario('WCAG compliant - Playlist Page', async ({ I }) => { | ||
I.amOnPage('/p/dGSUzs9o/'); // "Films" page | ||
I.checkA11y(); | ||
}).config(disableRetryFailedStep); | ||
|
||
Scenario('WCAG compliant - Video Detail Inline Page', async ({ I }) => { | ||
I.useConfig(testConfigs.inlinePlayer); | ||
I.amOnPage('/m/awWEFyPu/big-buck-bunny'); | ||
I.checkA11y(); | ||
}).config(disableRetryFailedStep); | ||
|
||
Scenario('WCAG compliant - Search Page with results', async ({ I }) => { | ||
I.useConfig(testConfigs.basicNoAuth); | ||
I.amOnPage('/q/Caminandes'); | ||
I.checkA11y(); | ||
}).config(disableRetryFailedStep); | ||
|
||
Scenario('WCAG compliant - Search Page containing no results', async ({ I }) => { | ||
I.useConfig(testConfigs.basicNoAuth); | ||
I.amOnPage('/q/querywithoutresults'); | ||
I.checkA11y(); | ||
}).config(disableRetryFailedStep); | ||
|
||
Scenario('WCAG compliant - Player Page', async ({ I }) => { | ||
I.useConfig(testConfigs.basicNoAuth); | ||
I.amOnPage('/m/awWEFyPu/big-buck-bunny?r=dGSUzs9o&play=1'); | ||
I.checkA11y(); | ||
}).config(disableRetryFailedStep); | ||
|
||
Scenario('WCAG compliant - Live Page (EPG)', async ({ I }) => { | ||
I.useConfig(testConfigs.basicNoAuth); | ||
I.amOnPage('/p/fWpLtzVh/?channel=Uh7zcqVm/'); | ||
I.checkA11y(null, { | ||
ignore: [ | ||
// It is a known issue that the EPG is not fully accessible due to the planby EPG package | ||
{ id: 'scrollable-region-focusable', selector: '[class^="css-"]' }, | ||
], | ||
}); | ||
}).config(disableRetryFailedStep); | ||
|
||
// Account Pages | ||
|
||
Scenario('WCAG compliant - Account Page', async ({ I }) => { | ||
I.useConfig(testConfigs.jwpAuth); | ||
I.amOnPage('/u/my-account'); | ||
I.checkA11y(); | ||
}).config(disableRetryFailedStep); | ||
|
||
Scenario('WCAG compliant - Payments Page', async ({ I }) => { | ||
I.useConfig(testConfigs.jwpAuth); | ||
I.amOnPage('/u/payments'); | ||
I.checkA11y(); | ||
}).config(disableRetryFailedStep); | ||
|
||
Scenario('WCAG compliant - Favorites Page', async ({ I }) => { | ||
I.useConfig(testConfigs.jwpAuth); | ||
I.amOnPage('/u/favorites'); | ||
I.checkA11y(); | ||
}).config(disableRetryFailedStep); | ||
|
||
// Modals | ||
|
||
Scenario('WCAG compliant - Signup Modal - CLEENG', async ({ I }) => { | ||
I.useConfig(testConfigs.cleengAuthvod); | ||
I.amOnPage('/?u=create-account'); | ||
I.checkA11y(); | ||
}).config(disableRetryFailedStep); | ||
|
||
Scenario('WCAG compliant - Sign in Modal - CLEENG', async ({ I }) => { | ||
I.useConfig(testConfigs.cleengAuthvod); | ||
I.amOnPage('/?u=login'); | ||
I.checkA11y(); | ||
}).config(disableRetryFailedStep); | ||
|
||
Scenario('WCAG compliant - Signup Modal - JWP', async ({ I }) => { | ||
I.useConfig(testConfigs.jwpAuth); | ||
I.amOnPage('/?u=create-account'); | ||
I.checkA11y({ | ||
rules: { | ||
// This rule is disabled because this component does have a label prop, | ||
// but is not set in the test configuration | ||
'label-title-only': { | ||
enabled: false, | ||
}, | ||
}, | ||
}); | ||
}).config(disableRetryFailedStep); | ||
|
||
Scenario('WCAG compliant - Sign in Modal - JWP', async ({ I }) => { | ||
I.useConfig(testConfigs.jwpAuth); | ||
I.amOnPage('/?u=login'); | ||
I.checkA11y(); | ||
}).config(disableRetryFailedStep); | ||
|
||
Scenario('WCAG compliant - Choose Offer Modal', async ({ I }) => { | ||
I.useConfig(testConfigs.svod); | ||
paidLoginContext = await I.registerOrLogin(paidLoginContext); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems like a weird convention. I also see this is not your idea, but it is used like this in other tests. Is this really needed to make it work? I have the assumption it could be left empty and still work. Also, I would move the |
||
I.amOnPage(constants.offersUrl); | ||
I.checkA11y(); | ||
}).config(disableRetryFailedStep); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazingly no failures for the player!? Awesome!