diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/Table_Property_ToggleJs_With_Binding_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/Table_Property_ToggleJs_With_Binding_spec.js index 899db65bb3..9fccda65f7 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/Table_Property_ToggleJs_With_Binding_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/Table_Property_ToggleJs_With_Binding_spec.js @@ -18,6 +18,7 @@ describe("Table Widget property pane feature validation", function() { cy.get(widgetsPage.toggleTextAlign) .first() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdate("tabledata", testdata.bindingAlign); cy.get(commonlocators.editPropCrossButton).click({ force: true }); @@ -32,10 +33,12 @@ describe("Table Widget property pane feature validation", function() { cy.get(widgetsPage.toggleTextAlign) .first() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.get(widgetsPage.textSize) .last() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.selectTextSize("Heading 1"); cy.get(commonlocators.editPropCrossButton).click({ force: true }); @@ -48,6 +51,7 @@ describe("Table Widget property pane feature validation", function() { cy.get(widgetsPage.toggleTextSize) .first() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdate("tabledata", testdata.bindingSize); cy.get(commonlocators.editPropCrossButton).click({ force: true }); @@ -61,10 +65,12 @@ describe("Table Widget property pane feature validation", function() { cy.get(widgetsPage.toggleTextSize) .first() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.get(widgetsPage.toggleVerticalAlig) .first() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdate("tabledata", testdata.bindingVerticalAlig); cy.get(commonlocators.editPropCrossButton).click({ force: true }); @@ -78,10 +84,12 @@ describe("Table Widget property pane feature validation", function() { cy.get(widgetsPage.toggleVerticalAlig) .first() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.get(widgetsPage.toggleTextStyle) .first() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdate("tabledata", testdata.bindingStyle); cy.get(commonlocators.editPropCrossButton).click({ force: true }); @@ -95,10 +103,12 @@ describe("Table Widget property pane feature validation", function() { cy.get(widgetsPage.toggleVerticalAlig) .first() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.get(widgetsPage.toggleJsColor) .first() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdate("tabledata", testdata.bindingTextColor); cy.get(commonlocators.editPropCrossButton).click({ force: true }); @@ -113,10 +123,12 @@ describe("Table Widget property pane feature validation", function() { cy.get(widgetsPage.toggleJsColor) .first() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.get(widgetsPage.toggleJsBcgColor) .first() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdate("tabledata", testdata.bindingTextColor); cy.get(commonlocators.editPropCrossButton).click({ force: true }); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/Table_Derived_Column_Data_validation_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/Table_Derived_Column_Data_validation_spec.js index 426d0095cc..ebc6b6de6d 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/Table_Derived_Column_Data_validation_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/Table_Derived_Column_Data_validation_spec.js @@ -34,20 +34,17 @@ describe("Test Create Api and Bind to Table widget", function() { it("Table widget toggle test for background color", function() { cy.editColumn("id"); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.get(widgetsPage.toggleJsBcgColor) .first() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdate("tabledata", "Green"); cy.get(commonlocators.editPropCrossButton).click(); cy.wait("@updateLayout"); - cy.readTabledataValidateCSS( - "1", - "0", - "background-color", - "rgb(0, 128, 0)", - ); + cy.readTabledataValidateCSS("1", "0", "background-color", "rgb(0, 128, 0)"); }); it("Edit column name and validate test for computed value based on column type selected", function() { diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/Table_GeneralProperty_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/Table_GeneralProperty_spec.js index 1e5c66a067..f4407ab437 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/Table_GeneralProperty_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/Table_GeneralProperty_spec.js @@ -55,6 +55,7 @@ describe("Table Widget property pane feature validation", function() { cy.get(widgetsPage.toggleTextAlign) .first() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdate("tabledata", testdata.bindingGenAlign); cy.get(commonlocators.editPropCrossButton).click({ force: true }); @@ -69,14 +70,17 @@ describe("Table Widget property pane feature validation", function() { cy.get(widgetsPage.toggleTextAlign) .first() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.get(widgetsPage.textSize) .last() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.selectTextSize("Heading 1"); cy.readTabledataValidateCSS("0", "0", "font-size", "24px"); cy.get(commonlocators.editPropCrossButton).click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.readTabledataValidateCSS("0", "0", "font-size", "24px"); }); @@ -100,6 +104,7 @@ describe("Table Widget property pane feature validation", function() { .first() .click({ force: true }); cy.xpath(widgetsPage.greenColor).click(); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); cy.wait("@updateLayout"); cy.readTabledataValidateCSS("1", "0", "color", "rgb(3, 179, 101)"); @@ -111,6 +116,7 @@ describe("Table Widget property pane feature validation", function() { cy.get(widgetsPage.backgroundColor) .first() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); cy.xpath(widgetsPage.greenColor) .first() diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/Table_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/Table_spec.js index 2917649cd1..1bfbed6a6b 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/Table_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/Table_spec.js @@ -72,17 +72,20 @@ describe("Table Widget Functionality", function() { cy.get(publish.searchInput) .first() .type(tabData); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); cy.readTabledataPublish("1", "3").then((tabData) => { const tabValue = tabData; expect(tabValue).to.be.equal("Lindsay Ferguson"); }); cy.get(publish.downloadBtn).click(); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(5000); cy.get(publish.searchInput) .first() .clear() .type("7434532"); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.readTabledataPublish("3", "3").then((tabData) => { const tabValue = tabData; @@ -95,6 +98,7 @@ describe("Table Widget Functionality", function() { cy.get(publish.searchInput) .first() .clear(); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.isSelectRow(1); cy.readTabledataPublish("1", "3").then((tabData) => { @@ -111,6 +115,7 @@ describe("Table Widget Functionality", function() { .contains("is exactly") .click(); cy.get(publish.inputValue).type(tabValue); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); cy.get(publish.canvas) .first() @@ -121,6 +126,7 @@ describe("Table Widget Functionality", function() { }); cy.get(publish.filterBtn).click(); cy.get(publish.removeFilter).click(); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); cy.readTabledataPublish("0", "3").then((tabData) => { const tabValue = tabData; @@ -148,6 +154,7 @@ describe("Table Widget Functionality", function() { .contains("contains") .click(); cy.get(publish.inputValue).type("Lindsay"); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); cy.get(publish.canvas) .first() @@ -158,6 +165,7 @@ describe("Table Widget Functionality", function() { }); cy.get(publish.filterBtn).click(); cy.get(publish.removeFilter).click(); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); cy.readTabledataPublish("0", "3").then((tabData) => { const tabValue = tabData; @@ -185,6 +193,7 @@ describe("Table Widget Functionality", function() { .contains("starts with") .click(); cy.get(publish.inputValue).type("Lindsay"); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); cy.get(publish.canvas) .first() @@ -195,6 +204,7 @@ describe("Table Widget Functionality", function() { }); cy.get(publish.filterBtn).click(); cy.get(publish.removeFilter).click(); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); cy.readTabledataPublish("0", "3").then((tabData) => { const tabValue = tabData; @@ -222,6 +232,7 @@ describe("Table Widget Functionality", function() { .contains("ends with") .click(); cy.get(publish.inputValue).type("Ferguson"); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); cy.get(publish.canvas) .first() @@ -232,6 +243,7 @@ describe("Table Widget Functionality", function() { }); cy.get(publish.filterBtn).click(); cy.get(publish.removeFilter).click(); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); cy.readTabledataPublish("0", "3").then((tabData) => { const tabValue = tabData; diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GlobalSearch/GlobalSearch_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GlobalSearch/GlobalSearch_spec.js index 1d44b9b5b2..ede80d5a1b 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GlobalSearch/GlobalSearch_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GlobalSearch/GlobalSearch_spec.js @@ -11,12 +11,14 @@ describe("GlobalSearch", function() { it("showsAndHidesUsingKeyboardShortcuts", () => { const isMac = Cypress.platform === "darwin"; if (isMac) { + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get("body").type("{cmd}{k}"); cy.get(commonlocators.globalSearchModal); cy.get("body").type("{esc}"); cy.get(commonlocators.globalSearchModal).should("not.exist"); } else { + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get("body").type("{ctrl}{k}"); cy.get(commonlocators.globalSearchModal); @@ -28,6 +30,7 @@ describe("GlobalSearch", function() { it("selectsWidget", () => { const table = dsl.dsl.children[2]; cy.get(commonlocators.globalSearchTrigger).click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.get(commonlocators.globalSearchInput).type(table.widgetName); cy.get("body").type("{enter}"); @@ -45,12 +48,14 @@ describe("GlobalSearch", function() { cy.CreateAPI("SomeApi"); cy.get(commonlocators.globalSearchTrigger).click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.get(commonlocators.globalSearchClearInput).click({ force: true }); cy.get(commonlocators.globalSearchInput).type("Page1"); cy.get("body").type("{enter}"); cy.get(commonlocators.globalSearchTrigger).click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.get(commonlocators.globalSearchClearInput).click({ force: true }); cy.get(commonlocators.globalSearchInput).type("SomeApi"); @@ -79,12 +84,14 @@ describe("GlobalSearch", function() { .click(); cy.get(commonlocators.globalSearchTrigger).click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); // modal open transition should be deterministic cy.get(commonlocators.globalSearchClearInput).click({ force: true }); cy.get(commonlocators.globalSearchInput).type("Page1"); cy.get("body").type("{enter}"); cy.get(commonlocators.globalSearchTrigger).click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); // modal open transition should be deterministic cy.get(commonlocators.globalSearchClearInput).click({ force: true }); cy.get(commonlocators.globalSearchInput).type(expectedDatasource.name); @@ -98,6 +105,7 @@ describe("GlobalSearch", function() { it("navigatesToPage", () => { cy.Createpage("NewPage"); cy.get(commonlocators.globalSearchTrigger).click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.get(commonlocators.globalSearchClearInput).click({ force: true }); cy.get(commonlocators.globalSearchInput).type("Page1"); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/LayoutWidgets/Tab_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/LayoutWidgets/Tab_spec.js index 33563bfa14..c777b51360 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/LayoutWidgets/Tab_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/LayoutWidgets/Tab_spec.js @@ -40,6 +40,7 @@ describe("Tab widget test", function() { cy.get(Layoutpage.tabWidget) .contains("Day") .should("not.exist"); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(300); cy.openPropertyPane("tabswidget"); /** diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Onboarding/Onboarding_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Onboarding/Onboarding_spec.js index 13f51933cf..b80bdbe14b 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Onboarding/Onboarding_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Onboarding/Onboarding_spec.js @@ -52,6 +52,7 @@ describe("Onboarding", function() { cy.dragAndDropToCanvas("tablewidget", { x: 30, y: -30 }); // wait for animation duration + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); // Click on "Show me how" and then click on cheat button cy.get(".t--onboarding-action") @@ -62,6 +63,7 @@ describe("Onboarding", function() { .click(); // wait for animation duration + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.contains(".t--onboarding-helper-title", "Capture Hero Updates"); cy.get(".t--onboarding-cheat-action").click(); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/CreateOrgTests_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/CreateOrgTests_spec.js index d3a56e8673..4740cd7378 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/CreateOrgTests_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/CreateOrgTests_spec.js @@ -36,6 +36,7 @@ describe("Create new org and share with a user", function() { it("login as invited user and then validate viewer privilage", function() { cy.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1")); cy.get(homePage.searchInput).type(appid); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get(homePage.appsContainer).contains(orgid); cy.xpath(homePage.ShareBtn) @@ -58,6 +59,7 @@ describe("Create new org and share with a user", function() { 200, ); cy.get(homePage.searchInput).type(appid); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.deleteUserFromOrg(orgid, Cypress.env("TESTUSERNAME1")); cy.updateUserRoleForOrg( @@ -71,6 +73,7 @@ describe("Create new org and share with a user", function() { it("login as invited user and then validate developer privilage", function() { cy.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1")); cy.get(homePage.searchInput).type(appid); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get(homePage.appsContainer).contains(orgid); cy.xpath(homePage.ShareBtn) @@ -95,6 +98,7 @@ describe("Create new org and share with a user", function() { 200, ); cy.get(homePage.searchInput).type(appid); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.deleteUserFromOrg(orgid, Cypress.env("TESTUSERNAME1")); cy.updateUserRoleForOrg( @@ -108,6 +112,7 @@ describe("Create new org and share with a user", function() { it("login as invited user and then validate administrator privilage", function() { cy.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1")); cy.get(homePage.searchInput).type(appid); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get(homePage.appsContainer).contains(orgid); cy.inviteUserForOrg( @@ -127,6 +132,7 @@ describe("Create new org and share with a user", function() { 200, ); cy.get(homePage.searchInput).type(appid); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.navigateToOrgSettings(orgid); cy.get(homePage.emailList).then(function($list) { diff --git a/app/client/cypress/support/commands.js b/app/client/cypress/support/commands.js index 192a6fc534..3e42b2b8ed 100644 --- a/app/client/cypress/support/commands.js +++ b/app/client/cypress/support/commands.js @@ -227,6 +227,7 @@ Cypress.Commands.add("CreateAppForOrg", (orgName, appname) => { "response.body.responseMeta.status", 201, ); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.get(homePage.applicationName).type(appname + "{enter}"); cy.wait("@updateApplication").should( @@ -246,6 +247,7 @@ Cypress.Commands.add("CreateAppInFirstListedOrg", (appname) => { 201, ); cy.get("#loading").should("not.exist"); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.get(homePage.applicationName).type(appname + "{enter}"); @@ -323,6 +325,7 @@ Cypress.Commands.add("LoginFromAPI", (uname, pword) => { Cypress.Commands.add("DeleteApp", (appName) => { cy.get(commonlocators.homeIcon).click({ force: true }); cy.get(homePage.searchInput).type(appName); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get(homePage.applicationCard) .first() @@ -345,6 +348,7 @@ Cypress.Commands.add("DeletepageFromSideBar", () => { cy.get(pages.deletePage) .first() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); }); @@ -354,6 +358,7 @@ Cypress.Commands.add("LogOut", () => { Cypress.Commands.add("NavigateToHome", () => { cy.get(commonlocators.homeIcon).click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.wait("@applications").should( "have.nested.property", @@ -375,6 +380,7 @@ Cypress.Commands.add("NavigateToWidgets", (pageName) => { Cypress.Commands.add("SearchApp", (appname) => { cy.get(homePage.searchInput).type(appname); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get(homePage.applicationCard) .first() @@ -391,6 +397,7 @@ Cypress.Commands.add("SearchEntity", (apiname1, apiname2) => { cy.get(commonlocators.entityExplorersearch) .clear() .type(apiname1); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); cy.get( commonlocators.entitySearchResult.concat(apiname1).concat("')"), @@ -405,6 +412,7 @@ Cypress.Commands.add("GlobalSearchEntity", (apiname1) => { cy.get(commonlocators.entityExplorersearch) .clear() .type(apiname1); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); cy.get( commonlocators.entitySearchResult.concat(apiname1).concat("')"), @@ -448,6 +456,7 @@ Cypress.Commands.add("CreateAPI", (apiname) => { cy.WaitAutoSave(); // Added because api name edit takes some time to // reflect in api sidebar after the call passes. + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); }); @@ -483,6 +492,7 @@ Cypress.Commands.add("EditApiNameFromExplorer", (apiname) => { .type(apiname, { force: true }) .should("have.value", apiname) .blur(); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(3000); }); @@ -506,6 +516,7 @@ Cypress.Commands.add( Cypress.Commands.add("WaitAutoSave", () => { // wait for save query to trigger + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.wait("@saveAction"); //cy.wait("@postExecute"); @@ -572,6 +583,7 @@ Cypress.Commands.add("SearchEntityandOpen", (apiname1) => { cy.get(commonlocators.entityExplorersearch) .clear() .type(apiname1); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); cy.get( commonlocators.entitySearchResult.concat(apiname1).concat("')"), @@ -727,6 +739,7 @@ Cypress.Commands.add("selectPaginationType", (option) => { }); Cypress.Commands.add("clickTest", (testbutton) => { + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.wait("@saveAction"); cy.get(testbutton) @@ -862,10 +875,12 @@ Cypress.Commands.add("RenameEntity", (value) => { .last() .click({ force: true }); cy.get(apiwidget.renameEntity).click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get(explorer.editEntity) .last() .type(value, { force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(3000); }); @@ -1099,6 +1114,7 @@ Cypress.Commands.add("EvaluateDataType", (dataType) => { }); Cypress.Commands.add("EvaluateCurrentValue", (currentValue) => { + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get(commonlocators.evaluatedCurrentValue) .should("be.visible") @@ -1109,6 +1125,7 @@ Cypress.Commands.add("PublishtheApp", () => { cy.server(); cy.route("POST", "/api/v1/applications/publish/*").as("publishApp"); // Wait before publish + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.assertPageSave(); @@ -1155,6 +1172,7 @@ Cypress.Commands.add("testCodeMirror", (value) => { force: true, parseSpecialCharSequences: false, }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get(".CodeMirror textarea") .first() @@ -1184,6 +1202,7 @@ Cypress.Commands.add("updateComputedValue", (value) => { parseSpecialCharSequences: false, }); }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); }); @@ -1208,6 +1227,7 @@ Cypress.Commands.add("testCodeMirrorLast", (value) => { force: true, parseSpecialCharSequences: false, }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(200); cy.get(".CodeMirror textarea") .last() @@ -1232,6 +1252,7 @@ Cypress.Commands.add("testJsontext", (endp, value, paste = true) => { force: true, }); } + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); cy.get(".t--property-control-" + endp + " .CodeMirror textarea") .first() @@ -1247,6 +1268,7 @@ Cypress.Commands.add("testJsontext", (endp, value, paste = true) => { } }); }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); }); @@ -1272,6 +1294,7 @@ Cypress.Commands.add("toggleJsAndUpdate", (endp, value) => { parseSpecialCharSequences: false, }); }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(200); }); @@ -1318,6 +1341,7 @@ Cypress.Commands.add("hideColumn", (colId) => { cy.get("[data-rbd-draggable-id='" + colId + "'] .t--show-column-btn").click({ force: true, }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); }); @@ -1335,6 +1359,7 @@ Cypress.Commands.add("addColumn", (colId) => { cy.get(widgetsPage.addColumn) .should("be.visible") .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(3000); cy.get(widgetsPage.defaultColName).clear({ force: true, @@ -1344,6 +1369,7 @@ Cypress.Commands.add("addColumn", (colId) => { Cypress.Commands.add("editColumn", (colId) => { cy.get("[data-rbd-draggable-id='" + colId + "'] .t--edit-column-btn").click(); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1500); }); @@ -1422,6 +1448,7 @@ Cypress.Commands.add("enterActionValue", (value) => { force: true, parseSpecialCharSequences: false, }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(200); }); }); @@ -1449,6 +1476,7 @@ Cypress.Commands.add("enterNavigatePageName", (value) => { force: true, parseSpecialCharSequences: false, }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(200); cy.get(".CodeMirror textarea") .first() @@ -1486,6 +1514,7 @@ Cypress.Commands.add("Createpage", (Pagename) => { "response.body.responseMeta.status", 201, ); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.xpath(pages.popover) .last() @@ -1496,6 +1525,7 @@ Cypress.Commands.add("Createpage", (Pagename) => { .type("{Enter}"); pageidcopy = Pagename; cy.get("#loading").should("not.exist"); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); }); @@ -1509,6 +1539,7 @@ Cypress.Commands.add("Deletepage", (Pagename) => { ).click({ force: true }); cy.get(pages.Menuaction).click({ force: true }); cy.get(pages.Delete).click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); }); @@ -1581,6 +1612,7 @@ Cypress.Commands.add("optionValue", (value, value2) => { .type(value2); }); Cypress.Commands.add("dropdownDynamic", (text) => { + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get("ul.bp3-menu") .contains(text) @@ -1589,6 +1621,7 @@ Cypress.Commands.add("dropdownDynamic", (text) => { }); Cypress.Commands.add("dropdownDynamicUpdated", (text) => { + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get(commonlocators.dropdownmenu) .contains(text) @@ -1948,6 +1981,7 @@ Cypress.Commands.add("openPropertyPane", (widgetType) => { cy.get(`${selector}:first-of-type .t--widget-propertypane-toggle`) .first() .click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); }); @@ -2197,9 +2231,11 @@ Cypress.Commands.add("ValidatePaginateResponseUrlData", (runTestCss) => { cy.RunAPI(); cy.get(ApiEditor.apiPaginationNextTest).click(); cy.wait("@postExecute"); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get(runTestCss).click(); cy.wait("@postExecute"); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get(ApiEditor.formActionButtons).should("be.visible"); cy.get(ApiEditor.ApiRunBtn).should("not.be.disabled");