From 51295745c1c4033ddbd52386d5b80433d977e72f Mon Sep 17 00:00:00 2001 From: jeffgreiner-eaton Date: Wed, 12 Jun 2024 10:35:17 -0400 Subject: [PATCH] add waits on fast run test --- cypress/integration/form-validation/fixed-length.spec.js | 2 +- cypress/integration/form-validation/in-list.spec.js | 2 +- cypress/integration/form-validation/phone-number.spec.js | 8 ++++---- .../integration/view-port-test/toolbar-view-ports.spec.js | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cypress/integration/form-validation/fixed-length.spec.js b/cypress/integration/form-validation/fixed-length.spec.js index 2e420332..6e5752e7 100644 --- a/cypress/integration/form-validation/fixed-length.spec.js +++ b/cypress/integration/form-validation/fixed-length.spec.js @@ -44,6 +44,6 @@ describe('Form validation fixed length', () => { it('should display success with correct passcode', () => { cy.get('[data-cy=passcode]').type('123456') - cy.get('[data-cy=success]').should('be.visible') + cy.get('[data-cy=success]', { timeout: 10000 }).should('be.visible') }); }); \ No newline at end of file diff --git a/cypress/integration/form-validation/in-list.spec.js b/cypress/integration/form-validation/in-list.spec.js index 9ad4837c..5172f02f 100644 --- a/cypress/integration/form-validation/in-list.spec.js +++ b/cypress/integration/form-validation/in-list.spec.js @@ -15,7 +15,7 @@ describe('Form validation in a list', () => { }); it('should display unselected toggle', () => { - cy.get('.mat-slide-toggle-bar') + cy.get('.mat-slide-toggle-bar', { timeout: 10000 }) .find('input') .filter('#mat-slide-toggle-1-input') .should('have.attr', 'aria-checked', 'false') diff --git a/cypress/integration/form-validation/phone-number.spec.js b/cypress/integration/form-validation/phone-number.spec.js index 1e794fcc..b90a4bb2 100644 --- a/cypress/integration/form-validation/phone-number.spec.js +++ b/cypress/integration/form-validation/phone-number.spec.js @@ -16,22 +16,22 @@ describe('Form validation phone number format', () => { cy.get('body').click(top, {force: true}) cy.get('[data-cy=phone-helper-error]').should('contain', 'Please enter a valid U.S. phone number.') cy.get('[data-cy=country-selector]').click() - cy.get('#mat-select-0-panel').contains('CA').click() + cy.get('#mat-select-0-panel', { timeout: 10000 }).contains('CA').click() cy.get('[data-cy=phone-input]').click() cy.get('body').click(top, {force: true}) cy.get('[data-cy=phone-helper-error]').should('contain', 'Please enter a valid Canadian phone number.') cy.get('[data-cy=country-selector]').click() - cy.get('#mat-select-0-panel').contains('RU').click() + cy.get('#mat-select-0-panel', { timeout: 10000 }).contains('RU').click() cy.get('[data-cy=phone-input]').click() cy.get('body').click(top, {force: true}) cy.get('[data-cy=phone-helper-error]').should('contain', 'Please enter a valid Russian phone number.') cy.get('[data-cy=country-selector]').click() - cy.get('#mat-select-0-panel').contains('EG').click() + cy.get('#mat-select-0-panel', { timeout: 10000 }).contains('EG').click() cy.get('[data-cy=phone-input]').click() cy.get('body').click(top, {force: true}) cy.get('[data-cy=phone-helper-error]').should('contain', 'Please enter a valid Egyptian phone number.') cy.get('[data-cy=country-selector]').click() - cy.get('#mat-select-0-panel').contains('IN').click() + cy.get('#mat-select-0-panel', { timeout: 10000 }).contains('IN').click() cy.get('[data-cy=phone-input]').click() cy.get('body').click(top, {force: true}) cy.get('[data-cy=phone-helper-error]').should('contain', 'Please enter a valid Indian phone number.') diff --git a/cypress/integration/view-port-test/toolbar-view-ports.spec.js b/cypress/integration/view-port-test/toolbar-view-ports.spec.js index 1c598af3..ed1afd3e 100644 --- a/cypress/integration/view-port-test/toolbar-view-ports.spec.js +++ b/cypress/integration/view-port-test/toolbar-view-ports.spec.js @@ -17,7 +17,7 @@ describe('Hidden toolbar menu displays on small devices', () => { it(`should display menu icon ${url}`, () => { cy.visit(url); cy.viewport(size); - cy.get('[data-cy=toolbar-menu]') + cy.get('[data-cy=toolbar-menu], { timeout: 10000 }') .should('be.visible') }); });