diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-11-15 19:11:06 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-15 19:11:06 +0100 |
| commit | bb2d78e75626a99ce8ccd5be31924bd4dd799faf (patch) | |
| tree | 8f2f24a924d27a7d9b8cf8a81784a3bd157b02b5 /tests/cypress/e2e/back-to-top.cy.ts | |
| parent | 26a1e3a7a08e4b0fdb4dfcc3ed6a6cc21bcef104 (diff) | |
test: fix most of the e2e tests errors
* back-to-top test is not working: for some reasons, the link only
appears when manually scrolling
* search test has failure test: it seems the page meta is too long to
load
Anyway, the pages will be refactored and the e2e should also be
refactored. But the back to top test remains problematic...
Diffstat (limited to 'tests/cypress/e2e/back-to-top.cy.ts')
| -rw-r--r-- | tests/cypress/e2e/back-to-top.cy.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/cypress/e2e/back-to-top.cy.ts b/tests/cypress/e2e/back-to-top.cy.ts index 06ac3e6..fcbd814 100644 --- a/tests/cypress/e2e/back-to-top.cy.ts +++ b/tests/cypress/e2e/back-to-top.cy.ts @@ -1,12 +1,10 @@ describe('Back to top', () => { - it('show a back to top button when scrolling', async () => { + it('show a back to top button when scrolling', () => { cy.visit('/'); - cy.findByRole('link', { name: /Retour en haut de page/i }).should( - 'not.be.visible' - ); + cy.get('body').should('not.contain', /Retour en haut de page/i); - // See @components/templates/layout/layout.tsx for scroll position. - cy.scrollTo(0, 300); + // eslint-disable-next-line @typescript-eslint/no-magic-numbers + cy.scrollTo(0, 400); // Scroll breakpoint is 300 cy.findByRole('link', { name: /Retour en haut de page/i }).should( 'be.visible' ); |
