Skip to content

Commit

Permalink
fix: test e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
maximeperrault committed Dec 12, 2024
1 parent 6a292cc commit e23c175
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion frontend/cypress/e2e/side_window/reporting/filters.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface ReinitializeFiltersButtonProps {

export function ReinitializeFiltersButton({ onClick }: ReinitializeFiltersButtonProps) {
return (
<ResetFiltersButton data-cy="reinitialize-filters" onClick={onClick}>
<ResetFiltersButton onClick={onClick}>
<Icon.Reset size={14} />
<span>Réinitialiser les filtres</span>
</ResetFiltersButton>
Expand Down

0 comments on commit e23c175

Please sign in to comment.