diff --git a/site/cypress/integration/mon-entreprise/secondary-pages.ts b/site/cypress/integration/mon-entreprise/secondary-pages.ts index d07c7a563..89febb98f 100644 --- a/site/cypress/integration/mon-entreprise/secondary-pages.ts +++ b/site/cypress/integration/mon-entreprise/secondary-pages.ts @@ -5,7 +5,7 @@ describe('Secondary pages', function () { return } - it("page stats doesn't crash", function () { + it('Statistics page should not crash', function () { cy.visit('/stats') cy.contains('Statistiques') }) @@ -17,7 +17,7 @@ describe('Secondary pages', function () { checkA11Y() }) - it('navigate in the news section', function () { + it('News page should not crash', function () { cy.visit('/nouveautés') cy.contains('←').click() cy.url({ decode: true }).should('match', /\/nouveautés\/[^/]*$/) @@ -31,4 +31,16 @@ describe('Secondary pages', function () { cy.contains('←').click() cy.url({ decode: true }).should('match', /\/nouveautés\/[^/]*$/) }) + + it('Budget page should not crash', function () { + cy.visit('/budget') + cy.contains('Budget') + cy.get('button[data-cy="year-selector"]').click() + cy.contains('2021').click() + }) + + it('Budget page should be RGAA compliant', function () { + cy.visit('/budget') + checkA11Y() + }) }) diff --git a/site/source/pages/budget/index.tsx b/site/source/pages/budget/index.tsx index d1c1f1f21..987977582 100644 --- a/site/source/pages/budget/index.tsx +++ b/site/source/pages/budget/index.tsx @@ -108,6 +108,7 @@ export default function Budget() { onSelectionChange={(year) => { setSelectedYear(year as (typeof years)[number]) }} + data-cy="year-selector" > {years .filter((year) => !!year)