From a8b84fe19036f3afc170cfa9b40ed57100576b05 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 7 Jul 2022 13:45:32 +0800 Subject: [PATCH] cypress: fix percent test case --- scripts/cypress/integration/common/3f_percent_column.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/cypress/integration/common/3f_percent_column.js b/scripts/cypress/integration/common/3f_percent_column.js index 610f1fc01b..d100f52f29 100644 --- a/scripts/cypress/integration/common/3f_percent_column.js +++ b/scripts/cypress/integration/common/3f_percent_column.js @@ -47,7 +47,9 @@ export const genTest = (apiType, dbType) => { // Configure Default Number fetchParentFromLabel("Default Number (%)"); - cy.getActiveMenu().contains(defaultNumber).click(); + if (defaultNumber) { + cy.getActiveMenu().contains(defaultNumber).click(); + } // Configure Negative if (negative) { @@ -134,7 +136,7 @@ export const genTest = (apiType, dbType) => { } else { mainPage.getRow(index).find(".nc-row-expand-icon").click({ force: true }); } - cy.get(".duration-cell-wrapper > input").first().should('exist').type(cellValue); + cy.get(".percent-cell-wrapper > input").first().should('exist').type(cellValue); cy.getActiveModal().find("button").contains("Save row").click({ force: true }); cy.toastWait("Row updated successfully"); mainPage.getCell(colName, index).find('input').then(($e) => {