diff --git a/frontend/cypress/e2e/main_window/control_unit_dialog/contact_list.spec.ts b/frontend/cypress/e2e/main_window/control_unit_dialog/contact_list.spec.ts index fde0f9957..7ed2c5d96 100644 --- a/frontend/cypress/e2e/main_window/control_unit_dialog/contact_list.spec.ts +++ b/frontend/cypress/e2e/main_window/control_unit_dialog/contact_list.spec.ts @@ -152,7 +152,7 @@ context('Main Window > Control Unit Dialog > Contact List', () => { cy.contains('Unité DREAL Pays-de-La-Loire').should('be.visible') - cy.getDataCy('reinitialize-filters').scrollIntoView().click() + cy.clickButton('Réinitialiser les filtres') }) it('Should open the current mission of the unit', () => { diff --git a/frontend/cypress/e2e/side_window/mission_list/filters.spec.ts b/frontend/cypress/e2e/side_window/mission_list/filters.spec.ts index 1c8dfe7a5..dba18674b 100644 --- a/frontend/cypress/e2e/side_window/mission_list/filters.spec.ts +++ b/frontend/cypress/e2e/side_window/mission_list/filters.spec.ts @@ -9,7 +9,7 @@ context('Side Window > Mission List > Filter Bar', () => { }) afterEach(() => { - cy.getDataCy('reinitialize-filters').scrollIntoView().click() + cy.clickButton('Réinitialiser les filtres') }) it('Should filter missions for the current week', () => { diff --git a/frontend/cypress/e2e/side_window/mission_list/missions.spec.ts b/frontend/cypress/e2e/side_window/mission_list/missions.spec.ts index 69b63c697..7e004f273 100644 --- a/frontend/cypress/e2e/side_window/mission_list/missions.spec.ts +++ b/frontend/cypress/e2e/side_window/mission_list/missions.spec.ts @@ -33,7 +33,7 @@ context('Missions', () => { cy.getDataCy('edit-mission-48').should('not.exist') cy.log('Initialize filters') - cy.getDataCy('reinitialize-filters').click() + cy.clickButton('Réinitialiser les filtres') cy.getDataCy('edit-mission-48').scrollIntoView().should('exist') cy.log('Units should be filtered') diff --git a/frontend/cypress/e2e/side_window/reporting/filters.spec.ts b/frontend/cypress/e2e/side_window/reporting/filters.spec.ts index 7ac4d6687..d5f8806db 100644 --- a/frontend/cypress/e2e/side_window/reporting/filters.spec.ts +++ b/frontend/cypress/e2e/side_window/reporting/filters.spec.ts @@ -10,7 +10,7 @@ context('Reportings', () => { cy.wait('@getReportings') }) afterEach(() => { - cy.getDataCy('reinitialize-filters').click({ force: true }) + cy.clickButton('Réinitialiser les filtres') }) it('Should filter reportings for the last seven days', () => { diff --git a/frontend/cypress/e2e/side_window/vigilance_areas_list/filters.spec.ts b/frontend/cypress/e2e/side_window/vigilance_areas_list/filters.spec.ts index 82c1573f1..bae3e0839 100644 --- a/frontend/cypress/e2e/side_window/vigilance_areas_list/filters.spec.ts +++ b/frontend/cypress/e2e/side_window/vigilance_areas_list/filters.spec.ts @@ -6,7 +6,7 @@ context('Side Window > Vigilance Areas List > Filter Bar', () => { }) afterEach(() => { - cy.getDataCy('reinitialize-filters').scrollIntoView().click() + cy.clickButton('Réinitialiser les filtres') }) const verifyVigilanceAreaRows = (expectedText: string) => { diff --git a/frontend/src/features/commonComponents/ReinitializeFiltersButton.tsx b/frontend/src/features/commonComponents/ReinitializeFiltersButton.tsx index 188f988da..fe466a127 100644 --- a/frontend/src/features/commonComponents/ReinitializeFiltersButton.tsx +++ b/frontend/src/features/commonComponents/ReinitializeFiltersButton.tsx @@ -7,7 +7,7 @@ interface ReinitializeFiltersButtonProps { export function ReinitializeFiltersButton({ onClick }: ReinitializeFiltersButtonProps) { return ( - + Réinitialiser les filtres