From 3db9ea504aa8a3c0510cd70d9aec94bbcefb4d0c Mon Sep 17 00:00:00 2001 From: Raju Udava Date: Thu, 25 Nov 2021 17:37:43 +0530 Subject: [PATCH] test(cypress/stability): wait for DOM element instead of wait Signed-off-by: Raju Udava --- .../integration/common/7a_create_project_from_excel.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/cypress/integration/common/7a_create_project_from_excel.js b/scripts/cypress/integration/common/7a_create_project_from_excel.js index c3f4ab18f0..a42178c2df 100644 --- a/scripts/cypress/integration/common/7a_create_project_from_excel.js +++ b/scripts/cypress/integration/common/7a_create_project_from_excel.js @@ -119,7 +119,11 @@ export const genTest = (type, xcdb) => { // for each sheet, expand to verify table names & their data types cy.wrap(sheets[i]).find('.mdi-chevron-down').click() - cy.wait(1000) + + // wait for 4 DOM rows to become visible, corresponding to 4 column names in excel + // change to avoid static wait + cy.get('.v-data-table').find('tr:visible').should('have.length', 4) + cy.get('.v-data-table').find('tr:visible').then((row) => { for (let j = 1; j < row.length; j++) {