Skip to content

Commit

Permalink
try to retry on status code failures to handle intermittent problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles-Pham committed Feb 5, 2025
1 parent 507a1dc commit 3062cba
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/ContactUs.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('Validate Contact Us Landing page', () => {
hostname: 'assets.adobedtm.com',
path: /.*\/launch-.*/,
}).as('adobeAnalytics')
cy.visit('/contact-us')
cy.visit('/contact-us', { retryOnStatusCodeFailure: true })
})

it('Contact us has no detectable a11y violations on load', () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/ContactUsCPP.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('Validate Contact Canada Pension Plan page', () => {
hostname: 'assets.adobedtm.com',
path: /.*\/launch-.*/,
}).as('adobeAnalytics')
cy.visit('/contact-us/contact-canada-pension-plan')
cy.visit('/contact-us/contact-canada-pension-plan', { retryOnStatusCodeFailure: true })
})

it('Contact us CPP has no detectable a11y violations on load', () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/ContactUsEI.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('Validate EI Contact Us Landing page', () => {
hostname: 'assets.adobedtm.com',
path: /.*\/launch-.*/,
}).as('adobeAnalytics')
cy.visit('/contact-us/contact-employment-insurance')
cy.visit('/contact-us/contact-employment-insurance', { retryOnStatusCodeFailure: true })
})

it('Contact us EI has no detectable a11y violations on load', () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/ContactUsOAS.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('Validate Contact Old Age Security page', () => {
hostname: 'assets.adobedtm.com',
path: /.*\/launch-.*/,
}).as('adobeAnalytics')
cy.visit('/contact-us/contact-old-age-security')
cy.visit('/contact-us/contact-old-age-security', { retryOnStatusCodeFailure: true })
})

it('Contact us OAS has no detectable a11y violations on load', () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/DecisionReviews.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('Validate Request a review of a decision page', () => {
hostname: 'assets.adobedtm.com',
path: /.*\/launch-.*/,
}).as('adobeAnalytics')
cy.visit('/en/decision-reviews')
cy.visit('/en/decision-reviews', { retryOnStatusCodeFailure: true })
})
it('Request a review has no detectable a11y violations on load', () => {
cy.injectAxe()
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/Login.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ beforeEach(() => {
hostname: 'assets.adobedtm.com',
path: /.*\/launch-.*/,
}).as('adobeAnalytics')
cy.visit('/auth/login')
cy.visit('/auth/login', { retryOnStatusCodeFailure: true })
})

describe('Validate login page', () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/Logout.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ It does not test the authentication functionality currently since those endpoint
describe('Validate logout scenario and page', () => {

beforeEach(() => {
cy.visit('/my-dashboard')
cy.visit('/my-dashboard', { retryOnStatusCodeFailure: true })
})

it('should show the loading spinner + text then return to index page once logged out', () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/Profile.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('Validate Profile page', () => {
hostname: 'assets.adobedtm.com',
path: /.*\/launch-.*/,
}).as('adobeAnalytics')
cy.visit('/profile')
cy.visit('/profile', { retryOnStatusCodeFailure: true })
})

it('Profile has no detectable a11y violations on load', () => {
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/SecuritySettings.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('Validate Security Settings page', () => {
hostname: 'assets.adobedtm.com',
path: /.*\/launch-.*/,
}).as('adobeAnalytics')
cy.visit('/security-settings')
cy.visit('/security-settings', { retryOnStatusCodeFailure: true })
})

it('Security settings has no detectable a11y violations on load', () => {
Expand Down Expand Up @@ -70,7 +70,7 @@ describe('Validate Security Settings page', () => {
})

it('Validate the "Profile" click navigates to Profile Page EN', () => {
cy.get('[data-cy="access-profile-page-link"]').click({ force: true })
cy.get('[data-cy="access-profile-page-link"]').click()
cy.url().should('contains', '/profile')
cy.get('[data-testid ="profileContent-test"]>h1')
.should('be.visible')
Expand All @@ -80,7 +80,7 @@ describe('Validate Security Settings page', () => {
it('Validate the "Profil" click navigates to Profile Page FR', () => {
cy.get('[data-cy="lang1"] > span').click()
cy.url().should('contains', '/fr/parametres-securite')
cy.get('[data-cy="access-profile-page-link"]').click({ force: true })
cy.get('[data-cy="access-profile-page-link"]').click()
cy.url().should('contains', '/profil')
cy.get('[data-testid ="profileContent-test"]>h1')
.should('be.visible')
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/app.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe('app page loads', () => {
beforeEach(() => {
cy.visit('/')
cy.visit('/', { retryOnStatusCodeFailure: true })
cy.injectAxe()
})

Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/dashboard.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('Validate dashboard page', () => {
hostname: 'assets.adobedtm.com',
path: /.*\/launch-.*/,
}).as('adobeAnalytics')
cy.visit('/my-dashboard')
cy.visit('/my-dashboard', { retryOnStatusCodeFailure: true })
})

it('Dashboard has no detectable a11y violations on load', () => {
Expand Down Expand Up @@ -234,7 +234,7 @@ describe('Validate dashboard page', () => {
cy.get('[data-cy="task-group-list"]')
.parents('[data-cy="Task"]')
.find('[data-cy="task-link"] a[href="/en/profile"]')
.click({ force: true })
.click()
cy.location('pathname', { timeout: 10000 }).should('equal', '/en/profile')
cy.visit('/my-dashboard')
cy.location('pathname').should('equal', '/en/my-dashboard')
Expand Down Expand Up @@ -270,7 +270,7 @@ describe('Validate dashboard page', () => {
cy.get('[data-cy="task-group-list"]')
.parents('[data-cy="Task"]')
.find('[data-cy="task-link"] a[href="/fr/profil"]')
.click({ force: true })
.click()
cy.location('pathname', { timeout: 10000 }).should('equal', '/fr/profil')
cy.visit('/fr/mon-tableau-de-bord')
cy.location('pathname').should('equal', '/fr/mon-tableau-de-bord')
Expand Down

0 comments on commit 3062cba

Please sign in to comment.