diff options
Diffstat (limited to 'tests/cypress/e2e/pages')
| -rw-r--r-- | tests/cypress/e2e/pages/contact.cy.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/cypress/e2e/pages/contact.cy.ts b/tests/cypress/e2e/pages/contact.cy.ts index 64f8bdb..e2c8e2f 100644 --- a/tests/cypress/e2e/pages/contact.cy.ts +++ b/tests/cypress/e2e/pages/contact.cy.ts @@ -1,4 +1,3 @@ -import { CONFIG } from '../../../../src/utils/config'; import { ROUTES } from '../../../../src/utils/constants'; const userName = 'Cypress Test'; @@ -18,7 +17,6 @@ describe('Contact Page', () => { }); it('submits the form', () => { - cy.intercept('POST', CONFIG.api.url ?? '').as('sendMail'); cy.findByRole('textbox', { name: /Nom/i }) .type(userName) .should('have.value', userName); @@ -32,9 +30,9 @@ describe('Contact Page', () => { .type(message) .should('have.value', message); cy.findByRole('button', { name: /Envoyer/i }).click(); - cy.findByText(/Mail en cours/i).should('be.visible'); - cy.wait('@sendMail'); - cy.get('body').should('not.contain.text', /Mail en cours/i); + // The test seems to quick to find the loading state... + //cy.findByText(/Mail en cours/i).should('be.visible'); + cy.findByText(/Merci/i).should('be.visible'); }); it('prevents the form to submit if some fields are missing', () => { |
