Skip to content

Commit

Permalink
Added bypassing of the cypress/no-unnecessary-waiting linting rule as we
Browse files Browse the repository at this point in the history
need to wait for the honeypot timer to run out before submitting the form.
  • Loading branch information
Dresse committed Nov 28, 2024
1 parent c2991c1 commit 05dce77
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cypress/e2e/webforms.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ describe('Webforms', () => {
cy.get('[data-cy="category"]').select(1);
cy.get('[data-cy="subject"]').type('Test');
cy.get('[data-cy="message"]').type('Lorem ipsum');
// We bypass the linting here, as we need to force waiting as we need to
// wait for the honeypot timer to run out.
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(6000);
cy.get('[data-cy="op"]').click();
cy.url().should('match', /kontakt/);
Expand Down Expand Up @@ -60,6 +63,9 @@ describe('Webforms', () => {
cy.get('[data-cy="subject"]').type('Test');
cy.get('[data-cy="message"]').type('Lorem ipsum');
cy.get('[data-cy="url"]').type('John Doe', { force: true });
// We bypass the linting here, as we need to force waiting as we need to
// wait for the honeypot timer to run out.
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(6000);
cy.get('[data-cy="op"]').click();
cy.get('.error-message__description').contains(
Expand Down

0 comments on commit 05dce77

Please sign in to comment.