From be99ea5b0e9c6f8f9a765739bc35687389cf29a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Roig?= Date: Mon, 11 Dec 2023 13:48:36 +0100 Subject: [PATCH] fix(drawerMenu): increase swip area width --- cypress/e2e/trackers/selectedDate.cy.ts | 8 ++++---- cypress/e2e/trackers/validateTracker.cy.ts | 2 +- src/app/DrawerMenu.tsx | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cypress/e2e/trackers/selectedDate.cy.ts b/cypress/e2e/trackers/selectedDate.cy.ts index 42f3ea67..4da593b3 100644 --- a/cypress/e2e/trackers/selectedDate.cy.ts +++ b/cypress/e2e/trackers/selectedDate.cy.ts @@ -20,8 +20,8 @@ context('Trackers', () => { const todayString = `${today.getDate()}`.padStart(2, '0') + '/' + todayMonth + '/' + today.getFullYear(); cy.get('input').should('have.value', todayString); - cy.get('[data-testid="ChevronLeftIcon"]').click(); - cy.get('[data-testid="ChevronLeftIcon"]').click(); + cy.get('[data-testid="ChevronLeftIcon"]').click({ force: true }); + cy.get('[data-testid="ChevronLeftIcon"]').click({ force: true }); cy.reload(); cy.get('input').should('have.value', todayString); }); @@ -30,9 +30,9 @@ context('Trackers', () => { }); it('has one tracker created and visible today and yesterday only', () => { cy.get('.tracker-card').should('have.length', 1); - cy.get('[data-testid="ChevronLeftIcon"]').click(); + cy.get('[data-testid="ChevronLeftIcon"]').click({ force: true }); cy.get('.tracker-card').should('have.length', 1); - cy.get('[data-testid="ChevronLeftIcon"]').click(); + cy.get('[data-testid="ChevronLeftIcon"]').click({ force: true }); cy.get('.tracker-card').should('have.length', 0); }); }); diff --git a/cypress/e2e/trackers/validateTracker.cy.ts b/cypress/e2e/trackers/validateTracker.cy.ts index 3acd7431..455f7f06 100644 --- a/cypress/e2e/trackers/validateTracker.cy.ts +++ b/cypress/e2e/trackers/validateTracker.cy.ts @@ -7,7 +7,7 @@ context('Trackers', () => { describe('validate tracker', () => { it('validates a tracker when clicking on the "complete validate" button', () => { cy.get('.tracker-card').first().as('card'); - cy.get('@card').find('[data-testid="TaskAltIcon"]').click(); + cy.get('@card').find('[data-testid="TaskAltIcon"]').click({ force: true }); cy.contains('Valider').click(); cy.get('.tracker-card').should('have.length', 0); diff --git a/src/app/DrawerMenu.tsx b/src/app/DrawerMenu.tsx index 0b0a4cee..92bd2ccf 100644 --- a/src/app/DrawerMenu.tsx +++ b/src/app/DrawerMenu.tsx @@ -87,6 +87,7 @@ const DrawerMenu: FC = ({ open, toggleDrawerMenu, toggleThemeMode, width onClose={toggleDrawerMenu} onOpen={toggleDrawerMenu} open={open} + swipeAreaWidth={70} sx={{ width: width, flexShrink: 0,