From 240057b194dcd571e733d57dc62b6fba013ce07e Mon Sep 17 00:00:00 2001 From: Pranav C Date: Sat, 17 Sep 2022 23:20:21 +0530 Subject: [PATCH] chore(cypress): toast wait command fix Signed-off-by: Pranav C --- scripts/cypress/support/commands.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/cypress/support/commands.js b/scripts/cypress/support/commands.js index ee7ba6bb35..0897d177fd 100644 --- a/scripts/cypress/support/commands.js +++ b/scripts/cypress/support/commands.js @@ -374,7 +374,8 @@ Cypress.Commands.add('renameTable', (oldName, newName) => { // }); Cypress.Commands.add('toastWait', (msg) => { - cy.get('.ant-message-notice-content:visible', { timeout: 60000 }).contains(msg).should('exist'); + // cy.get('.ant-message-notice-content:visible', { timout: 30000 }).should('exist') + cy.get(`.ant-message-notice-content:visible:contains("${msg}")`, { timeout: 30000 }).should('exist'); cy.get('.ant-message-notice-content:visible', { timeout: 12000 }).should('not.exist'); });