From 4bf161f1c3837f5a6c618d12cad96f804c88248c Mon Sep 17 00:00:00 2001 From: Raju Udava Date: Wed, 8 Dec 2021 14:44:29 +0530 Subject: [PATCH] test(cypress): prefix for console log Signed-off-by: Raju Udava --- scripts/cypress/integration/common/1c_sql_view.js | 1 + scripts/cypress/plugins/index.js | 2 +- scripts/cypress/support/commands.js | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/cypress/integration/common/1c_sql_view.js b/scripts/cypress/integration/common/1c_sql_view.js index 2a97ae2b9c..dee16b33ae 100644 --- a/scripts/cypress/integration/common/1c_sql_view.js +++ b/scripts/cypress/integration/common/1c_sql_view.js @@ -66,6 +66,7 @@ export const genTest = (type, xcdb) => { cy.openViewsTab("SalesByFilmCategory", 16); cy.closeViewsTab("SalesByFilmCategory"); + // SalesByStore && StaffList contain no entries. Hence marking row count to 0 cy.openViewsTab("SalesByStore", 0); cy.closeViewsTab("SalesByStore"); diff --git a/scripts/cypress/plugins/index.js b/scripts/cypress/plugins/index.js index f4e21e378a..33d1b93d79 100644 --- a/scripts/cypress/plugins/index.js +++ b/scripts/cypress/plugins/index.js @@ -44,7 +44,7 @@ module.exports = (on, config) => { readXlsx: readXlsx.read, readSheetList: readXlsx.sheetList, log(message) { - console.log(message); + console.log(`##Cypress>> ${message}`); return null; }, }); diff --git a/scripts/cypress/support/commands.js b/scripts/cypress/support/commands.js index 6e62bd4c33..2bd23cbfc8 100644 --- a/scripts/cypress/support/commands.js +++ b/scripts/cypress/support/commands.js @@ -110,6 +110,8 @@ Cypress.Commands.add("openOrCreateRestProject", (_args) => { // tn: table name // rc: row count. validate row count if rc!=0 Cypress.Commands.add("openTableTab", (tn, rc) => { + cy.task("log", `[openTableTab] ${tn} ${rc}`); + cy.get(".nc-project-tree") .find(".v-list-item__title:contains(Tables)", { timeout: 10000 }) .should("exist") @@ -135,6 +137,7 @@ Cypress.Commands.add("openTableTab", (tn, rc) => { }); Cypress.Commands.add("closeTableTab", (tn) => { + cy.task("log", `[closeTableTab] ${tn}`); cy.get(`[href="#table||db||${tn}"]`).find("button.mdi-close").click(); });