Skip to content

Commit

Permalink
MAP-1255 Skip accessibilty testing of mock login page
Browse files Browse the repository at this point in the history
  • Loading branch information
danbenton-mojdt committed Jun 10, 2024
1 parent 629e328 commit 89e6044
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion integration_tests/pages/authManageDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import Page from './page'

export default class AuthManageDetailsPage extends Page {
constructor() {
super('Your account details')
super('Your account details', true)
}
}
2 changes: 1 addition & 1 deletion integration_tests/pages/authSignIn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import Page from './page'

export default class AuthSignInPage extends Page {
constructor() {
super('Sign in')
super('Sign in', true)
}
}
10 changes: 5 additions & 5 deletions integration_tests/pages/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ export default abstract class Page {
return new constructor()
}

constructor(private readonly title: string) {
constructor(
private readonly title: string,
private readonly skipA11y = false,
) {
if (title) {
this.checkOnPage()
}
}

checkOnPage(): void {
cy.get('h1').contains(this.title)
let pageUrl: string
// eslint-disable-next-line no-return-assign
cy.url().then(url => (pageUrl = url))
if (!Cypress.env('SKIP_AXE') || pageUrl.includes('oauth/authorize')) {
if (!Cypress.env('SKIP_AXE') || this.skipA11y) {
cy.injectAxe()
cy.configureAxe({
rules: [
Expand Down

0 comments on commit 89e6044

Please sign in to comment.