diff --git a/app/client/.eslintrc.json b/app/client/.eslintrc.json index 714a99e8f3..31f98168e9 100644 --- a/app/client/.eslintrc.json +++ b/app/client/.eslintrc.json @@ -6,7 +6,6 @@ "extends": [ "plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react "plugin:@typescript-eslint/recommended", - "prettier/@typescript-eslint", "plugin:cypress/recommended", // Note: Please keep this as the last config to make sure that this (and by extension our .prettierrc file) overrides all configuration above it // https://www.npmjs.com/package/eslint-plugin-prettier#recommended-configuration @@ -21,6 +20,8 @@ }, "rules": { "@typescript-eslint/no-explicit-any": 0, + // enforce `import type` for all type-only imports so the bundler knows to erase them + "@typescript-eslint/consistent-type-imports": "error", "react-hooks/rules-of-hooks": "error", "@typescript-eslint/no-use-before-define": 0, "@typescript-eslint/no-var-requires": 0, diff --git a/app/client/.prettierrc b/app/client/.prettierrc index 190c8dcecc..b42e33db11 100644 --- a/app/client/.prettierrc +++ b/app/client/.prettierrc @@ -5,6 +5,5 @@ "semi": true, "singleQuote": false, "trailingComma": "all", - "parser": "typescript", "arrowParens": "always" } diff --git a/app/client/cypress/integration/Regression_TestSuite/Application/CommunityIssues_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/Application/CommunityIssues_Spec.ts index 05f90fd1c9..2c5d7f21fe 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/CommunityIssues_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/Application/CommunityIssues_Spec.ts @@ -11,8 +11,8 @@ let homePage = ObjectsRegistry.HomePage, deployMode = ObjectsRegistry.DeployMode, propPane = ObjectsRegistry.PropertyPane; -describe("AForce - Community Issues page validations", function() { - before(function() { +describe("AForce - Community Issues page validations", function () { + before(function () { agHelper.ClearLocalStorageCache(); }); @@ -66,8 +66,9 @@ describe("AForce - Community Issues page validations", function() { ee.SelectEntityByName("Table1", "Widgets"); agHelper.AssertExistingToggleState("serversidepagination", "checked"); - propPane.ValidatePropertyFieldValue("Default Selected Row", "0") - .then(($selectedRow: any) => { + propPane + .ValidatePropertyFieldValue("Default Selected Row", "0") + .then(($selectedRow: any) => { selectedRow = Number($selectedRow); table.AssertSelectedRow(selectedRow); }); @@ -237,20 +238,18 @@ describe("AForce - Community Issues page validations", function() { }); } cy.wrap(filterTitle).as("filterTitleText"); // alias it for later - cy.get("@filterTitleText") - .its("length") - .should("eq", 2); + cy.get("@filterTitleText").its("length").should("eq", 2); table.RemoveFilterNVerify("Question", true, false); //Two filters - AND table.OpenNFilterTable("Votes", "greater than", "2"); - table.ReadTableRowColumnData(0, 1,"v1", 3000).then(($cellData) => { + table.ReadTableRowColumnData(0, 1, "v1", 3000).then(($cellData) => { expect($cellData).to.eq("Combine queries from different datasources"); }); table.OpenNFilterTable("Title", "contains", "button", "AND", 1); - table.ReadTableRowColumnData(0, 1,"v1", 3000).then(($cellData) => { + table.ReadTableRowColumnData(0, 1, "v1", 3000).then(($cellData) => { expect($cellData).to.eq( "Change the video in the video player with a button click", ); @@ -262,9 +261,7 @@ describe("AForce - Community Issues page validations", function() { // agHelper.DeployApp() // table.WaitUntilTableLoad() - cy.get(table._addIcon) - .closest("div") - .click(); + cy.get(table._addIcon).closest("div").click(); agHelper.AssertElementVisible(locator._modal); agHelper.SelectFromDropDown("Suggestion", "t--modal-widget"); @@ -297,7 +294,7 @@ describe("AForce - Community Issues page validations", function() { table.SearchTable("Suggestion", 2); table.WaitUntilTableLoad(); - table.ReadTableRowColumnData(0, 0,"v1", 4000).then((cellData) => { + table.ReadTableRowColumnData(0, 0, "v1", 4000).then((cellData) => { expect(cellData).to.be.equal("Suggestion"); }); @@ -358,7 +355,7 @@ describe("AForce - Community Issues page validations", function() { ); agHelper.ClickButton("Save"); agHelper.Sleep(2000); - table.ReadTableRowColumnData(0, 0,"v1",2000).then((cellData) => { + table.ReadTableRowColumnData(0, 0, "v1", 2000).then((cellData) => { expect(cellData).to.be.equal("Troubleshooting"); }); @@ -376,9 +373,7 @@ describe("AForce - Community Issues page validations", function() { table.SelectTableRow(0); agHelper.AssertElementVisible(locator._widgetInDeployed("tabswidget")); agHelper.Sleep(); - cy.get(table._trashIcon) - .closest("div") - .click({ force: true }); + cy.get(table._trashIcon).closest("div").click({ force: true }); agHelper.WaitUntilEleDisappear(locator._widgetInDeployed("tabswidget")); agHelper.AssertElementAbsence(locator._widgetInDeployed("tabswidget")); table.WaitForTableEmpty(); diff --git a/app/client/cypress/integration/Regression_TestSuite/Application/CurrencyInputIssue_Spec.js b/app/client/cypress/integration/Regression_TestSuite/Application/CurrencyInputIssue_Spec.js index 58337671f3..a93e9811ab 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/CurrencyInputIssue_Spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/CurrencyInputIssue_Spec.js @@ -11,8 +11,8 @@ const widgetName = "currencyinputwidget"; const wiggetClass = `.t--widget-${widgetName}`; const widgetInput = `${wiggetClass} input`; -describe("Currency Input Issue", function() { - it("1. Import application json &should check that the widget input is not showing any error", function() { +describe("Currency Input Issue", function () { + it("1. Import application json &should check that the widget input is not showing any error", function () { cy.visit("/applications"); homePage.ImportApp("CurrencyInputIssueExport.json"); cy.wait("@importNewApplication").then((interception) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/Application/EchoApiCMS_spec.js b/app/client/cypress/integration/Regression_TestSuite/Application/EchoApiCMS_spec.js index 7563bec88a..2629a298f2 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/EchoApiCMS_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/EchoApiCMS_spec.js @@ -1,7 +1,7 @@ import appPage from "../../../locators/CMSApplocators"; import * as _ from "../../../support/Objects/ObjectsCore"; -describe("Content Management System App", function() { +describe("Content Management System App", function () { before(() => { _.homePage.NavigateToHome(); _.agHelper.GenerateUUID(); @@ -15,7 +15,7 @@ describe("Content Management System App", function() { }); let repoName; - it("1.Create Get echo Api call", function() { + it("1.Create Get echo Api call", function () { cy.fixture("datasources").then((datasourceFormData) => { _.apiPage.CreateAndFillApi(datasourceFormData["echoApiUrl"], "get_data"); // creating get request using echo @@ -29,7 +29,7 @@ describe("Content Management System App", function() { }); }); - it("2. Create Post echo Api call", function() { + it("2. Create Post echo Api call", function () { cy.fixture("datasources").then((datasourceFormData) => { _.apiPage.CreateAndFillApi( datasourceFormData["echoApiUrl"], @@ -48,7 +48,7 @@ describe("Content Management System App", function() { }); }); - it("3. Create Delete echo Api call", function() { + it("3. Create Delete echo Api call", function () { cy.fixture("datasources").then((datasourceFormData) => { _.apiPage.CreateAndFillApi( datasourceFormData["echoApiUrl"], @@ -67,14 +67,12 @@ describe("Content Management System App", function() { }); }); - it("4. Send mail and verify post request body", function() { + it("4. Send mail and verify post request body", function () { // navigating to canvas cy.xpath(appPage.pagebutton).click(); cy.get(appPage.submitButton).should("be.visible"); cy.xpath("//span[text()='3']").click({ force: true }); - cy.get(appPage.mailButton) - .closest("div") - .click(); + cy.get(appPage.mailButton).closest("div").click(); // verifying the mail to send and asserting post call's response cy.xpath(appPage.sendMailText).should("be.visible"); cy.xpath("//input[@value='Curt50@gmail.com']").should("be.visible"); @@ -83,12 +81,8 @@ describe("Content Management System App", function() { .last() .find("textarea") .type("Task completed", { force: true }); - cy.get(appPage.confirmButton) - .closest("div") - .click({ force: true }); - cy.get(appPage.closeButton) - .closest("div") - .click({ force: true }); + cy.get(appPage.confirmButton).closest("div").click({ force: true }); + cy.get(appPage.closeButton).closest("div").click({ force: true }); cy.xpath(appPage.pagebutton).click({ force: true }); //cy.xpath(appPage.datasourcesbutton).click({ force: true }); cy.CheckAndUnfoldEntityItem("Queries/JS"); @@ -98,19 +92,15 @@ describe("Content Management System App", function() { cy.ResponseCheck("Curt50@gmail.com"); }); - it("5. Delete proposal and verify delete request body", function() { + it("5. Delete proposal and verify delete request body", function () { // navigating back to canvas cy.xpath(appPage.pagebutton).click({ force: true }); - cy.get(appPage.submitButton) - .closest("div") - .should("be.visible"); + cy.get(appPage.submitButton).closest("div").should("be.visible"); cy.xpath("//span[text()='Dan.Wyman@hotmail.com']").click({ force: true }); // deleting the proposal and asserting delete call's response cy.xpath(appPage.deleteButton).click({ force: true }); cy.xpath(appPage.deleteTaskText).should("be.visible"); - cy.get(appPage.confirmButton) - .closest("div") - .click({ force: true }); + cy.get(appPage.confirmButton).closest("div").click({ force: true }); cy.xpath(appPage.pagebutton).click({ force: true }); //cy.xpath(appPage.datasourcesbutton).click({ force: true }); cy.xpath(appPage.deleteApi).click({ force: true }); @@ -131,21 +121,15 @@ describe("Content Management System App", function() { cy.xpath("//span[text()='Curt50@gmail.com']") .should("be.visible") .click({ force: true }); - cy.get(appPage.mailButton) - .closest("div") - .click(); + cy.get(appPage.mailButton).closest("div").click(); cy.xpath(appPage.sendMailText).should("be.visible"); cy.xpath(appPage.subjectField).type("Test"); cy.get(appPage.contentField) .last() .find("textarea") .type("Task completed", { force: true }); - cy.get(appPage.confirmButton) - .closest("div") - .click({ force: true }); - cy.get(appPage.closeButton) - .closest("div") - .click({ force: true }); + cy.get(appPage.confirmButton).closest("div").click({ force: true }); + cy.get(appPage.closeButton).closest("div").click({ force: true }); _.deployMode.NavigateBacktoEditor(); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/Application/ImportExportForkApplication_spec.js b/app/client/cypress/integration/Regression_TestSuite/Application/ImportExportForkApplication_spec.js index 17a5409e02..b1de318c84 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/ImportExportForkApplication_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/ImportExportForkApplication_spec.js @@ -1,16 +1,14 @@ const homePage = require("../../../locators/HomePage"); const reconnectDatasourceModal = require("../../../locators/ReconnectLocators"); -describe("Import, Export and Fork application and validate data binding", function() { +describe("Import, Export and Fork application and validate data binding", function () { let workspaceId; let newWorkspaceName; let appName; - it("1. Import application from json and validate data on pageload", function() { + it("1. Import application from json and validate data on pageload", function () { // import application cy.get(homePage.homeIcon).click(); - cy.get(homePage.optionsIcon) - .first() - .click(); + cy.get(homePage.optionsIcon).first().click(); cy.get(homePage.workspaceImportAppOption).click({ force: true }); cy.get(homePage.workspaceImportAppModal).should("be.visible"); cy.xpath(homePage.uploadLogo).attachFile("forkedApp.json"); @@ -38,9 +36,7 @@ describe("Import, Export and Fork application and validate data binding", functi force: true, }); cy.wait(2000); - cy.get(homePage.applicationName) - .clear() - .type(appName); + cy.get(homePage.applicationName).clear().type(appName); cy.get("body").click(0, 0); cy.wait("@updateApplication").should( "have.nested.property", @@ -59,17 +55,13 @@ describe("Import, Export and Fork application and validate data binding", functi }); }); - it("2. Fork application and validate data binding for the widgets", function() { + it("2. Fork application and validate data binding for the widgets", function () { // fork application cy.get(homePage.homeIcon).click(); cy.get(homePage.searchInput).type(`${appName}`); cy.wait(3000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); cy.get(homePage.forkAppFromMenu).click({ force: true }); cy.get(homePage.forkAppWorkspaceButton).click({ force: true }); cy.wait(4000); @@ -81,18 +73,12 @@ describe("Import, Export and Fork application and validate data binding", functi cy.xpath("//span[text()='due']").should("be.visible"); }); - it("3. Export and import application and validate data binding for the widgets", function() { + it("3. Export and import application and validate data binding for the widgets", function () { cy.NavigateToHome(); - cy.get(homePage.searchInput) - .clear() - .type(`${appName}`); + cy.get(homePage.searchInput).clear().type(`${appName}`); cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); // export application cy.get(homePage.exportAppFromMenu).click({ force: true }); cy.get(homePage.searchInput).clear(); diff --git a/app/client/cypress/integration/Regression_TestSuite/Application/MongoDBShoppingCart_spec.js b/app/client/cypress/integration/Regression_TestSuite/Application/MongoDBShoppingCart_spec.js index 5703536860..10713db088 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/MongoDBShoppingCart_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/MongoDBShoppingCart_spec.js @@ -6,7 +6,7 @@ const formControls = require("../../../locators/FormControl.json"); import * as _ from "../../../support/Objects/ObjectsCore"; let repoName; -describe("Shopping cart App", function() { +describe("Shopping cart App", function () { let datasourceName; before(() => { @@ -21,7 +21,7 @@ describe("Shopping cart App", function() { }); }); - it("1. Create MongoDB datasource and add Insert, Find, Update and Delete queries", function() { + it("1. Create MongoDB datasource and add Insert, Find, Update and Delete queries", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.MongoDB).click(); cy.fillMongoDatasourceForm(); @@ -32,19 +32,13 @@ describe("Shopping cart App", function() { cy.NavigateToQueryEditor(); cy.NavigateToActiveTab(); // GetProduct query to fetch all products - cy.get(queryLocators.createQuery) - .last() - .click(); + cy.get(queryLocators.createQuery).last().click(); cy.get(queryLocators.queryNameField).type("GetProduct"); - cy.get(".CodeEditorTarget") - .first() - .type("Productnames"); + cy.get(".CodeEditorTarget").first().type("Productnames"); cy.assertPageSave(); cy.get(appPage.dropdownChevronLeft).click(); // EditProducts query to update the cart - cy.get(queryLocators.createQuery) - .last() - .click(); + cy.get(queryLocators.createQuery).last().click(); cy.get(queryLocators.queryNameField).type("EditProducts"); // Clicking outside to trigger the save @@ -53,9 +47,7 @@ describe("Shopping cart App", function() { formControls.commandDropdown, "Update Document(s)", ); - cy.get(".CodeEditorTarget") - .first() - .type("Productnames"); + cy.get(".CodeEditorTarget").first().type("Productnames"); cy.get(".CodeEditorTarget") .eq(1) .type('{"title": "{{Table1.selectedRow.title}}"}', { @@ -75,9 +67,7 @@ describe("Shopping cart App", function() { cy.assertPageSave(); cy.get(appPage.dropdownChevronLeft).click(); // Add product query - cy.get(queryLocators.createQuery) - .last() - .click(); + cy.get(queryLocators.createQuery).last().click(); cy.wait(5000); cy.get(queryLocators.queryNameField).type("AddProduct"); // Clicking outside to trigger the save @@ -107,9 +97,7 @@ describe("Shopping cart App", function() { cy.assertPageSave(); cy.get(appPage.dropdownChevronLeft).click(); // delete product - cy.get(queryLocators.createQuery) - .last() - .click(); + cy.get(queryLocators.createQuery).last().click(); cy.wait(5000); cy.get(queryLocators.queryNameField).type("DeleteProduct"); // Clicking outside to trigger the save @@ -136,44 +124,27 @@ describe("Shopping cart App", function() { cy.get(appPage.dropdownChevronLeft).click(); }); - it("2. Perform CRUD operations and validate data", function() { + it("2. Perform CRUD operations and validate data", function () { // Adding the books to the Add cart form cy.xpath(appPage.bookname).type("Atomic habits"); cy.xpath(appPage.bookgenre).type("Self help"); cy.xpath(appPage.bookprice).type(200); cy.xpath(appPage.bookquantity).type(2); - cy.get("span:contains('Submit')") - .closest("div") - .eq(1) - .click(); + cy.get("span:contains('Submit')").closest("div").eq(1).click(); cy.assertPageSave(); cy.wait(8000); - cy.xpath(appPage.bookname) - .click() - .type("A man called ove"); - cy.xpath(appPage.bookgenre) - .click() - .type("Fiction"); - cy.xpath(appPage.bookprice) - .click() - .type(100); - cy.xpath(appPage.bookquantity) - .click() - .type(1); - cy.get("span:contains('Submit')") - .closest("div") - .eq(1) - .click(); + cy.xpath(appPage.bookname).click().type("A man called ove"); + cy.xpath(appPage.bookgenre).click().type("Fiction"); + cy.xpath(appPage.bookprice).click().type(100); + cy.xpath(appPage.bookquantity).click().type(1); + cy.get("span:contains('Submit')").closest("div").eq(1).click(); cy.assertPageSave(); cy.wait("@postExecute"); // Deleting the book from the cart cy.get(".tableWrap") .children() .within(() => { - cy.get("span:contains('Delete')") - .closest("div") - .eq(1) - .click(); + cy.get("span:contains('Delete')").closest("div").eq(1).click(); cy.wait("@postExecute"); cy.wait(5000); @@ -183,23 +154,15 @@ describe("Shopping cart App", function() { .should("have.length", 1); }); // Updating the book quantity from edit cart - cy.xpath(appPage.editbookquantity) - .clear() - .type("3"); - cy.get("span:contains('Submit')") - .closest("div") - .eq(0) - .click(); + cy.xpath(appPage.editbookquantity).clear().type("3"); + cy.get("span:contains('Submit')").closest("div").eq(0).click(); cy.assertPageSave(); cy.wait(5000); // validating updated value in the cart - cy.get(".selected-row") - .children() - .eq(3) - .should("have.text", "3"); + cy.get(".selected-row").children().eq(3).should("have.text", "3"); }); - it("3. Connect the appplication to git and validate data in deploy mode and edit mode", function() { + it("3. Connect the appplication to git and validate data in deploy mode and edit mode", function () { _.gitSync.CreateNConnectToGit(repoName); cy.get("@gitRepoName").then((repName) => { repoName = repName; diff --git a/app/client/cypress/integration/Regression_TestSuite/Application/PgAdmin_spec.js b/app/client/cypress/integration/Regression_TestSuite/Application/PgAdmin_spec.js index 42591793b6..4a9d9c75db 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/PgAdmin_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/PgAdmin_spec.js @@ -4,7 +4,7 @@ const dsl = require("../../../fixtures/PgAdmindsl.json"); const widgetsPage = require("../../../locators/Widgets.json"); const appPage = require("../../../locators/PgAdminlocators.json"); -describe("PgAdmin Clone App", function() { +describe("PgAdmin Clone App", function () { let datasourceName, tableName; before("Add dsl and create datasource", () => { @@ -15,7 +15,7 @@ describe("PgAdmin Clone App", function() { }); }); - it("1. Create queries", function() { + it("1. Create queries", function () { // writing query to get all schema _.dataSources.CreateQueryAfterDSSaved( "SELECT schema_name FROM information_schema.schemata;", @@ -58,15 +58,13 @@ describe("PgAdmin Clone App", function() { ); }); - it("2. Add new table from app page, View and Delete table", function() { + it("2. Add new table from app page, View and Delete table", function () { _.deployMode.DeployApp(); // adding new table cy.xpath(appPage.addNewtable).click({ force: true }); cy.wait(500); cy.generateUUID().then((UUID) => { - cy.xpath(appPage.addTablename) - .clear() - .type(`table${UUID}`); + cy.xpath(appPage.addTablename).clear().type(`table${UUID}`); tableName = `table${UUID}`; }); // adding column to the table @@ -77,29 +75,19 @@ describe("PgAdmin Clone App", function() { _.agHelper.UpdateInput(appPage.addColumnName, "ID"); _.agHelper.SelectFromDropDown("Varchar", "", 1); // switching on the Primary Key toggle - cy.get(widgetsPage.switchWidgetInactive) - .first() - .click(); + cy.get(widgetsPage.switchWidgetInactive).first().click(); // switching on the Not Null toggle - cy.get(widgetsPage.switchWidgetInactive) - .last() - .click(); + cy.get(widgetsPage.switchWidgetInactive).last().click(); cy.xpath(appPage.submitButton).click({ force: true }); cy.xpath(appPage.addColumn).should("be.visible"); cy.wait(500); - cy.xpath(appPage.submitButton) - .first() - .click({ force: true }); + cy.xpath(appPage.submitButton).first().click({ force: true }); cy.xpath(appPage.closeButton).click({ force: true }); cy.xpath(appPage.addNewtable).should("be.visible"); // viewing the table's columns by clicking on view button - cy.xpath(appPage.viewButton) - .first() - .click({ force: true }); + cy.xpath(appPage.viewButton).first().click({ force: true }); // deleting the table through modal - cy.xpath(appPage.deleteButton) - .last() - .click({ force: true }); + cy.xpath(appPage.deleteButton).last().click({ force: true }); cy.xpath(appPage.confirmButton).click({ force: true }); cy.xpath(appPage.closeButton).click({ force: true }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/Application/PromisesApp_spec.js b/app/client/cypress/integration/Regression_TestSuite/Application/PromisesApp_spec.js index e0eff613e3..659ce59c79 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/PromisesApp_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/PromisesApp_spec.js @@ -3,7 +3,7 @@ const homePage = require("../../../locators/HomePage"); const dsl = require("../../../fixtures/promisesStoreValueDsl.json"); const commonlocators = require("../../../locators/commonlocators.json"); -describe("JSEditor tests", function() { +describe("JSEditor tests", function () { before(() => { cy.addDsl(dsl); }); @@ -68,9 +68,7 @@ describe("JSEditor tests", function() { // select an option from select widget cy.get(".bp3-button.select-button").click({ force: true }); - cy.get(".menu-item-text") - .eq(2) - .click({ force: true }); + cy.get(".menu-item-text").eq(2).click({ force: true }); cy.wait(2000); // verify text in the text widget cy.get(".t--draggable-textwidget span") diff --git a/app/client/cypress/integration/Regression_TestSuite/Application/ReconnectDatasource_spec.js b/app/client/cypress/integration/Regression_TestSuite/Application/ReconnectDatasource_spec.js index 71989b80ff..4d848027af 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/ReconnectDatasource_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/ReconnectDatasource_spec.js @@ -2,12 +2,12 @@ const homePage = require("../../../locators/HomePage"); const reconnectDatasourceModal = require("../../../locators/ReconnectLocators"); const datasource = require("../../../locators/DatasourcesEditor.json"); -describe("Reconnect Datasource Modal validation while importing application", function() { +describe("Reconnect Datasource Modal validation while importing application", function () { let workspaceId; let appid; let newWorkspaceName; let appName; - it("1. Import application from json with one postgres and success modal", function() { + it("1. Import application from json with one postgres and success modal", function () { cy.NavigateToHome(); // import application cy.generateUUID().then((uid) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/ClearStore_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/ClearStore_spec.ts index 92b475a243..3bfb35fb8b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/ClearStore_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/ClearStore_spec.ts @@ -1,4 +1,4 @@ -import * as _ from "../../../../support/Objects/ObjectsCore" +import * as _ from "../../../../support/Objects/ObjectsCore"; describe("clearStore Action test", () => { before(() => { @@ -6,7 +6,7 @@ describe("clearStore Action test", () => { _.entityExplorer.NavigateToSwitcher("explorer"); }); - it("1. Feature 11639 : Clear all store value", function() { + it("1. Feature 11639 : Clear all store value", function () { const JS_OBJECT_BODY = `export default { storeValue: async () => { let values = diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/Error_handling_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/Error_handling_spec.js index e2e987402d..679ed049ef 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/Error_handling_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/Error_handling_spec.js @@ -4,10 +4,10 @@ const widgetsPage = require("../../../../locators/Widgets.json"); const publishPage = require("../../../../locators/publishWidgetspage.json"); let dataSet; -describe("Test Create Api and Bind to Button widget", function() { +describe("Test Create Api and Bind to Button widget", function () { before("Test_Add users api and execute api", () => { cy.addDsl(dsl); - cy.fixture("example").then(function(data) { + cy.fixture("example").then(function (data) { dataSet = data; cy.createAndFillApi(dataSet.userApi, "/random"); cy.RunAPI(); @@ -32,9 +32,7 @@ describe("Test Create Api and Bind to Button widget", function() { cy.PublishtheApp(); cy.wait(3000); - cy.get("span:contains('Submit')") - .closest("div") - .click(); + cy.get("span:contains('Submit')").closest("div").click(); cy.wait("@postExecute").should( "have.nested.property", @@ -59,9 +57,7 @@ describe("Test Create Api and Bind to Button widget", function() { cy.PublishtheApp(); cy.wait(3000); - cy.get("span:contains('Submit')") - .closest("div") - .click(); + cy.get("span:contains('Submit')").closest("div").click(); cy.wait("@postExecute").should( "have.nested.property", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/PostWindowMessage_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/PostWindowMessage_spec.ts index fddd0eecb0..ac247e601f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/PostWindowMessage_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/PostWindowMessage_spec.ts @@ -45,27 +45,19 @@ describe("Post window message", () => { deployMode.DeployApp(); cy.get("#iframe-Iframe1").then((element) => { - element - .contents() - .find("body") - .find("#iframe-button") - .click(); + element.contents().find("body").find("#iframe-button").click(); }); agHelper.ValidateToastMessage("I got a message from iframe"); cy.get("#iframe-Iframe1").then(($element) => { const $body = $element.contents().find("body"); - cy.wrap($body) - .find("#txtMsg") - .should("have.text", "Before postMessage"); + cy.wrap($body).find("#txtMsg").should("have.text", "Before postMessage"); }); agHelper.ClickButton("Submit"); cy.get("#iframe-Iframe1").then(($element) => { const $body = $element.contents().find("body"); - cy.wrap($body) - .find("#txtMsg") - .should("have.text", "After postMessage"); + cy.wrap($body).find("#txtMsg").should("have.text", "After postMessage"); }); deployMode.NavigateBacktoEditor(); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/RemoveValue_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/RemoveValue_spec.ts index 1283300b67..e014e9912d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/RemoveValue_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/RemoveValue_spec.ts @@ -14,7 +14,7 @@ describe("removeValue Action test", () => { ee.NavigateToSwitcher("explorer"); }); - it("1. Feature 11639 : Remove store value", function() { + it("1. Feature 11639 : Remove store value", function () { const JS_OBJECT_BODY = `export default { storeValue: async () => { await storeValue('val1', 'value 1'); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/StoreValue_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/StoreValue_spec.ts index bb69b24c1c..90ee0d2a7e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/StoreValue_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/StoreValue_spec.ts @@ -15,7 +15,7 @@ describe("storeValue Action test", () => { ee.NavigateToSwitcher("explorer"); }); - it("1. Bug 14653: Running consecutive storeValue actions and await", function() { + it("1. Bug 14653: Running consecutive storeValue actions and await", function () { const jsObjectBody = `export default { storeTest: () => { let values = @@ -66,7 +66,7 @@ describe("storeValue Action test", () => { deployMode.NavigateBacktoEditor(); }); - it("2. Bug 14827 : Accepts paths as keys and doesn't update paths in store but creates a new field with path as key", function() { + it("2. Bug 14827 : Accepts paths as keys and doesn't update paths in store but creates a new field with path as key", function () { const DEFAULT_STUDENT_OBJECT = { details: { isTopper: true, name: "Abhah", grade: 1 }, }; @@ -148,7 +148,7 @@ describe("storeValue Action test", () => { deployMode.NavigateBacktoEditor(); }); - it("3. Bug 14827 : Accepts paths as keys and doesn't update paths in store but creates a new field with path as key - object keys", function() { + it("3. Bug 14827 : Accepts paths as keys and doesn't update paths in store but creates a new field with path as key - object keys", function () { const TEST_OBJECT = { a: 1, two: {} }; const JS_OBJECT_BODY = `export default { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/setInterval_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/setInterval_spec.js index 0c0eaba17e..f73c86e64e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/setInterval_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/setInterval_spec.js @@ -3,12 +3,12 @@ const dsl = require("../../../../fixtures/buttonApiDsl.json"); const widgetsPage = require("../../../../locators/Widgets.json"); const publishPage = require("../../../../locators/publishWidgetspage.json"); -describe("Test Create Api and Bind to Button widget", function() { +describe("Test Create Api and Bind to Button widget", function () { let dataSet; before("Test_Add users api and execute api", () => { cy.addDsl(dsl); - cy.fixture("example").then(function(data) { + cy.fixture("example").then(function (data) { dataSet = data; cy.createAndFillApi(dataSet.userApi, "/users"); cy.RunAPI(); @@ -17,9 +17,7 @@ describe("Test Create Api and Bind to Button widget", function() { it("1. Selects set interval function, Fill setInterval action creator and test code generated ", () => { cy.SearchEntityandOpen("Button1"); - cy.get(widgetsPage.buttonOnClick) - .last() - .click({ force: true }); + cy.get(widgetsPage.buttonOnClick).last().click({ force: true }); cy.get(commonlocators.chooseAction) .children() .contains("Set interval") @@ -63,9 +61,7 @@ describe("Test Create Api and Bind to Button widget", function() { it("2. Works in the published version", () => { cy.PublishtheApp(); cy.wait(3000); - cy.get("span:contains('Submit')") - .closest("div") - .click(); + cy.get("span:contains('Submit')").closest("div").click(); cy.wait("@postExecute").should( "have.nested.property", "response.body.responseMeta.status", @@ -83,9 +79,7 @@ describe("Test Create Api and Bind to Button widget", function() { it("3. Selects clear interval function, Fill clearInterval action creator and test code generated", () => { cy.SearchEntityandOpen("Button1"); - cy.get(widgetsPage.buttonOnClick) - .last() - .click({ force: true }); + cy.get(widgetsPage.buttonOnClick).last().click({ force: true }); cy.get(commonlocators.chooseAction) .children() .contains("Clear interval") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/AdminSettings/Admin_settings_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/AdminSettings/Admin_settings_spec.js index 23f8360282..19bfeabb28 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/AdminSettings/Admin_settings_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/AdminSettings/Admin_settings_spec.js @@ -5,7 +5,7 @@ const { GOOGLE_SIGNUP_SETUP_DOC, } = require("../../../../../src/constants/ThirdPartyConstants"); -describe("Admin settings page", function() { +describe("Admin settings page", function () { beforeEach(() => { cy.intercept("GET", "/api/v1/admin/env", { body: { responseMeta: { status: 200, success: true }, data: {} }, @@ -119,9 +119,7 @@ describe("Admin settings page", function() { }; assertVisibilityAndDisabledState(); cy.get(adminsSettings.instanceName).should("be.visible"); - cy.get(adminsSettings.instanceName) - .clear() - .type("AppsmithInstance"); + cy.get(adminsSettings.instanceName).clear().type("AppsmithInstance"); cy.get(adminsSettings.saveButton).should("be.visible"); cy.get(adminsSettings.saveButton).should("not.be.disabled"); cy.get(adminsSettings.resetButton).should("be.visible"); @@ -137,9 +135,7 @@ describe("Admin settings page", function() { let instanceName; cy.generateUUID().then((uuid) => { instanceName = uuid; - cy.get(adminsSettings.instanceName) - .clear() - .type(uuid); + cy.get(adminsSettings.instanceName).clear().type(uuid); }); cy.get(adminsSettings.saveButton).should("be.visible"); cy.get(adminsSettings.saveButton).should("not.be.disabled"); @@ -165,9 +161,7 @@ describe("Admin settings page", function() { let instanceName; cy.generateUUID().then((uuid) => { instanceName = uuid; - cy.get(adminsSettings.instanceName) - .clear() - .type(uuid); + cy.get(adminsSettings.instanceName).clear().type(uuid); }); cy.get(adminsSettings.saveButton).should("be.visible"); cy.get(adminsSettings.saveButton).should("not.be.disabled"); @@ -178,9 +172,7 @@ describe("Admin settings page", function() { let fromAddress; cy.generateUUID().then((uuid) => { fromAddress = uuid; - cy.get(adminsSettings.fromAddress) - .clear() - .type(`${uuid}@appsmith.com`); + cy.get(adminsSettings.fromAddress).clear().type(`${uuid}@appsmith.com`); }); cy.intercept("POST", "/api/v1/admin/restart", { body: { responseMeta: { status: 200, success: true }, data: true }, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/Autocomplete_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/Autocomplete_Spec.ts index e796eb6668..73569b5fbf 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/Autocomplete_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/Autocomplete_Spec.ts @@ -8,8 +8,8 @@ const { PropertyPane: propPane, } = ObjectsRegistry; -describe("Autocomplete bug fixes", function() { - it("1. Bug #12790 Verifies if selectedRow is in best match", function() { +describe("Autocomplete bug fixes", function () { + it("1. Bug #12790 Verifies if selectedRow is in best match", function () { ee.DragDropWidgetNVerify(WIDGET.TABLE, 200, 200); ee.DragDropWidgetNVerify(WIDGET.TEXT, 200, 600); ee.SelectEntityByName("Text1"); @@ -24,7 +24,7 @@ describe("Autocomplete bug fixes", function() { ); }); - it("2. Bug #14990 Checks if copied widget show up on autocomplete suggestions", function() { + it("2. Bug #14990 Checks if copied widget show up on autocomplete suggestions", function () { ee.CopyPasteWidget("Text1"); ee.SelectEntityByName("Text1"); propPane.UpdatePropertyFieldValue("Text", ""); @@ -39,7 +39,7 @@ describe("Autocomplete bug fixes", function() { ); }); - it("3. Bug #14100 Custom columns name label change should reflect in autocomplete", function() { + it("3. Bug #14100 Custom columns name label change should reflect in autocomplete", function () { // select table widget ee.SelectEntityByName("Table1"); // add new column @@ -64,7 +64,7 @@ describe("Autocomplete bug fixes", function() { ); }); - it("4. feat #16426 Autocomplete for fast-xml-parser", function() { + it("4. feat #16426 Autocomplete for fast-xml-parser", function () { ee.SelectEntityByName("Text1"); propPane.TypeTextIntoField("Text", "{{xmlParser.j"); agHelper.GetNAssertElementText(locator._hints, "j2xParser"); @@ -73,7 +73,7 @@ describe("Autocomplete bug fixes", function() { agHelper.GetNAssertElementText(locator._hints, "parse"); }); - it("5. Installed library should show up in autocomplete", function() { + it("5. Installed library should show up in autocomplete", function () { ee.ExpandCollapseEntity("Libraries"); installer.openInstaller(); installer.installLibrary("uuidjs", "UUID"); @@ -83,7 +83,7 @@ describe("Autocomplete bug fixes", function() { agHelper.GetNAssertElementText(locator._hints, "UUID"); }); - it("6. No autocomplete for Removed libraries", function() { + it("6. No autocomplete for Removed libraries", function () { ee.RenameEntityFromExplorer("Text1Copy", "UUIDTEXT"); installer.uninstallLibrary("uuidjs"); propPane.TypeTextIntoField("Text", "{{UUID."); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/PropertyPaneSuggestion_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/PropertyPaneSuggestion_spec.ts index d56a47c99a..548c86b4e0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/PropertyPaneSuggestion_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/PropertyPaneSuggestion_spec.ts @@ -1,11 +1,7 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; -const { - AggregateHelper, - CommonLocators, - EntityExplorer, - PropertyPane, -} = ObjectsRegistry; +const { AggregateHelper, CommonLocators, EntityExplorer, PropertyPane } = + ObjectsRegistry; describe("Property Pane Suggestions", () => { before(() => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/BindApi_withPageload_Input_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/BindApi_withPageload_Input_spec.js index e8c1cd1c7a..4706135a8a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/BindApi_withPageload_Input_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/BindApi_withPageload_Input_spec.js @@ -4,12 +4,12 @@ const dsl = require("../../../../fixtures/MultipleInput.json"); const widgetsPage = require("../../../../locators/Widgets.json"); const publish = require("../../../../locators/publishWidgetspage.json"); -describe("Binding the API with pageOnLoad and input Widgets", function() { +describe("Binding the API with pageOnLoad and input Widgets", function () { before(() => { cy.addDsl(dsl); }); - it("1. Will load an api on load", function() { + it("1. Will load an api on load", function () { cy.NavigateToAPI_Panel(); cy.CreateAPI("PageLoadApi"); cy.enterDatasourceAndPath(testdata.baseUrl, testdata.methods); @@ -20,7 +20,7 @@ describe("Binding the API with pageOnLoad and input Widgets", function() { cy.reload(); }); - it("2. Input widget updated with deafult data", function() { + it("2. Input widget updated with deafult data", function () { cy.selectEntityByName("Widgets"); cy.selectEntityByName("Input1"); cy.get(widgetsPage.defaultInput).type("3"); @@ -36,7 +36,7 @@ describe("Binding the API with pageOnLoad and input Widgets", function() { .should("contain", "3"); }); - it("3. Binding second input widget with API on PageLoad data and default data from input1 widget ", function() { + it("3. Binding second input widget with API on PageLoad data and default data from input1 widget ", function () { cy.selectEntityByName("Input3"); cy.get(widgetsPage.defaultInput).type(testdata.pageloadBinding, { parseSpecialCharSequences: false, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/BindButton_Text_WithRecaptcha_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/BindButton_Text_WithRecaptcha_spec.js index 902208c8ef..94d421cb6f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/BindButton_Text_WithRecaptcha_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/BindButton_Text_WithRecaptcha_spec.js @@ -7,12 +7,12 @@ const locator = ObjectsRegistry.CommonLocators, agHelper = ObjectsRegistry.AggregateHelper, propPane = ObjectsRegistry.PropertyPane; -describe("Binding the Button widget with Text widget using Recpatcha v3", function() { +describe("Binding the Button widget with Text widget using Recpatcha v3", function () { before(() => { cy.addDsl(dsl); }); - it.only("1. Validate the Button binding with Text Widget with Recaptcha token with empty key", function() { + it.only("1. Validate the Button binding with Text Widget with Recaptcha token with empty key", function () { agHelper.ClickButton("Submit"); agHelper .GetText(locator._widgetInCanvas("textwidget") + " span") @@ -27,7 +27,7 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi }); //This test to be enabled once the product bug is fixed - it("Validate the Button binding with Text Widget with Recaptcha Token with invalid key before using valid key", function() { + it("Validate the Button binding with Text Widget with Recaptcha Token with invalid key before using valid key", function () { cy.get("button") .contains("Submit") .should("be.visible") @@ -65,7 +65,7 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi }); }); - it.only("2. Validate the Button binding with Text Widget with Recaptcha Token with v2Key & upward compatibilty doesnt work", function() { + it.only("2. Validate the Button binding with Text Widget with Recaptcha Token with v2Key & upward compatibilty doesnt work", function () { ee.SelectEntityByName("Button1"); propPane.UpdatePropertyFieldValue("Google reCAPTCHA Key", testdata.v2Key); agHelper.ClickButton("Submit"); @@ -85,7 +85,7 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi agHelper.Sleep(); }); - it.only("3. Validate the Button binding with Text Widget with Recaptcha Token with v3Key & v2key for backward compatible", function() { + it.only("3. Validate the Button binding with Text Widget with Recaptcha Token with v3Key & v2key for backward compatible", function () { ee.SelectEntityByName("Button1"); propPane.UpdatePropertyFieldValue("Google reCAPTCHA Key", testdata.v3Key); agHelper.SelectDropdownList("Google reCAPTCHA Version", "reCAPTCHA v3"); @@ -104,7 +104,7 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi }); //This test to be enabled once the product bug is fixed - it("Validate the Button binding with Text Widget with Recaptcha Token with invalid key", function() { + it("Validate the Button binding with Text Widget with Recaptcha Token with invalid key", function () { cy.get("button") .contains("Submit") .should("be.visible") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_API_with_List_Widget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_API_with_List_Widget_spec.js index 98e833d0dd..b29093cb91 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_API_with_List_Widget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_API_with_List_Widget_spec.js @@ -4,13 +4,13 @@ const dsl = require("../../../../fixtures/listwidgetdsl.json"); const publishPage = require("../../../../locators/publishWidgetspage.json"); import apiPage from "../../../../locators/ApiEditor"; -describe("Test Create Api and Bind to List widget", function() { +describe("Test Create Api and Bind to List widget", function () { let valueToTest; before(() => { cy.addDsl(dsl); }); - it("1. Test_Add users api and execute api", function() { + it("1. Test_Add users api and execute api", function () { cy.createAndFillApi(this.data.userApi, "/mock-api?records=10"); cy.RunAPI(); cy.get(apiPage.jsonResponseTab).click(); @@ -28,7 +28,7 @@ describe("Test Create Api and Bind to List widget", function() { }); }); - it("2. Test_Validate the Api data is updated on List widget", function() { + it("2. Test_Validate the Api data is updated on List widget", function () { cy.SearchEntityandOpen("List1"); cy.testJsontext("items", "{{Api1.data}}"); cy.get(".t--draggable-textwidget span").should("have.length", 8); @@ -62,7 +62,7 @@ describe("Test Create Api and Bind to List widget", function() { }); }); - it("3. Test_Validate the list widget ", function() { + it("3. Test_Validate the list widget ", function () { cy.get(publishPage.backToEditor).click({ force: true }); cy.wait("@postExecute").then((interception) => { valueToTest = JSON.stringify( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Button_with_API_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Button_with_API_spec.js index b7ce082cf3..dc013a893d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Button_with_API_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Button_with_API_spec.js @@ -5,14 +5,14 @@ const widgetsPage = require("../../../../locators/Widgets.json"); const testdata = require("../../../../fixtures/testdata.json"); import apiPage from "../../../../locators/ApiEditor"; -describe("Bind a button and Api usecase", function() { +describe("Bind a button and Api usecase", function () { let apiData; let valueToTest; before(() => { cy.addDsl(dsl); }); - it("1. Add an API by binding a button in its header", function() { + it("1. Add an API by binding a button in its header", function () { cy.createAndFillApi(this.data.userApi, "/mock-api?records=10"); cy.get(apiwidget.headerKey) .first() @@ -39,7 +39,7 @@ describe("Bind a button and Api usecase", function() { }); }); - it("2. Button-Name updation", function() { + it("2. Button-Name updation", function () { cy.SearchEntityandOpen("Button1"); //changing the Button Name cy.widgetText( @@ -49,7 +49,7 @@ describe("Bind a button and Api usecase", function() { ); }); - it("3. API datasource binding with button name validation", function() { + it("3. API datasource binding with button name validation", function () { cy.CheckAndUnfoldEntityItem("Queries/JS"); cy.SearchEntityandOpen("Api1"); cy.get(apiwidget.headerValue) diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_DatePicker_Text_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_DatePicker_Text_spec.js index c5d3f029f3..481605d2ee 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_DatePicker_Text_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_DatePicker_Text_spec.js @@ -3,7 +3,7 @@ const formWidgetsPage = require("../../../../locators/FormWidgets.json"); const dsl = require("../../../../fixtures/uiBindDsl.json"); const publishPage = require("../../../../locators/publishWidgetspage.json"); -describe("Binding the Datepicker and Text Widget", function() { +describe("Binding the Datepicker and Text Widget", function () { let nextDay; let dateDp2; @@ -11,7 +11,7 @@ describe("Binding the Datepicker and Text Widget", function() { cy.addDsl(dsl); }); - it("DatePicker-Text, Validate selectedDate functionality", function() { + it("DatePicker-Text, Validate selectedDate functionality", function () { /** * Bind DatePicker1 to Text for "selectedDate" */ @@ -48,7 +48,7 @@ describe("Binding the Datepicker and Text Widget", function() { cy.get(commonlocators.backToEditor).click(); }); - it("DatePicker1-text: Change the date in DatePicker1 and Validate the same in text widget", function() { + it("DatePicker1-text: Change the date in DatePicker1 and Validate the same in text widget", function () { cy.openPropertyPane("textwidget"); /** @@ -86,7 +86,7 @@ describe("Binding the Datepicker and Text Widget", function() { }); }); - it("Validate the Date is not changed in DatePicker2", function() { + it("Validate the Date is not changed in DatePicker2", function () { cy.log("dateDp2:" + dateDp2); cy.get(formWidgetsPage.datepickerWidget + commonlocators.inputField) .eq(1) @@ -100,7 +100,7 @@ describe("Binding the Datepicker and Text Widget", function() { cy.get(publishPage.backToEditor).click({ force: true }); }); - it("DatePicker-Text, Validate Multiple Binding", function() { + it("DatePicker-Text, Validate Multiple Binding", function () { /** * Bind the DatePicker1 and DatePicker2 along with hard coded text to Text widget */ @@ -115,7 +115,7 @@ describe("Binding the Datepicker and Text Widget", function() { cy.get(publishPage.backToEditor).click({ force: true }); }); - it("Checks if on deselection of date triggers the onDateSelected action or not.", function() { + it("Checks if on deselection of date triggers the onDateSelected action or not.", function () { /** * bind datepicker to show a message "Hello" on date selected */ @@ -129,9 +129,7 @@ describe("Binding the Datepicker and Text Widget", function() { /** * checking if on selecting the date triggers the message */ - cy.get(formWidgetsPage.datepickerWidget) - .first() - .click(); + cy.get(formWidgetsPage.datepickerWidget).first().click(); cy.ClearDateFooter(); cy.SetDateToToday(); cy.get(commonlocators.toastmsg).contains("hello"); @@ -140,12 +138,8 @@ describe("Binding the Datepicker and Text Widget", function() { * checking if on deselecting the date triggers the message or not. * It should not trigger any message on deselection */ - cy.get(formWidgetsPage.datepickerWidget) - .first() - .click(); - cy.get(formWidgetsPage.datepickerFooter) - .contains("Clear") - .click(); + cy.get(formWidgetsPage.datepickerWidget).first().click(); + cy.get(formWidgetsPage.datepickerFooter).contains("Clear").click(); cy.get(commonlocators.toastmsg).should("not.exist"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_InputWidget_TableV2_Sorting_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_InputWidget_TableV2_Sorting_spec.js index 505ceb0993..aaee6dc26e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_InputWidget_TableV2_Sorting_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_InputWidget_TableV2_Sorting_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/formInputTableV2Dsl.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the Table and input Widget", function() { +describe("Binding the Table and input Widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Input widget test with default value from table widget", function() { + it("1. Input widget test with default value from table widget", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}"); @@ -18,12 +18,10 @@ describe("Binding the Table and input Widget", function() { ); }); - it("2. validation of data displayed in input widgets based on sorting", function() { + it("2. validation of data displayed in input widgets based on sorting", function () { cy.SearchEntityandOpen("Table1"); cy.testJsontext("defaultselectedrow", "0"); - cy.get(".draggable-header") - .contains("id") - .click({ force: true }); + cy.get(".draggable-header").contains("id").click({ force: true }); cy.wait(1000); cy.readTableV2dataPublish("0", "0").then((tabData) => { const tabValue = tabData; @@ -34,9 +32,7 @@ describe("Binding the Table and input Widget", function() { .invoke("attr", "value") .should("contain", tabValue); }); - cy.get(".draggable-header") - .contains("id") - .click({ force: true }); + cy.get(".draggable-header").contains("id").click({ force: true }); cy.wait(1000); cy.readTableV2dataPublish("0", "0").then((tabData) => { const tabValue = tabData; @@ -49,7 +45,7 @@ describe("Binding the Table and input Widget", function() { }); }); - it("3. validation of column id displayed in input widgets based on sorted column", function() { + it("3. validation of column id displayed in input widgets based on sorted column", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.sortedColumn + "}}"); cy.wait("@updateLayout").should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_InputWidget_Table_Sorting_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_InputWidget_Table_Sorting_spec.js index 6c786ce588..9fd1730457 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_InputWidget_Table_Sorting_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_InputWidget_Table_Sorting_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/formInputTableDsl.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the Table and input Widget", function() { +describe("Binding the Table and input Widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Input widget test with default value from table widget", function() { + it("1. Input widget test with default value from table widget", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}"); @@ -18,12 +18,10 @@ describe("Binding the Table and input Widget", function() { ); }); - it("2. Validation of data displayed in input widgets based on sorting", function() { + it("2. Validation of data displayed in input widgets based on sorting", function () { cy.SearchEntityandOpen("Table1"); cy.testJsontext("defaultselectedrow", "0"); - cy.get(".draggable-header") - .contains("id") - .click({ force: true }); + cy.get(".draggable-header").contains("id").click({ force: true }); cy.wait(1000); cy.readTabledataPublish("0", "0").then((tabData) => { const tabValue = tabData; @@ -34,9 +32,7 @@ describe("Binding the Table and input Widget", function() { .invoke("attr", "value") .should("contain", tabValue); }); - cy.get(".draggable-header") - .contains("id") - .click({ force: true }); + cy.get(".draggable-header").contains("id").click({ force: true }); cy.wait(1000); cy.readTabledataPublish("0", "0").then((tabData) => { const tabValue = tabData; @@ -49,7 +45,7 @@ describe("Binding the Table and input Widget", function() { }); }); - it("3. Validation of column id displayed in input widgets based on sorted column", function() { + it("3. Validation of column id displayed in input widgets based on sorted column", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.sortedColumn + "}}"); cy.wait("@updateLayout").should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_JSObject_Postgress_Table_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_JSObject_Postgress_Table_spec.js index 9af1a14006..752bed28c0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_JSObject_Postgress_Table_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_JSObject_Postgress_Table_spec.js @@ -7,7 +7,7 @@ const publish = require("../../../../locators/publishWidgetspage.json"); let datasourceName; let currentUrl; -describe("Addwidget from Query and bind with other widgets", function() { +describe("Addwidget from Query and bind with other widgets", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); @@ -34,9 +34,7 @@ describe("Addwidget from Query and bind with other widgets", function() { cy.get(queryEditor.suggestedTableWidget).click(); cy.createJSObject("return Query1.data;"); cy.CheckAndUnfoldEntityItem("Widgets"); - cy.get(".t--entity-name") - .contains("Table1") - .click({ force: true }); + cy.get(".t--entity-name").contains("Table1").click({ force: true }); cy.testJsontext("tabledata", "{{JSObject1.myFun1()}}"); cy.isSelectRow(1); cy.readTableV2dataPublish("1", "0").then((tabData) => { @@ -52,9 +50,7 @@ describe("Addwidget from Query and bind with other widgets", function() { cy.url().then((url) => { currentUrl = url; cy.log("Published url is: " + currentUrl); - cy.get(publish.backToEditor) - .first() - .click(); + cy.get(publish.backToEditor).first().click(); cy.wait(2000); cy.visit(currentUrl); cy.wait("@getPagesForViewApp").should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_MultiSelect_Button_Text_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_MultiSelect_Button_Text_spec.js index 87ada8a1db..22d9a5cd8d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_MultiSelect_Button_Text_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_MultiSelect_Button_Text_spec.js @@ -28,7 +28,7 @@ const widgetsToTest = { }; Object.entries(widgetsToTest).forEach(([widgetSelector, testConfig]) => { - describe(`${testConfig.widgetName} widget test for validating reset action`, function() { + describe(`${testConfig.widgetName} widget test for validating reset action`, function () { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); @@ -40,17 +40,15 @@ Object.entries(widgetsToTest).forEach(([widgetSelector, testConfig]) => { cy.addDsl(dsl); }); - it(`1. DragDrop Widget ${testConfig.widgetName}`, function() { + it(`1. DragDrop Widget ${testConfig.widgetName}`, function () { cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas(widgetSelector, { x: 300, y: 200 }); cy.get(getWidgetSelector(widgetSelector)).should("exist"); }); - it("2. Bind Button on click and Text widget content", function() { + it("2. Bind Button on click and Text widget content", function () { cy.openPropertyPane(WIDGET.BUTTON); - cy.get(PROPERTY_SELECTOR.onClick) - .find(".t--js-toggle") - .click(); + cy.get(PROPERTY_SELECTOR.onClick).find(".t--js-toggle").click(); cy.updateCodeInput( PROPERTY_SELECTOR.onClick, `{{resetWidget("${testConfig.widgetPrefixName}",true).then(() => showAlert("success"))}}`, @@ -78,7 +76,7 @@ Object.entries(widgetsToTest).forEach(([widgetSelector, testConfig]) => { cy.wait(4000); }); - it("3. Publish the app and validate reset action", function() { + it("3. Publish the app and validate reset action", function () { cy.PublishtheApp(); cy.get(".rc-select-selection-overflow").click({ force: true }); cy.get(".rc-select-item-option:contains('Blue')").click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TabWidget_Input_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TabWidget_Input_spec.js index 43cd33bbf6..29cf71ed0c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TabWidget_Input_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TabWidget_Input_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/tabInputDsl.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the input Widget with tab Widget", function() { +describe("Binding the input Widget with tab Widget", function () { before(() => { cy.addDsl(dsl); }); - it("Input widget test with default value from tab widget", function() { + it("Input widget test with default value from tab widget", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.tabBinding + "}}"); @@ -18,7 +18,7 @@ describe("Binding the input Widget with tab Widget", function() { ); }); - it("validation of data displayed in input widgets based on tab selected", function() { + it("validation of data displayed in input widgets based on tab selected", function () { cy.PublishtheApp(); cy.get(publish.tabWidget) .contains("Tab 2") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableTextPagination_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableTextPagination_spec.js index 88b28c1bde..74bcc17483 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableTextPagination_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableTextPagination_spec.js @@ -4,18 +4,18 @@ const publishPage = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); import apiPage from "../../../../locators/ApiEditor"; -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Test_Add Paginate with Table Page No and Execute the Api", function() { + it("1. Test_Add Paginate with Table Page No and Execute the Api", function () { cy.wait(3000); /**Create an Api1 of Paginate with Table Page No */ cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam); cy.RunAPI(); }); - it("2. Table-Text, Validate Server Side Pagination of Paginate with Table Page No", function() { + it("2. Table-Text, Validate Server Side Pagination of Paginate with Table Page No", function () { cy.SearchEntityandOpen("Table1"); cy.EnableAllCodeEditors(); /**Bind Api1 with Table widget */ @@ -44,7 +44,7 @@ describe("Test Create Api and Bind to Table widget", function() { //cy.ValidateTableData("11"); }); - it("3. Table-Text, Validate Publish Mode on Server Side Pagination of Paginate with Table Page No", function() { + it("3. Table-Text, Validate Publish Mode on Server Side Pagination of Paginate with Table Page No", function () { cy.PublishtheApp(); cy.wait(500); // Make sure onPageLoad action has run before validating the data @@ -64,22 +64,18 @@ describe("Test Create Api and Bind to Table widget", function() { }); }); - it("4. Table-Text, Validate Server Side Pagination of Paginate with Total Records Count", function() { + it("4. Table-Text, Validate Server Side Pagination of Paginate with Total Records Count", function () { cy.get(publishPage.backToEditor).click({ force: true }); cy.wait(3000); cy.CheckAndUnfoldEntityItem("Widgets"); - cy.get(".t--entity-name") - .contains("Table1") - .click({ force: true }); + cy.get(".t--entity-name").contains("Table1").click({ force: true }); cy.testJsontext("totalrecordcount", 20); cy.PublishtheApp(); cy.wait(500); cy.wait("@postExecute"); cy.wait(500); cy.get(".show-page-items").should("contain", "20 Records"); - cy.get(".page-item") - .next() - .should("contain", "of 2"); + cy.get(".page-item").next().should("contain", "of 2"); cy.get(".t--table-widget-next-page").should("not.have.attr", "disabled"); cy.readTabledata("0", "4").then((tabData) => { @@ -92,7 +88,7 @@ describe("Test Create Api and Bind to Table widget", function() { cy.get(".t--table-widget-next-page").should("have.attr", "disabled"); }); - it("5. Test_Add Paginate with Response URL and Execute the Api", function() { + it("5. Test_Add Paginate with Response URL and Execute the Api", function () { cy.get(publishPage.backToEditor).click({ force: true }); cy.wait(3000); /** Create Api2 of Paginate with Response URL*/ @@ -122,7 +118,7 @@ describe("Test Create Api and Bind to Table widget", function() { cy.callApi("Api2"); }); - it("6. Table-Text, Validate Server Side Pagination of Paginate with Response URL", function() { + it("6. Table-Text, Validate Server Side Pagination of Paginate with Response URL", function () { /**Validate Response data with Table data in Text Widget */ cy.SearchEntityandOpen("Table1"); cy.ValidatePaginateResponseUrlData(apiPage.apiPaginationPrevTest, false); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2TextPagination_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2TextPagination_spec.js index e788b66f91..3cd6705da6 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2TextPagination_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2TextPagination_spec.js @@ -4,19 +4,19 @@ const publishPage = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); import apiPage from "../../../../locators/ApiEditor"; -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Test_Add Paginate with Table Page No and Execute the Api", function() { + it("1. Test_Add Paginate with Table Page No and Execute the Api", function () { cy.wait(3000); /**Create an Api1 of Paginate with Table Page No */ cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam); cy.RunAPI(); }); - it("2. Table-Text, Validate Server Side Pagination of Paginate with Table v2 Page No", function() { + it("2. Table-Text, Validate Server Side Pagination of Paginate with Table v2 Page No", function () { cy.SearchEntityandOpen("Table1"); /**Bind Api1 with Table widget */ cy.testJsontext("tabledata", "{{Api1.data}}"); @@ -48,7 +48,7 @@ describe("Test Create Api and Bind to Table widget", function() { //cy.ValidateTableData("11"); }); - it("3. Table-Text, Validate Publish Mode on Server Side Pagination of Paginate with Table v2 Page No", function() { + it("3. Table-Text, Validate Publish Mode on Server Side Pagination of Paginate with Table v2 Page No", function () { cy.PublishtheApp(); cy.wait(500); // Make sure onPageLoad action has run before validating the data @@ -68,22 +68,18 @@ describe("Test Create Api and Bind to Table widget", function() { }); }); - it("4. Table-Text, Validate Server Side Pagination of Paginate with Total v2 Records Count", function() { + it("4. Table-Text, Validate Server Side Pagination of Paginate with Total v2 Records Count", function () { cy.get(publishPage.backToEditor).click({ force: true }); cy.wait(3000); cy.CheckAndUnfoldEntityItem("Widgets"); - cy.get(".t--entity-name") - .contains("Table1") - .click({ force: true }); + cy.get(".t--entity-name").contains("Table1").click({ force: true }); cy.testJsontext("totalrecords", 20); cy.PublishtheApp(); cy.wait(500); cy.wait("@postExecute"); cy.wait(500); cy.get(".show-page-items").should("contain", "20 Records"); - cy.get(".page-item") - .next() - .should("contain", "of 2"); + cy.get(".page-item").next().should("contain", "of 2"); cy.get(".t--table-widget-next-page").should("not.have.attr", "disabled"); cy.readTableV2data("0", "4").then((tabData) => { @@ -96,7 +92,7 @@ describe("Test Create Api and Bind to Table widget", function() { cy.get(".t--table-widget-next-page").should("have.attr", "disabled"); }); - it("5. Test_Add Paginate with Response URL and Execute the Api", function() { + it("5. Test_Add Paginate with Response URL and Execute the Api", function () { cy.get(publishPage.backToEditor).click({ force: true }); cy.wait(3000); /** Create Api2 of Paginate with Response URL*/ @@ -126,7 +122,7 @@ describe("Test Create Api and Bind to Table widget", function() { cy.callApi("Api2"); }); - it("6. Table-Text, Validate Server Side Pagination of Paginate with Response URL", function() { + it("6. Table-Text, Validate Server Side Pagination of Paginate with Response URL", function () { /**Validate Response data with Table data in Text Widget */ cy.SearchEntityandOpen("Table1"); cy.ValidatePaginateResponseUrlDataV2(apiPage.apiPaginationPrevTest, false); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2Widget_selectedRow_Input_widget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2Widget_selectedRow_Input_widget_spec.js index 5a32de506d..85830b416a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2Widget_selectedRow_Input_widget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2Widget_selectedRow_Input_widget_spec.js @@ -4,12 +4,12 @@ const dsl = require("../../../../fixtures/formInputTableV2Dsl.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the table widget and input Widget", function() { +describe("Binding the table widget and input Widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Input widget test with default value from table widget v2", function() { + it("1. Input widget test with default value from table widget v2", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}"); cy.wait("@updateLayout").should( @@ -19,7 +19,7 @@ describe("Binding the table widget and input Widget", function() { ); }); - it("2. validation of data displayed in input widgets based on selected row", function() { + it("2. validation of data displayed in input widgets based on selected row", function () { cy.SearchEntityandOpen("Table1"); cy.testJsontext("defaultselectedrow", "2"); cy.readTableV2dataPublish("2", "0").then((tabData) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2_Widget_API_Derived_Column_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2_Widget_API_Derived_Column_spec.js index 13a8df8aba..d6cc2a5800 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2_Widget_API_Derived_Column_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2_Widget_API_Derived_Column_spec.js @@ -3,16 +3,16 @@ const dsl = require("../../../../fixtures/tableV2TextPaginationDsl.json"); const testdata = require("../../../../fixtures/testdata.json"); const widgetsPage = require("../../../../locators/Widgets.json"); -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Create an API and Execute the API and bind with TableV2", function() { + it("1. Create an API and Execute the API and bind with TableV2", function () { cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam); cy.RunAPI(); }); - it("2. Validate TableV2 with API data and then add a column", function() { + it("2. Validate TableV2 with API data and then add a column", function () { cy.SearchEntityandOpen("Table1"); cy.testJsontext("tabledata", "{{Api1.data}}"); cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox); @@ -41,7 +41,7 @@ describe("Test Create Api and Bind to Table widget", function() { cy.closePropertyPane(); }); - it("3. Check Image alignment is working as expected", function() { + it("3. Check Image alignment is working as expected", function () { cy.SearchEntityandOpen("Table1"); cy.editColumn("avatar"); cy.changeColumnType("Image"); @@ -49,34 +49,28 @@ describe("Test Create Api and Bind to Table widget", function() { cy.SearchEntityandOpen("Table1"); cy.backFromPropertyPanel(); cy.moveToStyleTab(); - cy.get(widgetsPage.centerAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.centerAlign).first().click({ force: true }); cy.closePropertyPane(); cy.get(`.t--widget-tablewidgetv2 .tbody .image-cell-wrapper`) .first() .should("have.css", "justify-content", "center"); cy.SearchEntityandOpen("Table1"); cy.moveToStyleTab(); - cy.get(widgetsPage.rightAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.rightAlign).first().click({ force: true }); cy.closePropertyPane(); cy.get(`.t--widget-tablewidgetv2 .tbody .image-cell-wrapper`) .first() .should("have.css", "justify-content", "flex-end"); cy.SearchEntityandOpen("Table1"); cy.moveToStyleTab(); - cy.get(widgetsPage.leftAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.leftAlign).first().click({ force: true }); cy.closePropertyPane(); cy.get(`.t--widget-tablewidgetv2 .tbody .image-cell-wrapper`) .first() .should("have.css", "justify-content", "flex-start"); }); - it("4. Update table json data and check the derived column values after update", function() { + it("4. Update table json data and check the derived column values after update", function () { cy.SearchEntityandOpen("Table1"); cy.moveToContentTab(); cy.tableV2ColumnDataValidation("id"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2_Widget_API_Pagination_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2_Widget_API_Pagination_spec.js index ef04aeaaa0..4c4b60429a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2_Widget_API_Pagination_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2_Widget_API_Pagination_spec.js @@ -1,16 +1,16 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const dsl = require("../../../../fixtures/tableV2TextPaginationDsl.json"); -describe("Test Create Api and Bind to Table widget V2", function() { +describe("Test Create Api and Bind to Table widget V2", function () { before(() => { cy.addDsl(dsl); }); - it("1. Create an API and Execute the API and bind with Table", function() { + it("1. Create an API and Execute the API and bind with Table", function () { cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam); cy.RunAPI(); }); - it("2. Validate Table V2 with API data and then add a column", function() { + it("2. Validate Table V2 with API data and then add a column", function () { cy.SearchEntityandOpen("Table1"); cy.testJsontext("tabledata", "{{Api1.data}}"); cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableWidget_selectedRow_Input_widget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableWidget_selectedRow_Input_widget_spec.js index 80cec9a7cb..1c9741c4e7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableWidget_selectedRow_Input_widget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableWidget_selectedRow_Input_widget_spec.js @@ -4,12 +4,12 @@ const dsl = require("../../../../fixtures/formInputTableDsl.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the table widget and input Widget", function() { +describe("Binding the table widget and input Widget", function () { before(() => { cy.addDsl(dsl); }); - it("Input widget test with default value from table widget", function() { + it("Input widget test with default value from table widget", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}"); cy.wait("@updateLayout").should( @@ -19,7 +19,7 @@ describe("Binding the table widget and input Widget", function() { ); }); - it("validation of data displayed in input widgets based on selected row", function() { + it("validation of data displayed in input widgets based on selected row", function () { cy.SearchEntityandOpen("Table1"); cy.testJsontext("defaultselectedrow", "2"); cy.readTabledataPublish("2", "0").then((tabData) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Table_Widget_API_Derived_Column_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Table_Widget_API_Derived_Column_spec.js index e2a344ce43..98752d5ade 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Table_Widget_API_Derived_Column_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Table_Widget_API_Derived_Column_spec.js @@ -3,17 +3,17 @@ const dsl = require("../../../../fixtures/tableTextPaginationDsl.json"); const testdata = require("../../../../fixtures/testdata.json"); const widgetsPage = require("../../../../locators/Widgets.json"); -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Create an API and Execute the API and bind with Table", function() { + it("1. Create an API and Execute the API and bind with Table", function () { cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam); cy.RunAPI(); }); - it("2. Validate Table with API data and then add a column", function() { + it("2. Validate Table with API data and then add a column", function () { cy.SearchEntityandOpen("Table1"); cy.testJsontext("tabledata", "{{Api1.data}}"); cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox); @@ -42,38 +42,32 @@ describe("Test Create Api and Bind to Table widget", function() { cy.closePropertyPane(); }); - it("3. Check Image alignment is working as expected", function() { + it("3. Check Image alignment is working as expected", function () { cy.SearchEntityandOpen("Table1"); cy.editColumn("avatar"); cy.changeColumnType("Image", false); cy.closePropertyPane(); cy.SearchEntityandOpen("Table1"); - cy.get(widgetsPage.centerAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.centerAlign).first().click({ force: true }); cy.closePropertyPane(); cy.get(`.t--widget-tablewidget .tbody .image-cell`) .first() .should("have.css", "background-position", "50% 50%"); cy.SearchEntityandOpen("Table1"); - cy.get(widgetsPage.rightAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.rightAlign).first().click({ force: true }); cy.closePropertyPane(); cy.get(`.t--widget-tablewidget .tbody .image-cell`) .first() .should("have.css", "background-position", "100% 50%"); cy.SearchEntityandOpen("Table1"); - cy.get(widgetsPage.leftAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.leftAlign).first().click({ force: true }); cy.closePropertyPane(); cy.get(`.t--widget-tablewidget .tbody .image-cell`) .first() .should("have.css", "background-position", "0% 50%"); }); - it("4. Update table json data and check the derived column values after update", function() { + it("4. Update table json data and check the derived column values after update", function () { cy.SearchEntityandOpen("Table1"); cy.backFromPropertyPanel(); cy.tableColumnDataValidation("id"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Table_Widget_API_Pagination_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Table_Widget_API_Pagination_spec.js index 1ffccdf777..78ee8eecd0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Table_Widget_API_Pagination_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Table_Widget_API_Pagination_spec.js @@ -1,27 +1,23 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const dsl = require("../../../../fixtures/tableTextPaginationDsl.json"); -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Create an API and Execute the API and bind with Table", function() { + it("1. Create an API and Execute the API and bind with Table", function () { cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam); cy.RunAPI(); }); - it("2. Validate Table with API data and then add a column", function() { + it("2. Validate Table with API data and then add a column", function () { cy.SearchEntityandOpen("Table1"); cy.testJsontext("tabledata", "{{Api1.data.users}}"); cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox); - cy.get(`.t--widget-tablewidget .page-item`) - .first() - .should("contain", "1"); + cy.get(`.t--widget-tablewidget .page-item`).first().should("contain", "1"); cy.intercept("/api/v1/actions/execute").as("getNextPage"); - cy.get(`.t--widget-tablewidget .t--table-widget-next-page`) - .first() - .click(); + cy.get(`.t--widget-tablewidget .t--table-widget-next-page`).first().click(); cy.wait("@getNextPage").then((interception) => { const hasPaginationField = interception.request.body.includes( '"paginationField":"NEXT"', @@ -29,9 +25,7 @@ describe("Test Create Api and Bind to Table widget", function() { expect(hasPaginationField).to.equal(true); }); cy.wait(2000); - cy.get(`.t--widget-tablewidget .page-item`) - .first() - .should("contain", "2"); + cy.get(`.t--widget-tablewidget .page-item`).first().should("contain", "2"); cy.closePropertyPane(); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_dataToTableV2WithSnipingMode_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_dataToTableV2WithSnipingMode_spec.js index 381516c118..2ebf606a48 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_dataToTableV2WithSnipingMode_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_dataToTableV2WithSnipingMode_spec.js @@ -1,18 +1,18 @@ const dsl = require("../../../../fixtures/tableV2WidgetDsl.json"); -describe("Test Create Api and Bind to Table widget V2", function() { +describe("Test Create Api and Bind to Table widget V2", function () { before(() => { cy.addDsl(dsl); }); - it("1. Test_Add users api, execute it and go to sniping mode.", function() { + it("1. Test_Add users api, execute it and go to sniping mode.", function () { cy.createAndFillApi(this.data.userApi, "/mock-api?records=10"); cy.RunAPI(); cy.get(".t--select-in-canvas").click(); cy.get(".t--sniping-mode-banner").should("be.visible"); }); - it("2. Click on table name controller to bind the data and exit sniping mode", function() { + it("2. Click on table name controller to bind the data and exit sniping mode", function () { cy.get(".t--draggable-tablewidgetv2").trigger("mouseover"); cy.get(".t--settings-sniping-control").click(); cy.get(".t--property-control-tabledata .CodeMirror").contains( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_dataToTableWithSnipingMode_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_dataToTableWithSnipingMode_spec.js index 86b425dc31..23fcdd97f8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_dataToTableWithSnipingMode_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_dataToTableWithSnipingMode_spec.js @@ -1,18 +1,18 @@ const dsl = require("../../../../fixtures/tableWidgetDsl.json"); -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { before(() => { cy.addDsl(dsl); }); - it("Test_Add users api, execute it and go to sniping mode.", function() { + it("Test_Add users api, execute it and go to sniping mode.", function () { cy.createAndFillApi(this.data.userApi, "/mock-api?records=10"); cy.RunAPI(); cy.get(".t--select-in-canvas").click(); cy.get(".t--sniping-mode-banner").should("be.visible"); }); - it("Click on table name controller to bind the data and exit sniping mode", function() { + it("Click on table name controller to bind the data and exit sniping mode", function () { cy.get(".t--draggable-tablewidget").trigger("mouseover"); cy.get(".t--settings-sniping-control").click(); cy.get(".t--property-control-tabledata .CodeMirror").contains( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_tableApi_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_tableApi_spec.js index fda61d4f58..0d79b1443e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_tableApi_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_tableApi_spec.js @@ -2,13 +2,13 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const dsl = require("../../../../fixtures/tableWidgetDsl.json"); import apiPage from "../../../../locators/ApiEditor"; -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { let apiData; before(() => { cy.addDsl(dsl); }); - it("1. Test_Add users api and execute api", function() { + it("1. Test_Add users api and execute api", function () { cy.createAndFillApi(this.data.userApi, "/mock-api?records=10"); cy.RunAPI(); cy.get(apiPage.jsonResponseTab).click(); @@ -25,7 +25,7 @@ describe("Test Create Api and Bind to Table widget", function() { }); }); - it("2. Test_Validate the Api data is updated on Table widget", function() { + it("2. Test_Validate the Api data is updated on Table widget", function () { cy.SearchEntityandOpen("Table1"); //cy.openPropertyPane("tablewidget"); cy.testJsontext("tabledata", "{{ Api1.data}}"); @@ -47,14 +47,12 @@ describe("Test Create Api and Bind to Table widget", function() { cy.get(commonlocators.backToEditor).click(); }); - it("3. Validate onSearchTextChanged function is called when configured for search text", function() { + it("3. Validate onSearchTextChanged function is called when configured for search text", function () { cy.SearchEntityandOpen("Table1"); cy.togglebarDisable( ".t--property-control-enableclientsidesearch input[type='checkbox']", ); - cy.get(".t--widget-tablewidget .t--search-input") - .first() - .type("Currey"); + cy.get(".t--widget-tablewidget .t--search-input").first().type("Currey"); cy.wait("@postExecute").then((interception) => { apiData = JSON.stringify(interception.response.body.data.body[0].name); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_tableV2Api_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_tableV2Api_spec.js index 526355f0d0..5f3b7dbda1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_tableV2Api_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_tableV2Api_spec.js @@ -2,12 +2,12 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const dsl = require("../../../../fixtures/tableV2WidgetDsl.json"); import apiPage from "../../../../locators/ApiEditor"; -describe("Test Create Api and Bind to Table widget V2", function() { +describe("Test Create Api and Bind to Table widget V2", function () { let apiData; before(() => { cy.addDsl(dsl); }); - it("1. Test_Add users api and execute api", function() { + it("1. Test_Add users api and execute api", function () { cy.createAndFillApi(this.data.userApi, "/mock-api?records=100"); cy.RunAPI(); cy.get(apiPage.jsonResponseTab).click(); @@ -24,7 +24,7 @@ describe("Test Create Api and Bind to Table widget V2", function() { }); }); - it("2. Test_Validate the Api data is updated on Table widget", function() { + it("2. Test_Validate the Api data is updated on Table widget", function () { cy.SearchEntityandOpen("Table1"); cy.openPropertyPane("tablewidgetv2"); cy.testJsontext("tabledata", "{{Api1.data}}"); @@ -46,15 +46,13 @@ describe("Test Create Api and Bind to Table widget V2", function() { cy.get(commonlocators.backToEditor).click(); }); - it("3. Validate onSearchTextChanged function is called when configured for search text", function() { + it("3. Validate onSearchTextChanged function is called when configured for search text", function () { cy.SearchEntityandOpen("Table1"); cy.openPropertyPane("tablewidgetv2"); cy.togglebarDisable( ".t--property-control-clientsidesearch input[type='checkbox']", ); - cy.get(".t--widget-tablewidgetv2 .t--search-input") - .first() - .type("Currey"); + cy.get(".t--widget-tablewidgetv2 .t--search-input").first().type("Currey"); cy.wait("@postExecute").then((interception) => { apiData = JSON.stringify(interception.response.body.data.body[0].name); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Binding_TableV2_Widget_DefaultSearch_Input_widget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Binding_TableV2_Widget_DefaultSearch_Input_widget_spec.js index 698a944b6f..22d4c0aad0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Binding_TableV2_Widget_DefaultSearch_Input_widget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Binding_TableV2_Widget_DefaultSearch_Input_widget_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/formInputTableV2Dsl.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the Table and input Widget", function() { +describe("Binding the Table and input Widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Input widget test with default value from table widget", function() { + it("1. Input widget test with default value from table widget", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}"); @@ -18,7 +18,7 @@ describe("Binding the Table and input Widget", function() { ); }); - it("2. validation of data displayed in input widgets based on search value set", function() { + it("2. validation of data displayed in input widgets based on search value set", function () { cy.SearchEntityandOpen("Table1"); cy.get(".t--property-control-allowsearching input").click({ force: true }); cy.testJsontext("defaultsearchtext", "2736212"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Binding_Table_Widget_DefaultSearch_Input_widget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Binding_Table_Widget_DefaultSearch_Input_widget_spec.js index 8e3abd119a..fab1873ee0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Binding_Table_Widget_DefaultSearch_Input_widget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Binding_Table_Widget_DefaultSearch_Input_widget_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/formInputTableDsl.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the Table and input Widget", function() { +describe("Binding the Table and input Widget", function () { before(() => { cy.addDsl(dsl); }); - it("Input widget test with default value from table widget", function() { + it("Input widget test with default value from table widget", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}"); @@ -18,7 +18,7 @@ describe("Binding the Table and input Widget", function() { ); }); - it("validation of data displayed in input widgets based on search value set", function() { + it("validation of data displayed in input widgets based on search value set", function () { cy.SearchEntityandOpen("Table1"); cy.testJsontext("defaultsearchtext", "2736212"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ButtonGroup_binding_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ButtonGroup_binding_spec.js index 8f67f8fc57..b5124646c6 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ButtonGroup_binding_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ButtonGroup_binding_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../fixtures/buttonGroupDsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Widget Grouping", function() { +describe("Widget Grouping", function () { before(() => { cy.addDsl(dsl); }); - it("Button widgets widget on click info message valdiation with font family", function() { + it("Button widgets widget on click info message valdiation with font family", function () { cy.get(".t--buttongroup-widget button") .contains("Add") .click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ButtonWidgets_NavigateTo_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ButtonWidgets_NavigateTo_validation_spec.js index 3b9d899551..1c67a451a3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ButtonWidgets_NavigateTo_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ButtonWidgets_NavigateTo_validation_spec.js @@ -4,12 +4,12 @@ const widgetsPage = require("../../../../locators/Widgets.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the button Widgets and validating NavigateTo Page functionality", function() { +describe("Binding the button Widgets and validating NavigateTo Page functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Button widget with action navigate to page", function() { + it("Button widget with action navigate to page", function () { cy.openPropertyPane("buttonwidget"); cy.get(widgetsPage.actionSelect).click(); cy.get(commonlocators.chooseAction) @@ -28,7 +28,7 @@ describe("Binding the button Widgets and validating NavigateTo Page functionalit cy.wait(300); }); - it("Button click should take the control to page link validation", function() { + it("Button click should take the control to page link validation", function () { cy.PublishtheApp(); cy.wait(2000); cy.get(publish.buttonWidget).click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ChartText_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ChartText_spec.js index 52765346ac..5d610b2cf3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ChartText_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ChartText_spec.js @@ -3,11 +3,11 @@ const viewWidgetsPage = require("../../../../locators/ViewWidgets.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../fixtures/ChartTextDsl.json"); -describe("Text-Chart Binding Functionality", function() { +describe("Text-Chart Binding Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Text-Chart Binding Functionality View", function() { + it("Text-Chart Binding Functionality View", function () { cy.openPropertyPane("textwidget"); cy.testJsontext("text", JSON.stringify(this.data.chartInputValidate)); cy.get(commonlocators.TextInside).should( @@ -16,13 +16,8 @@ describe("Text-Chart Binding Functionality", function() { ); cy.closePropertyPane(); cy.openPropertyPane("chartwidget"); - cy.get(viewWidgetsPage.chartType) - .last() - .click({ force: true }); - cy.get(".t--dropdown-option") - .children() - .contains("Column Chart") - .click(); + cy.get(viewWidgetsPage.chartType).last().click({ force: true }); + cy.get(".t--dropdown-option").children().contains("Column Chart").click(); cy.get(" .t--property-control-charttype .bp3-popover-target") .last() .should("have.text", "Column Chart"); @@ -37,13 +32,11 @@ describe("Text-Chart Binding Functionality", function() { cy.get(viewWidgetsPage.rectangleChart) .eq(k) .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("Text-Chart Binding Functionality Publish", function() { + it("Text-Chart Binding Functionality Publish", function () { cy.get(publish.chartCanvasVal).should("be.visible"); cy.get(publish.chartWidget).should("have.css", "opacity", "1"); const labels = [ @@ -52,12 +45,8 @@ describe("Text-Chart Binding Functionality", function() { this.data.Chartval[2], ]; [0, 1, 2].forEach((k) => { - cy.get(publish.rectChart) - .eq(k) - .trigger("mousemove", { force: true }); - cy.get(publish.chartLab) - .eq(k) - .should("have.text", labels[k]); + cy.get(publish.rectChart).eq(k).trigger("mousemove", { force: true }); + cy.get(publish.chartLab).eq(k).should("have.text", labels[k]); }); cy.get(commonlocators.TextInside).should( "have.text", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Entity_delete_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Entity_delete_spec.js index 66911556ba..66bed6a3d1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Entity_delete_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Entity_delete_spec.js @@ -1,19 +1,15 @@ const dsl = require("../../../../fixtures/SimpleBinding.json"); const widgetsPage = require("../../../../locators/Widgets.json"); -describe("Binding the multiple widgets and validating default data", function() { +describe("Binding the multiple widgets and validating default data", function () { before(() => { cy.addDsl(dsl); }); - it("Checks if delete will remove bindings", function() { - cy.get(widgetsPage.textWidget) - .first() - .click({ force: true }); + it("Checks if delete will remove bindings", function () { + cy.get(widgetsPage.textWidget).first().click({ force: true }); cy.get("body").type("{del}", { force: true }); - cy.get(widgetsPage.textWidget) - .first() - .should("not.have.text", "Label"); + cy.get(widgetsPage.textWidget).first().should("not.have.text", "Label"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/InputWidgets_NavigateTo_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/InputWidgets_NavigateTo_validation_spec.js index 06e0333029..f125c2b26d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/InputWidgets_NavigateTo_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/InputWidgets_NavigateTo_validation_spec.js @@ -10,7 +10,7 @@ const pageid = "MyPage"; import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Binding the multiple Widgets and validating NavigateTo Page", function() { +describe("Binding the multiple Widgets and validating NavigateTo Page", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -24,7 +24,7 @@ describe("Binding the multiple Widgets and validating NavigateTo Page", function cy.wait(5000); //dsl to settle! }); - it("1. Create MyPage and valdiate if its successfully created", function() { + it("1. Create MyPage and valdiate if its successfully created", function () { cy.Createpage(pageid); cy.addDsl(dsl2); cy.wait(5000); //dsl to settle! @@ -34,15 +34,13 @@ describe("Binding the multiple Widgets and validating NavigateTo Page", function cy.get(`.t--entity-name:contains("${pageid}")`).should("be.visible"); }); - it("2. Input widget test with default value from table widget", function() { + it("2. Input widget test with default value from table widget", function () { cy.get(`.t--entity-name:contains("Page1")`) .should("be.visible") .click({ force: true }); cy.openPropertyPane("inputwidgetv2"); cy.get(widgetsPage.defaultInput).type(testdata.defaultInputWidget); - cy.get(widgetsPage.inputOnTextChange) - .first() - .click({ force: true }); + cy.get(widgetsPage.inputOnTextChange).first().click({ force: true }); cy.get(commonlocators.chooseAction) .children() .contains("Navigate to") @@ -54,7 +52,7 @@ describe("Binding the multiple Widgets and validating NavigateTo Page", function cy.assertPageSave(); }); - it("3. Validate NavigateTo Page functionality ", function() { + it("3. Validate NavigateTo Page functionality ", function () { cy.wait(4000); cy.isSelectRow(1); cy.readTabledataPublish("1", "0").then((tabData) => { @@ -66,10 +64,7 @@ describe("Binding the multiple Widgets and validating NavigateTo Page", function .invoke("attr", "value") .should("contain", tabValue); cy.get(widgetsPage.chartWidget).should("not.exist"); - cy.get(publish.inputGrp) - .first() - .type("123") - .wait(2000); + cy.get(publish.inputGrp).first().type("123").wait(2000); cy.waitUntil(() => cy.get(widgetsPage.chartWidget).should("be.visible"), { errorMsg: "Execute call did not complete evn after 20 secs", timeout: 20000, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Invalid_binding_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Invalid_binding_spec.js index 669a9ff4e9..872f38656f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Invalid_binding_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Invalid_binding_spec.js @@ -1,18 +1,18 @@ const dsl = require("../../../../fixtures/Invalid_binding_dsl.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the multiple widgets and validating default data", function() { +describe("Binding the multiple widgets and validating default data", function () { before(() => { cy.addDsl(dsl); }); - it("Dropdown widget test with invalid binding value", function() { + it("Dropdown widget test with invalid binding value", function () { cy.openPropertyPane("selectwidget"); cy.testJsontext("options", JSON.stringify(testdata.defaultdataBinding)); cy.evaluateErrorMessage(testdata.dropdownErrorMsg); }); - it("Table widget test with invalid binding value", function() { + it("Table widget test with invalid binding value", function () { cy.openPropertyPane("tablewidget"); cy.testJsontext("tabledata", JSON.stringify(testdata.defaultdataBinding)); cy.evaluateErrorMessage(testdata.tableWidgetErrorMsg); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JSObjectToInput_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JSObjectToInput_Spec.ts index 90c55f8029..ffc2c0dc9d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JSObjectToInput_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JSObjectToInput_Spec.ts @@ -16,8 +16,9 @@ describe("Validate JSObjects binding to Input widget", () => { let jsOjbNameReceived: any; - it("1. Bind Input widget with JSObject", function() { - jsEditor.CreateJSObject(`export default { + it("1. Bind Input widget with JSObject", function () { + jsEditor.CreateJSObject( + `export default { myVar1: [], myVar2: {}, myFun1: () => { @@ -26,12 +27,14 @@ describe("Validate JSObjects binding to Input widget", () => { myFun2: async () => { //use async-await or promises } - }`, { - paste: true, - completeReplace: true, - toRun: true, - shouldCreateNewJSObj: true, - }); + }`, + { + paste: true, + completeReplace: true, + toRun: true, + shouldCreateNewJSObj: true, + }, + ); ee.ExpandCollapseEntity("Widgets"); //to expand widgets ee.ExpandCollapseEntity("Form1"); ee.SelectEntityByName("Input2"); @@ -41,7 +44,10 @@ describe("Validate JSObjects binding to Input widget", () => { .should("equal", "Hello"); //Before mapping JSObject value of input cy.get("@jsObjName").then((jsObjName) => { jsOjbNameReceived = jsObjName; - propPane.UpdatePropertyFieldValue("Default Value", "{{" + jsObjName + ".myFun1()}}"); + propPane.UpdatePropertyFieldValue( + "Default Value", + "{{" + jsObjName + ".myFun1()}}", + ); }); cy.get(locator._inputWidget) .last() @@ -65,7 +71,7 @@ describe("Validate JSObjects binding to Input widget", () => { // }); }); - it("2. Bug 11529 - Verify autosave while editing JSObj & reference changes when JSObj is mapped", function() { + it("2. Bug 11529 - Verify autosave while editing JSObj & reference changes when JSObj is mapped", function () { const jsBody = `export default { myVar1: [], myVar2: {}, @@ -81,9 +87,16 @@ describe("Validate JSObjects binding to Input widget", () => { ee.ExpandCollapseEntity("Widgets"); ee.ExpandCollapseEntity("Form1"); ee.SelectEntityByName("Input2"); - cy.get(locator._inputWidget).last().invoke("attr", "value").should("equal", 'Success'); //Function is renamed & reference is checked if updated properly! - deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2")) - cy.get(locator._widgetInputSelector("inputwidgetv2")).first().should('have.value', 'Hello') - cy.get(locator._widgetInputSelector("inputwidgetv2")).last().should('have.value', 'Success') + cy.get(locator._inputWidget) + .last() + .invoke("attr", "value") + .should("equal", "Success"); //Function is renamed & reference is checked if updated properly! + deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2")); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .first() + .should("have.value", "Hello"); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .last() + .should("have.value", "Success"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JSObjectToListWidget_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JSObjectToListWidget_Spec.ts index eabba472cb..5ce31f69c0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JSObjectToListWidget_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JSObjectToListWidget_Spec.ts @@ -1,22 +1,21 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; let dataSet: any, valueToTest: any, jsName: any; - describe("Validate JSObj binding to Table widget", () => { before(() => { cy.fixture("listwidgetdsl").then((val: any) => { _.agHelper.AddDsl(val); }); - cy.fixture("example").then(function(data: any) { + cy.fixture("example").then(function (data: any) { dataSet = data; }); }); it("1. Add users api and bind to JSObject", () => { - cy.fixture("datasources").then((datasourceFormData : any) => { + cy.fixture("datasources").then((datasourceFormData: any) => { _.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]); - }) + }); _.apiPage.RunAPI(); _.agHelper.GetNClick(_.dataSources._queryResponse("JSON")); _.apiPage.ReadApiResponsebyKey("name"); @@ -38,7 +37,7 @@ describe("Validate JSObj binding to Table widget", () => { }); }); - it("2. Validate the Api data is updated on List widget + Bug 12438", function() { + it("2. Validate the Api data is updated on List widget + Bug 12438", function () { _.entityExplorer.SelectEntityByName("List1", "Widgets"); _.propPane.UpdatePropertyFieldValue( "Items", @@ -74,7 +73,7 @@ describe("Validate JSObj binding to Table widget", () => { _.deployMode.NavigateBacktoEditor(); }); - it("3. Validate the List widget + Bug 12438 ", function() { + it("3. Validate the List widget + Bug 12438 ", function () { _.entityExplorer.SelectEntityByName("List1", "Widgets"); _.propPane.moveToStyleTab(); _.propPane.UpdatePropertyFieldValue("Item Spacing (px)", "50"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JS_Toggle_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JS_Toggle_spec.js index 3a43812490..cf6985ba04 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JS_Toggle_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JS_Toggle_spec.js @@ -7,9 +7,7 @@ describe("JS Toggle tests", () => { it("switches the toggle to Button widget", () => { cy.openPropertyPane("buttonwidget"); - cy.get(".t--property-control-visible") - .find(".t--js-toggle") - .click(); + cy.get(".t--property-control-visible").find(".t--js-toggle").click(); cy.get(".t--property-control-visible") .find(".t--js-toggle") @@ -21,9 +19,7 @@ describe("JS Toggle tests", () => { // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); - cy.get(".t--property-control-visible") - .find(".t--js-toggle") - .click(); + cy.get(".t--property-control-visible").find(".t--js-toggle").click(); cy.get(".t--property-control-visible") .find(".t--js-toggle") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/LoadashBasic_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/LoadashBasic_Spec.ts index ecfabbfeac..5e46c731cb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/LoadashBasic_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/LoadashBasic_Spec.ts @@ -1,41 +1,50 @@ -import { ObjectsRegistry } from "../../../../support/Objects/Registry" +import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let dataSet: any; let agHelper = ObjectsRegistry.AggregateHelper, - ee = ObjectsRegistry.EntityExplorer, - propPane = ObjectsRegistry.PropertyPane, - locator = ObjectsRegistry.CommonLocators, - deployMode = ObjectsRegistry.DeployMode; + ee = ObjectsRegistry.EntityExplorer, + propPane = ObjectsRegistry.PropertyPane, + locator = ObjectsRegistry.CommonLocators, + deployMode = ObjectsRegistry.DeployMode; describe("Loadash basic test with input Widget", () => { - - before(() => { - cy.fixture('inputBindingdsl').then((val: any) => { - agHelper.AddDsl(val) - }); - - cy.fixture("testdata").then(function (data: any) { - dataSet = data; - }); + before(() => { + cy.fixture("inputBindingdsl").then((val: any) => { + agHelper.AddDsl(val); }); - it("1. Input widget test with default value for atob method", () => { - ee.SelectEntityByName("Input1", 'Widgets') - propPane.UpdatePropertyFieldValue("Default Value", dataSet.defaultInputBinding + "}}"); - agHelper.ValidateNetworkStatus('@updateLayout') + cy.fixture("testdata").then(function (data: any) { + dataSet = data; }); + }); - it("2. Input widget test with default value for btoa method", function () { - ee.SelectEntityByName("Input2") - propPane.UpdatePropertyFieldValue("Default Value", dataSet.loadashInput + "}}"); - agHelper.ValidateNetworkStatus('@updateLayout') - }); + it("1. Input widget test with default value for atob method", () => { + ee.SelectEntityByName("Input1", "Widgets"); + propPane.UpdatePropertyFieldValue( + "Default Value", + dataSet.defaultInputBinding + "}}", + ); + agHelper.ValidateNetworkStatus("@updateLayout"); + }); - it("3. Publish and validate the data displayed in input widgets value for aToB and bToa", function () { - deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2")) - cy.get(locator._widgetInputSelector("inputwidgetv2")).first().invoke("attr", "value") - .should("contain", "7") - cy.get(locator._widgetInputSelector("inputwidgetv2")).last().invoke("attr", "value") - .should("contain", "7"); - }); -}); \ No newline at end of file + it("2. Input widget test with default value for btoa method", function () { + ee.SelectEntityByName("Input2"); + propPane.UpdatePropertyFieldValue( + "Default Value", + dataSet.loadashInput + "}}", + ); + agHelper.ValidateNetworkStatus("@updateLayout"); + }); + + it("3. Publish and validate the data displayed in input widgets value for aToB and bToa", function () { + deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2")); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .first() + .invoke("attr", "value") + .should("contain", "7"); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .last() + .invoke("attr", "value") + .should("contain", "7"); + }); +}); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/MomentBasic_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/MomentBasic_Spec.ts index fbb486d047..00adb1dcfc 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/MomentBasic_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/MomentBasic_Spec.ts @@ -1,42 +1,49 @@ -import { ObjectsRegistry } from "../../../../support/Objects/Registry" +import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let dataSet: any; let agHelper = ObjectsRegistry.AggregateHelper, - ee = ObjectsRegistry.EntityExplorer, - propPane = ObjectsRegistry.PropertyPane, - locator = ObjectsRegistry.CommonLocators, - deployMode = ObjectsRegistry.DeployMode; + ee = ObjectsRegistry.EntityExplorer, + propPane = ObjectsRegistry.PropertyPane, + locator = ObjectsRegistry.CommonLocators, + deployMode = ObjectsRegistry.DeployMode; describe("Validate basic binding of Input widget to Input widget", () => { - - before(() => { - cy.fixture('inputBindingdsl').then((val: any) => { - agHelper.AddDsl(val) - }); - - cy.fixture("testdata").then(function (data: any) { - dataSet = data; - }); + before(() => { + cy.fixture("inputBindingdsl").then((val: any) => { + agHelper.AddDsl(val); }); - it("1. Input widget test with default value from another Input widget", () => { - ee.SelectEntityByName("Input1", 'Widgets') - propPane.UpdatePropertyFieldValue("Default Value", dataSet.defaultInputBinding + "}}"); - agHelper.ValidateNetworkStatus('@updateLayout') + cy.fixture("testdata").then(function (data: any) { + dataSet = data; }); + }); - it("2. Binding second input widget with first input widget and validating", function () { - ee.SelectEntityByName("Input2") - propPane.UpdatePropertyFieldValue("Default Value", dataSet.momentInput + "}}"); - agHelper.ValidateNetworkStatus('@updateLayout') - }); + it("1. Input widget test with default value from another Input widget", () => { + ee.SelectEntityByName("Input1", "Widgets"); + propPane.UpdatePropertyFieldValue( + "Default Value", + dataSet.defaultInputBinding + "}}", + ); + agHelper.ValidateNetworkStatus("@updateLayout"); + }); - it("3. Publish widget and validate the data displayed in input widgets", function () { - var currentTime = new Date(); - deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2")) - cy.get(locator._widgetInputSelector("inputwidgetv2")).first() - .should("contain.value", currentTime.getFullYear()); - cy.get(locator._widgetInputSelector("inputwidgetv2")).last() - .should("contain.value", currentTime.getFullYear()); - }); -}); \ No newline at end of file + it("2. Binding second input widget with first input widget and validating", function () { + ee.SelectEntityByName("Input2"); + propPane.UpdatePropertyFieldValue( + "Default Value", + dataSet.momentInput + "}}", + ); + agHelper.ValidateNetworkStatus("@updateLayout"); + }); + + it("3. Publish widget and validate the data displayed in input widgets", function () { + var currentTime = new Date(); + deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2")); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .first() + .should("contain.value", currentTime.getFullYear()); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .last() + .should("contain.value", currentTime.getFullYear()); + }); +}); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/NavigateToFeatureValidation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/NavigateToFeatureValidation_spec.js index f3df118e75..0053805755 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/NavigateToFeatureValidation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/NavigateToFeatureValidation_spec.js @@ -8,7 +8,7 @@ const pageid = "MyPage"; import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let agHelper = ObjectsRegistry.AggregateHelper; -describe("Table Widget with Input Widget and Navigate to functionality validation", function() { +describe("Table Widget with Input Widget and Navigate to functionality validation", function () { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); @@ -21,7 +21,7 @@ describe("Table Widget with Input Widget and Navigate to functionality validatio cy.addDsl(dsl); }); - it("Table Widget Functionality with multiple page", function() { + it("Table Widget Functionality with multiple page", function () { cy.openPropertyPane("tablewidget"); cy.widgetText( "Table1", @@ -31,7 +31,7 @@ describe("Table Widget with Input Widget and Navigate to functionality validatio cy.testJsontext("tabledata", JSON.stringify(testdata.TablePagination)); }); - it("Create MyPage and valdiate if its successfully created", function() { + it("Create MyPage and valdiate if its successfully created", function () { cy.Createpage(pageid); cy.addDsl(dsl2); // eslint-disable-next-line cypress/no-unnecessary-waiting @@ -40,7 +40,7 @@ describe("Table Widget with Input Widget and Navigate to functionality validatio cy.get(`.t--entity-name:contains("${pageid}")`).should("be.visible"); }); - it("Validate NavigateTo Page functionality ", function() { + it("Validate NavigateTo Page functionality ", function () { cy.get(`.t--entity-name:contains("Page1")`) .should("be.visible") .click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/No_Binding_Prompt_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/No_Binding_Prompt_spec.js index 443ba2aabc..9ded57daf3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/No_Binding_Prompt_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/No_Binding_Prompt_spec.js @@ -2,7 +2,7 @@ const dsl = require("../../../../fixtures/inputdsl.json"); const widgetsPage = require("../../../../locators/Widgets.json"); const dynamicInput = require("../../../../locators/DynamicInput.json"); -describe("Binding prompt", function() { +describe("Binding prompt", function () { before(() => { cy.addDsl(dsl); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/SelectWidget_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/SelectWidget_Spec.ts index 1fed36743f..8a88279a3c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/SelectWidget_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/SelectWidget_Spec.ts @@ -11,7 +11,7 @@ describe("Validate basic binding of Input widget to Input widget", () => { }); }); - it("1. Validation of default displayed in Select widget based on row selected", function() { + it("1. Validation of default displayed in Select widget based on row selected", function () { deployMode.DeployApp(); //Verify Default selected row is selected by default @@ -46,7 +46,7 @@ describe("Validate basic binding of Input widget to Input widget", () => { }); //Till bug fixed - it.skip("2. Validation of default displayed in Select widget based on row selected + Bug 12531", function() { + it.skip("2. Validation of default displayed in Select widget based on row selected + Bug 12531", function () { table.SelectTableRow(1); agHelper.ReadSelectedDropDownValue().then(($selectedValue) => { expect($selectedValue).to.eq("#2"); @@ -75,8 +75,8 @@ describe("Validate basic binding of Input widget to Input widget", () => { }); it("3. Verify Selecting the already selected row deselects it", () => { - table.SelectTableRow(0);//select here - table.SelectTableRow(0, 0, false);//deselect here + table.SelectTableRow(0); //select here + table.SelectTableRow(0, 0, false); //deselect here agHelper.ReadSelectedDropDownValue().then(($selectedValue) => { expect($selectedValue).to.eq("Select option"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/SmartSubstitutionWidgets_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/SmartSubstitutionWidgets_spec.js index 4de0dc193d..04ce197546 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/SmartSubstitutionWidgets_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/SmartSubstitutionWidgets_spec.js @@ -3,7 +3,7 @@ const publish = require("../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../fixtures/tableAndChart.json"); const viewWidgetsPage = require("../../../../locators/ViewWidgets.json"); -describe("Text-Table Binding Functionality", function() { +describe("Text-Table Binding Functionality", function () { const updateData = `[ { "x": "Product1", @@ -22,7 +22,7 @@ describe("Text-Table Binding Functionality", function() { cy.addDsl(dsl); }); - it("1. Update table data and assert", function() { + it("1. Update table data and assert", function () { cy.openPropertyPane("tablewidget"); cy.get(widgetLocators.tabedataField).then(($el) => { cy.updateCodeInput($el, updateData); @@ -32,7 +32,7 @@ describe("Text-Table Binding Functionality", function() { }); }); - it("2. Update chart data and assert", function() { + it("2. Update chart data and assert", function () { cy.openPropertyPane("chartwidget"); cy.get(".t--property-control-chart-series-data-control").then(($el) => { cy.updateCodeInput($el, updateData); @@ -48,7 +48,7 @@ describe("Text-Table Binding Functionality", function() { }); }); - it("3. Publish and assert", function() { + it("3. Publish and assert", function () { cy.PublishtheApp(false); cy.readTabledata("1", "0").then((cellData) => { cy.wrap(cellData).should("equal", "Product2"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2Widgets_NavigateTo_Validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2Widgets_NavigateTo_Validation_spec.js index e07cd71c22..e6f0892551 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2Widgets_NavigateTo_Validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2Widgets_NavigateTo_Validation_spec.js @@ -8,7 +8,7 @@ const pageid = "MyPage"; import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Table Widget V2 and Navigate to functionality validation", function() { +describe("Table Widget V2 and Navigate to functionality validation", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -22,7 +22,7 @@ describe("Table Widget V2 and Navigate to functionality validation", function() cy.wait(2000); //dsl to settle! }); - it("1. Create MyPage and validate if its successfully created", function() { + it("1. Create MyPage and validate if its successfully created", function () { cy.Createpage(pageid); cy.addDsl(dsl2); // eslint-disable-next-line cypress/no-unnecessary-waiting @@ -31,7 +31,7 @@ describe("Table Widget V2 and Navigate to functionality validation", function() cy.get(`.t--entity-name:contains("${pageid}")`).should("be.visible"); }); - it("2. Table Widget V2 Functionality with multiple page", function() { + it("2. Table Widget V2 Functionality with multiple page", function () { cy.get(`.t--entity-name:contains("Page1")`) .should("be.visible") .click({ force: true }); @@ -43,9 +43,7 @@ describe("Table Widget V2 and Navigate to functionality validation", function() ); cy.testJsontext("tabledata", JSON.stringify(testdata.TablePagination)); cy.focused().blur(); - cy.get(widgetsPage.tableOnRowSelect) - .scrollIntoView() - .should("be.visible"); + cy.get(widgetsPage.tableOnRowSelect).scrollIntoView().should("be.visible"); cy.get(widgetsPage.tableOnRowSelect).click(); cy.get(commonlocators.chooseAction) .children() @@ -58,7 +56,7 @@ describe("Table Widget V2 and Navigate to functionality validation", function() cy.assertPageSave(); }); - it("3. Validate NavigateTo Page functionality ", function() { + it("3. Validate NavigateTo Page functionality ", function () { cy.wait(2000); cy.PublishtheApp(); cy.get(widgetsPage.chartWidget).should("not.exist"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_ClientSide_Search_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_ClientSide_Search_spec.js index 31418ffde4..5910b81cb8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_ClientSide_Search_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_ClientSide_Search_spec.js @@ -1,16 +1,14 @@ const dsl = require("../../../../fixtures/TableV2ClientSearch.json"); -describe("Test Create Api and Bind to Table widget V2", function() { +describe("Test Create Api and Bind to Table widget V2", function () { before(() => { cy.addDsl(dsl); }); - it("1. Validate onSearchTextChanged function is called when configured for search text", function() { + it("1. Validate onSearchTextChanged function is called when configured for search text", function () { cy.wait(5000); // input text in search bar - cy.get(".t--widget-tablewidgetv2 .t--search-input input") - .first() - .type("2"); + cy.get(".t--widget-tablewidgetv2 .t--search-input input").first().type("2"); cy.wait(5000); // Verify it filtered the table cy.readTableV2dataPublish("0", "0").then((tabData) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Property_ToggleJs_With_Binding_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Property_ToggleJs_With_Binding_spec.js index c1016424ab..8383efb7ad 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Property_ToggleJs_With_Binding_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Property_ToggleJs_With_Binding_spec.js @@ -4,18 +4,16 @@ const widgetsPage = require("../../../../locators/Widgets.json"); const dsl = require("../../../../fixtures/tableV2NewDsl.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Table Widget V2 property pane feature validation", function() { +describe("Table Widget V2 property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Table widget V2 toggle test for text alignment", function() { + it("1. Table widget V2 toggle test for text alignment", function () { cy.openPropertyPane("tablewidgetv2"); cy.editColumn("id"); cy.moveToStyleTab(); - cy.get(widgetsPage.toggleTextAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.toggleTextAlign).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdate("tabledata", testdata.bindingAlign); @@ -24,20 +22,16 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "justify-content", "flex-end"); }); - it("2. Table widget V2 change text size and validate", function() { + it("2. Table widget V2 change text size and validate", function () { cy.readTableV2dataValidateCSS("0", "0", "font-size", "14px"); cy.openPropertyPane("tablewidgetv2"); cy.get(".t--property-pane-back-btn").click({ force: true }); cy.editColumn("id"); cy.moveToStyleTab(); - cy.get(widgetsPage.toggleTextAlign) - .first() - .click({ force: true }); + 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 }); + cy.get(widgetsPage.textSize).last().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.selectTxtSize("XL"); @@ -45,14 +39,12 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("0", "0", "font-size", "30px"); }); - it("3. Table widget toggle test for text size", function() { + it("3. Table widget toggle test for text size", function () { cy.openPropertyPane("tablewidgetv2"); cy.get(".t--property-pane-back-btn").click({ force: true }); cy.editColumn("id"); cy.moveToStyleTab(); - cy.get(widgetsPage.toggleTextSize) - .first() - .click({ force: true }); + cy.get(widgetsPage.toggleTextSize).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdateWithIndex("tabledata", testdata.bindingNewSize, 0); @@ -61,19 +53,15 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "font-size", "24px"); }); - it("4. Table widget toggle test for vertical Alignment", function() { + it("4. Table widget toggle test for vertical Alignment", function () { cy.openPropertyPane("tablewidgetv2"); cy.get(".t--property-pane-back-btn").click({ force: true }); cy.editColumn("id"); cy.moveToStyleTab(); - cy.get(widgetsPage.toggleTextSize) - .first() - .click({ force: true }); + 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 }); + cy.get(widgetsPage.toggleVerticalAlig).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdateWithIndex("tabledata", testdata.bindingVerticalAlig, 2); @@ -82,7 +70,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "align-items", "flex-end"); }); - it("5. Table widget V2 toggle test for style Alignment", function() { + it("5. Table widget V2 toggle test for style Alignment", function () { cy.openPropertyPane("tablewidgetv2"); cy.get(".t--property-pane-back-btn").click({ force: true }); cy.editColumn("id"); @@ -94,9 +82,7 @@ describe("Table Widget V2 property pane feature validation", function() { */ // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); - cy.get(widgetsPage.toggleTextStyle) - .first() - .click({ force: true }); + cy.get(widgetsPage.toggleTextStyle).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdateWithIndex("tabledata", testdata.bindingStyle, 1); @@ -105,19 +91,15 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "font-style", "italic"); }); - it("6. Table widget toggle test for text color", function() { + it("6. Table widget toggle test for text color", function () { cy.openPropertyPane("tablewidgetv2"); cy.get(".t--property-pane-back-btn").click({ force: true }); cy.editColumn("id"); cy.moveToStyleTab(); - cy.get(widgetsPage.toggleVerticalAlig) - .first() - .click({ force: true }); + 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 }); + cy.get(widgetsPage.toggleJsColor).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdate("tabledata", testdata.bindingTextColor); @@ -127,19 +109,15 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "color", "rgb(255, 0, 0)"); }); - it("7. Table widget toggle test for background color", function() { + it("7. Table widget toggle test for background color", function () { cy.openPropertyPane("tablewidgetv2"); cy.get(".t--property-pane-back-btn").click({ force: true }); cy.editColumn("id"); cy.moveToStyleTab(); - cy.get(widgetsPage.toggleJsColor) - .first() - .click({ force: true }); + 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 }); + cy.get(widgetsPage.toggleJsBcgColor).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdateWithIndex("tabledata", testdata.bindingTextColor, 4); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Style_ToggleJS_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Style_ToggleJS_spec.js index c05f8cc99d..af09e966a1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Style_ToggleJS_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Style_ToggleJS_spec.js @@ -9,12 +9,12 @@ const propPane = ObjectsRegistry.PropertyPane, ee = ObjectsRegistry.EntityExplorer, agHelper = ObjectsRegistry.AggregateHelper; -describe("Table Widget V2 property pane feature validation", function() { +describe("Table Widget V2 property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Table widget V2 toggle test for text alignment", function() { + it("1. Table widget V2 toggle test for text alignment", function () { ee.SelectEntityByName("Table1"); cy.editColumn("id"); cy.moveToStyleTab(); @@ -25,18 +25,16 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "justify-content", "flex-end"); }); - it("2. Table widget V2 change text size and validate", function() { + it("2. Table widget V2 change text size and validate", function () { cy.readTableV2dataValidateCSS("0", "0", "font-size", "14px"); //cy.movetoStyleTab(); - cy.get(widgetsPage.textSize) - .last() - .click({ force: true }); + cy.get(widgetsPage.textSize).last().click({ force: true }); agHelper.Sleep(); cy.selectTxtSize("XL"); cy.readTableV2dataValidateCSS("0", "0", "font-size", "30px"); }); - it("3. Table widget toggle test for vertical Alignment", function() { + it("3. Table widget toggle test for vertical Alignment", function () { //cy.movetoStyleTab(); agHelper.Sleep(); propPane.EnterJSContext("Vertical Alignment", testdata.bindingVerticalAlig); @@ -45,7 +43,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "align-items", "flex-end"); }); - it("4. Table widget toggle test for text size", function() { + it("4. Table widget toggle test for text size", function () { //cy.movetoStyleTab(); agHelper.Sleep(); propPane.EnterJSContext("Text Size", testdata.bindingNewSize); @@ -54,7 +52,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "font-size", "24px"); }); - it("5. Table widget V2 toggle test for style Alignment", function() { + it("5. Table widget V2 toggle test for style Alignment", function () { agHelper.Sleep(); propPane.EnterJSContext("Emphasis", testdata.bindingStyle); cy.wait("@updateLayout"); @@ -62,7 +60,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "font-style", "italic"); }); - it("6. Table widget toggle test for text color", function() { + it("6. Table widget toggle test for text color", function () { //cy.movetoStyleTab(); agHelper.Sleep(); propPane.EnterJSContext("Text Color", testdata.bindingTextColor); @@ -71,7 +69,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "color", "rgb(255, 0, 0)"); }); - it("7. Table widget toggle test for background color", function() { + it("7. Table widget toggle test for background color", function () { //cy.movetoStyleTab(); agHelper.Sleep(); propPane.EnterJSContext("Cell Background", testdata.bindingTextColor); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Widget__CondtionalFormatting_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Widget__CondtionalFormatting_spec.js index 4f97a87c3f..b8605cd561 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Widget__CondtionalFormatting_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Widget__CondtionalFormatting_spec.js @@ -1,12 +1,12 @@ /* eslint-disable cypress/no-unnecessary-waiting */ const dsl = require("../../../../fixtures/tableV2WidgetCondnFormatDsl.json"); -describe("Table Widget V2 condtional formatting to remain consistent", function() { +describe("Table Widget V2 condtional formatting to remain consistent", function () { before(() => { cy.addDsl(dsl); }); - it("1. check the cell styles before and after sorting", function() { + it("1. check the cell styles before and after sorting", function () { cy.openPropertyPane("tablewidgetv2"); //Check Font weight, font style, and text color before sorting cy.readTableV2dataValidateCSS("0", "1", "font-weight", "700"); @@ -15,9 +15,7 @@ describe("Table Widget V2 condtional formatting to remain consistent", function( cy.readTableV2dataValidateCSS("1", "1", "font-weight", "400"); cy.readTableV2dataValidateCSS("1", "1", "font-style", "italic"); cy.readTableV2dataValidateCSS("1", "1", "color", "rgb(255, 0, 0)"); - cy.get(".draggable-header") - .contains("id") - .click({ force: true }); + cy.get(".draggable-header").contains("id").click({ force: true }); //Check Font weight, font style, and text color after sorting cy.readTableV2dataValidateCSS("3", "1", "font-weight", "700"); cy.readTableV2dataValidateCSS("3", "1", "font-style", "normal"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableWidgets_NavigateTo_Validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableWidgets_NavigateTo_Validation_spec.js index d50e17dcfc..e407a53a7a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableWidgets_NavigateTo_Validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableWidgets_NavigateTo_Validation_spec.js @@ -7,7 +7,7 @@ const pageid = "MyPage"; import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Table Widget and Navigate to functionality validation", function() { +describe("Table Widget and Navigate to functionality validation", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -21,7 +21,7 @@ describe("Table Widget and Navigate to functionality validation", function() { cy.wait(2000); //dsl to settle! }); - it("Create MyPage and valdiate if its successfully created", function() { + it("Create MyPage and valdiate if its successfully created", function () { cy.Createpage(pageid); cy.addDsl(dsl2); // eslint-disable-next-line cypress/no-unnecessary-waiting @@ -30,7 +30,7 @@ describe("Table Widget and Navigate to functionality validation", function() { cy.get(`.t--entity-name:contains("${pageid}")`).should("be.visible"); }); - it("Table Widget Functionality with multiple page", function() { + it("Table Widget Functionality with multiple page", function () { cy.get(`.t--entity-name:contains("Page1")`) .should("be.visible") .click({ force: true }); @@ -42,9 +42,7 @@ describe("Table Widget and Navigate to functionality validation", function() { ); cy.testJsontext("tabledata", JSON.stringify(testdata.TablePagination)); cy.focused().blur(); - cy.get(widgetsPage.tableOnRowSelect) - .scrollIntoView() - .click(); + cy.get(widgetsPage.tableOnRowSelect).scrollIntoView().click(); cy.get(commonlocators.chooseAction) .children() .contains("Navigate to") @@ -56,7 +54,7 @@ describe("Table Widget and Navigate to functionality validation", function() { cy.assertPageSave(); }); - it("Validate NavigateTo Page functionality ", function() { + it("Validate NavigateTo Page functionality ", function () { cy.wait(2000); cy.PublishtheApp(); cy.get(widgetsPage.chartWidget).should("not.exist"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_ClientSide_Search_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_ClientSide_Search_spec.js index 3b899b814f..d31b003c6d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_ClientSide_Search_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_ClientSide_Search_spec.js @@ -1,16 +1,14 @@ const dsl = require("../../../../fixtures/TableClientSearch.json"); -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { before(() => { cy.addDsl(dsl); }); - it("Validate onSearchTextChanged function is called when configured for search text", function() { + it("Validate onSearchTextChanged function is called when configured for search text", function () { cy.wait(5000); // input text in search bar - cy.get(".t--widget-tablewidget .t--search-input input") - .first() - .type("2"); + cy.get(".t--widget-tablewidget .t--search-input input").first().type("2"); cy.wait(5000); // Verify it filtered the table cy.readTabledataPublish("0", "0").then((tabData) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_Style_ToggleJS_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_Style_ToggleJS_spec.js index f704687065..fc86b73ac5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_Style_ToggleJS_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_Style_ToggleJS_spec.js @@ -9,12 +9,12 @@ const propPane = ObjectsRegistry.PropertyPane, ee = ObjectsRegistry.EntityExplorer, agHelper = ObjectsRegistry.AggregateHelper; -describe("Table Widget property pane feature validation", function() { +describe("Table Widget property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Table widget toggle test for text alignment", function() { + it("1. Table widget toggle test for text alignment", function () { ee.SelectEntityByName("Table1"); cy.editColumn("id"); //cy.movetoStyleTab(); @@ -25,18 +25,16 @@ describe("Table Widget property pane feature validation", function() { cy.readTabledataValidateCSS("1", "0", "justify-content", "flex-end"); }); - it("2. Table widget change text size and validate", function() { + it("2. Table widget change text size and validate", function () { cy.readTabledataValidateCSS("0", "0", "font-size", "14px"); //cy.movetoStyleTab(); - cy.get(widgetsPage.textSize) - .last() - .click({ force: true }); + cy.get(widgetsPage.textSize).last().click({ force: true }); agHelper.Sleep(); cy.selectTxtSize("XL"); cy.readTabledataValidateCSS("0", "0", "font-size", "30px"); }); - it("3. Table widget toggle test for vertical Alignment", function() { + it("3. Table widget toggle test for vertical Alignment", function () { //cy.movetoStyleTab(); agHelper.Sleep(); propPane.EnterJSContext("Vertical Alignment", testdata.bindingVerticalAlig); @@ -45,7 +43,7 @@ describe("Table Widget property pane feature validation", function() { cy.readTabledataValidateCSS("1", "0", "align-items", "flex-end"); }); - it("4. Table widget toggle test for text size", function() { + it("4. Table widget toggle test for text size", function () { //cy.movetoStyleTab(); agHelper.Sleep(); propPane.EnterJSContext("Text Size", testdata.bindingSize); @@ -54,7 +52,7 @@ describe("Table Widget property pane feature validation", function() { cy.readTabledataValidateCSS("1", "0", "font-size", "24px"); }); - it("5. Table widget toggle test for style Alignment", function() { + it("5. Table widget toggle test for style Alignment", function () { //cy.movetoStyleTab(); agHelper.Sleep(); propPane.EnterJSContext("Font Style", testdata.bindingStyle); @@ -63,7 +61,7 @@ describe("Table Widget property pane feature validation", function() { cy.readTabledataValidateCSS("1", "0", "font-style", "italic"); }); - it("6. Table widget toggle test for text color", function() { + it("6. Table widget toggle test for text color", function () { //cy.movetoStyleTab(); agHelper.Sleep(); propPane.EnterJSContext("Text Color", testdata.bindingTextColor); @@ -72,7 +70,7 @@ describe("Table Widget property pane feature validation", function() { cy.readTabledataValidateCSS("1", "0", "color", "rgb(255, 0, 0)"); }); - it("7. Table widget toggle test for background color", function() { + it("7. Table widget toggle test for background color", function () { //cy.movetoStyleTab(); agHelper.Sleep(); propPane.EnterJSContext("Cell Background", testdata.bindingTextColor); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_Widget__CondtionalFormatting_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_Widget__CondtionalFormatting_spec.js index 8e6810b6fb..ebc6ba6615 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_Widget__CondtionalFormatting_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_Widget__CondtionalFormatting_spec.js @@ -1,12 +1,12 @@ /* eslint-disable cypress/no-unnecessary-waiting */ const dsl = require("../../../../fixtures/tableWidgetCondnFormatDsl.json"); -describe("Table Widget condtional formatting to remain consistent", function() { +describe("Table Widget condtional formatting to remain consistent", function () { before(() => { cy.addDsl(dsl); }); - it("check the cell styles before and after sorting", function() { + it("check the cell styles before and after sorting", function () { cy.openPropertyPane("tablewidget"); //Check Font weight, font style, and text color before sorting @@ -18,9 +18,7 @@ describe("Table Widget condtional formatting to remain consistent", function() { cy.readTabledataValidateCSS("1", "1", "font-style", "italic"); cy.readTabledataValidateCSS("1", "1", "color", "rgb(255, 0, 0)"); - cy.get(".draggable-header") - .contains("id") - .click({ force: true }); + cy.get(".draggable-header").contains("id").click({ force: true }); //Check Font weight, font style, and text color after sorting cy.readTabledataValidateCSS("3", "1", "font-weight", "700"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TextTableV2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TextTableV2_spec.js index 20885e339c..8a979d3718 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TextTableV2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TextTableV2_spec.js @@ -2,7 +2,7 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../fixtures/TextTableV2dsl.json"); -describe("Text-Table v2 Binding Functionality", function() { +describe("Text-Table v2 Binding Functionality", function () { Cypress.on("uncaught:exception", (err, runnable) => { // returning false here prevents Cypress from // failing the test @@ -13,7 +13,7 @@ describe("Text-Table v2 Binding Functionality", function() { cy.addDsl(dsl); }); - it("1. Text-Table Binding Functionality For Id", function() { + it("1. Text-Table Binding Functionality For Id", function () { cy.openPropertyPane("tablewidgetv2"); /** * @param(Index) Provide index value to select the row. @@ -40,7 +40,7 @@ describe("Text-Table v2 Binding Functionality", function() { }); }); - it("2. Text-Table Binding Functionality For Email", function() { + it("2. Text-Table Binding Functionality For Email", function () { cy.get(publish.backToEditor).click(); cy.isSelectRow(2); cy.openPropertyPane("textwidget"); @@ -64,7 +64,7 @@ describe("Text-Table v2 Binding Functionality", function() { }); }); - it("3. Text-Table Binding Functionality For Total Length", function() { + it("3. Text-Table Binding Functionality For Total Length", function () { cy.get(publish.backToEditor).click(); cy.openPropertyPane("textwidget"); cy.testJsontext("text", "{{Table1.pageSize}}"); @@ -87,7 +87,7 @@ describe("Text-Table v2 Binding Functionality", function() { }); }); - it("4. Table Widget Functionality To Verify Default Row Selection is working", function() { + it("4. Table Widget Functionality To Verify Default Row Selection is working", function () { cy.get(publish.backToEditor).click(); cy.openPropertyPane("tablewidgetv2"); cy.testJsontext("defaultselectedrow", "2"); @@ -107,7 +107,7 @@ describe("Text-Table v2 Binding Functionality", function() { }); }); - it("5. Text-Table Binding Functionality For Username", function() { + it("5. Text-Table Binding Functionality For Username", function () { cy.get(publish.backToEditor).click(); /** * @param(Index) Provide index value to select the row. diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TextTable_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TextTable_spec.js index 50adeef01c..559c0a4030 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TextTable_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TextTable_spec.js @@ -2,7 +2,7 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../fixtures/TextTabledsl.json"); -describe("Text-Table Binding Functionality", function() { +describe("Text-Table Binding Functionality", function () { Cypress.on("uncaught:exception", (err, runnable) => { // returning false here prevents Cypress from // failing the test @@ -12,7 +12,7 @@ describe("Text-Table Binding Functionality", function() { before(() => { cy.addDsl(dsl); }); - it("Text-Table Binding Functionality For Id", function() { + it("Text-Table Binding Functionality For Id", function () { cy.openPropertyPane("tablewidget"); /** * @param(Index) Provide index value to select the row. @@ -38,7 +38,7 @@ describe("Text-Table Binding Functionality", function() { }); }); }); - it("Text-Table Binding Functionality For Email", function() { + it("Text-Table Binding Functionality For Email", function () { cy.get(publish.backToEditor).click(); cy.isSelectRow(2); cy.openPropertyPane("textwidget"); @@ -61,7 +61,7 @@ describe("Text-Table Binding Functionality", function() { }); }); }); - it("Text-Table Binding Functionality For Total Length", function() { + it("Text-Table Binding Functionality For Total Length", function () { cy.get(publish.backToEditor).click(); cy.openPropertyPane("textwidget"); cy.testJsontext("text", "{{Table1.pageSize}}"); @@ -82,7 +82,7 @@ describe("Text-Table Binding Functionality", function() { }); }); }); - it("Table Widget Functionality To Verify Default Row Selection is working", function() { + it("Table Widget Functionality To Verify Default Row Selection is working", function () { cy.get(publish.backToEditor).click(); cy.openPropertyPane("tablewidget"); cy.testJsontext("defaultselectedrow", "2"); @@ -101,7 +101,7 @@ describe("Text-Table Binding Functionality", function() { cy.get(commonlocators.TextInside).should("have.text", tabValueP); }); }); - it("Text-Table Binding Functionality For Username", function() { + it("Text-Table Binding Functionality For Username", function () { cy.get(publish.backToEditor).click(); /** * @param(Index) Provide index value to select the row. diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widget_loading_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widget_loading_spec.js index 298d3999aa..56d478463f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widget_loading_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widget_loading_spec.js @@ -9,12 +9,12 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const dataSources = ObjectsRegistry.DataSources; let datasourceName; -describe("Binding the multiple widgets and validating default data", function() { +describe("Binding the multiple widgets and validating default data", function () { before(() => { cy.addDsl(dsl); }); - it("1. Create a postgres datasource", function() { + it("1. Create a postgres datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.PostgreSQL).click(); cy.fillPostgresDatasourceForm(); @@ -34,7 +34,7 @@ describe("Binding the multiple widgets and validating default data", function() dataSources.RunQuery(); }); - it("3. Button widget test with on action query run", function() { + it("3. Button widget test with on action query run", function () { cy.SearchEntityandOpen("Button1"); cy.executeDbQuery("Query1"); cy.wait("@updateLayout").should( @@ -44,7 +44,7 @@ describe("Binding the multiple widgets and validating default data", function() ); }); - it("4. Input widget test with default value update with query data", function() { + it("4. Input widget test with default value update with query data", function () { cy.SearchEntityandOpen("Input1"); cy.get(widgetsPage.defaultInput).type(testdata.defaultInputQuery); cy.wait("@updateLayout").should( @@ -54,13 +54,11 @@ describe("Binding the multiple widgets and validating default data", function() ); }); - it("5. Publish App and validate loading functionalty", function() { + it("5. Publish App and validate loading functionalty", function () { cy.PublishtheApp(); //eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(widgetsPage.widgetBtn) - .first() - .click({ force: true }); + cy.get(widgetsPage.widgetBtn).first().click({ force: true }); cy.wait("@postExecute").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_Default_data_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_Default_data_validation_spec.js index c4fb2f5833..296a421580 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_Default_data_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_Default_data_validation_spec.js @@ -3,12 +3,12 @@ const widgetsPage = require("../../../../locators/Widgets.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the multiple widgets and validating default data", function() { +describe("Binding the multiple widgets and validating default data", function () { before(() => { cy.addDsl(dsl); }); - it("Input widget test with default value from table widget", function() { + it("Input widget test with default value from table widget", function () { cy.openPropertyPane("inputwidgetv2"); cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}"); @@ -20,7 +20,7 @@ describe("Binding the multiple widgets and validating default data", function() }); //To be enabled once the single select multi select issues are resolved - it("Dropdown widget test with default value from table widget", function() { + it("Dropdown widget test with default value from table widget", function () { cy.openPropertyPane("selectwidget"); cy.testJsontext("options", JSON.stringify(testdata.deafultDropDownWidget)); @@ -31,7 +31,7 @@ describe("Binding the multiple widgets and validating default data", function() ); }); - it("validation of default data displayed in all widgets based on row selected", function() { + it("validation of default data displayed in all widgets based on row selected", function () { cy.isSelectRow(1); cy.readTabledataPublish("1", "0").then((tabData) => { const tabValue = tabData; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_Dependancy_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_Dependancy_validation_spec.js index f508a7cdd6..d9048a6799 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_Dependancy_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_Dependancy_validation_spec.js @@ -3,7 +3,7 @@ const dsl = require("../../../../fixtures/MultipleInput.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the multiple input Widget", function() { +describe("Binding the multiple input Widget", function () { before(() => { cy.addDsl(dsl); }); @@ -14,7 +14,7 @@ describe("Binding the multiple input Widget", function() { return false; }); - it("1. Cyclic depedancy error message validation", function() { + it("1. Cyclic depedancy error message validation", function () { cy.openPropertyPane("inputwidgetv2"); cy.testJsontext("defaultvalue", testdata.defaultMoustacheData + "}}"); @@ -26,7 +26,7 @@ describe("Binding the multiple input Widget", function() { cy.get(commonlocators.toastmsg).contains("Cyclic dependency"); }); - it("2. Binding input widget1 and validating", function() { + it("2. Binding input widget1 and validating", function () { cy.openPropertyPane("inputwidgetv2"); cy.testJsontext("defaultvalue", testdata.defaultdata); @@ -41,7 +41,7 @@ describe("Binding the multiple input Widget", function() { .should("contain", testdata.defaultdata); }); - it("3. Binding second input widget with first input widget and validating", function() { + it("3. Binding second input widget with first input widget and validating", function () { cy.selectEntityByName("Input2"); cy.testJsontext("defaultvalue", testdata.defaultMoustacheData + "}}"); @@ -64,7 +64,7 @@ describe("Binding the multiple input Widget", function() { cy.get(publish.backToEditor).click(); }); - it("4. Binding third input widget with first input widget and validating", function() { + it("4. Binding third input widget with first input widget and validating", function () { cy.CheckAndUnfoldWidgets(); cy.selectEntityByName("Input3"); cy.testJsontext("defaultvalue", testdata.defaultMoustacheData + "}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_form_input_tableV2_default_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_form_input_tableV2_default_validation_spec.js index 2117b41d71..427c2c883b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_form_input_tableV2_default_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_form_input_tableV2_default_validation_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/formInputTableV2Dsl.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the multiple input Widget", function() { +describe("Binding the multiple input Widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Input widget test with default value from table widget v2", function() { + it("1. Input widget test with default value from table widget v2", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}"); @@ -19,7 +19,7 @@ describe("Binding the multiple input Widget", function() { ); }); - it("2. Validation of data displayed in all widgets based on row selected", function() { + it("2. Validation of data displayed in all widgets based on row selected", function () { cy.isSelectRow(1); cy.readTableV2dataPublish("1", "0").then((tabData) => { const tabValue = tabData; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_form_input_table_default_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_form_input_table_default_validation_spec.js index 48de1f0067..794419b4f7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_form_input_table_default_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_form_input_table_default_validation_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/formInputTableDsl.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the multiple input Widget", function() { +describe("Binding the multiple input Widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Input widget test with default value from table widget", function() { + it("1. Input widget test with default value from table widget", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}"); @@ -19,7 +19,7 @@ describe("Binding the multiple input Widget", function() { ); }); - it("2. Validation of data displayed in all widgets based on row selected", function() { + it("2. Validation of data displayed in all widgets based on row selected", function () { cy.isSelectRow(1); cy.readTabledataPublish("1", "0").then((tabData) => { const tabValue = tabData; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/aTobAndbToaBasic_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/aTobAndbToaBasic_Spec.ts index e5b05093e4..f62935fbdb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/aTobAndbToaBasic_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/aTobAndbToaBasic_Spec.ts @@ -1,43 +1,58 @@ -import { ObjectsRegistry } from "../../../../support/Objects/Registry" +import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let dataSet: any; let agHelper = ObjectsRegistry.AggregateHelper, - ee = ObjectsRegistry.EntityExplorer, - propPane = ObjectsRegistry.PropertyPane, - locator = ObjectsRegistry.CommonLocators, - deployMode = ObjectsRegistry.DeployMode; + ee = ObjectsRegistry.EntityExplorer, + propPane = ObjectsRegistry.PropertyPane, + locator = ObjectsRegistry.CommonLocators, + deployMode = ObjectsRegistry.DeployMode; describe("Validate basic binding of Input widget to Input widget", () => { - - before(() => { - cy.fixture('inputBindingdsl').then((val: any) => { - agHelper.AddDsl(val) - }); - - cy.fixture("testdata").then(function (data: any) { - dataSet = data; - }); + before(() => { + cy.fixture("inputBindingdsl").then((val: any) => { + agHelper.AddDsl(val); }); - it("1. Input widget test with default value for atob method", () => { - ee.SelectEntityByName("Input1", 'Widgets') - propPane.UpdatePropertyFieldValue("Default Value", dataSet.atobInput + "}}"); - agHelper.ValidateNetworkStatus('@updateLayout') - cy.get(locator._inputWidget).first().invoke("attr", "value").should("equal", 'A');//Before mapping JSObject value of input + cy.fixture("testdata").then(function (data: any) { + dataSet = data; }); + }); - it("2. Input widget test with default value for btoa method", function () { - ee.SelectEntityByName("Input2") - propPane.UpdatePropertyFieldValue("Default Value", dataSet.btoaInput + "}}"); - agHelper.ValidateNetworkStatus('@updateLayout') - cy.get(locator._inputWidget).last().invoke("attr", "value").should("equal", 'QQ==');//Before mapping JSObject value of input - }); + it("1. Input widget test with default value for atob method", () => { + ee.SelectEntityByName("Input1", "Widgets"); + propPane.UpdatePropertyFieldValue( + "Default Value", + dataSet.atobInput + "}}", + ); + agHelper.ValidateNetworkStatus("@updateLayout"); + cy.get(locator._inputWidget) + .first() + .invoke("attr", "value") + .should("equal", "A"); //Before mapping JSObject value of input + }); - it("3. Publish and validate the data displayed in input widgets value for aToB and bToa", function () { - deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2")) - cy.get(locator._widgetInputSelector("inputwidgetv2")).first().invoke("attr", "value") - .should("contain", "A") - cy.get(locator._widgetInputSelector("inputwidgetv2")).last().invoke("attr", "value") - .should("contain", "QQ=="); - }); -}); \ No newline at end of file + it("2. Input widget test with default value for btoa method", function () { + ee.SelectEntityByName("Input2"); + propPane.UpdatePropertyFieldValue( + "Default Value", + dataSet.btoaInput + "}}", + ); + agHelper.ValidateNetworkStatus("@updateLayout"); + cy.get(locator._inputWidget) + .last() + .invoke("attr", "value") + .should("equal", "QQ=="); //Before mapping JSObject value of input + }); + + it("3. Publish and validate the data displayed in input widgets value for aToB and bToa", function () { + deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2")); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .first() + .invoke("attr", "value") + .should("contain", "A"); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .last() + .invoke("attr", "value") + .should("contain", "QQ=="); + }); +}); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/xmlParser_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/xmlParser_spec.js index 32d6e3d223..09b520c3f1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/xmlParser_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/xmlParser_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../fixtures/xmlParser.json"); const publish = require("../../../../locators/publishWidgetspage.json"); -describe("xml2json text", function() { +describe("xml2json text", function () { before(() => { cy.addDsl(dsl); }); - it("publish widget and validate the data displayed in text widget from xmlParser function", function() { + it("publish widget and validate the data displayed in text widget from xmlParser function", function () { cy.PublishtheApp(); cy.get(publish.textWidget) .first() diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Branding/Branding_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Branding/Branding_spec.js index fbdbe38307..7a52cf4f90 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Branding/Branding_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Branding/Branding_spec.js @@ -40,10 +40,7 @@ describe("Branding", () => { it("2. Should test that changing logo,favicon and color changes the preview", () => { // branding color - cy.get(locators.AdminSettingsColorInput) - .focus() - .clear() - .type("red"); + cy.get(locators.AdminSettingsColorInput).focus().clear().type("red"); cy.get(".t--branding-bg").should( "have.css", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/AbortAction_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/AbortAction_Spec.ts index a4313fac1b..5a69436d4d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/AbortAction_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/AbortAction_Spec.ts @@ -8,8 +8,8 @@ import { const largeResponseApiUrl = "https://api.publicapis.org/entries"; //"https://jsonplaceholder.typicode.com/photos";//Commenting since this is faster sometimes & case is failing -describe("Abort Action Execution", function() { - it("1. Bug #14006, #16093 - Cancel Request button should abort API action execution", function() { +describe("Abort Action Execution", function () { + it("1. Bug #14006, #16093 - Cancel Request button should abort API action execution", function () { _.apiPage.CreateAndFillApi(largeResponseApiUrl, "AbortApi", 0); _.apiPage.RunAPI(false, 0); _.agHelper.GetNClick(_.locators._cancelActionExecution, 0, true); @@ -23,7 +23,7 @@ describe("Abort Action Execution", function() { // Queries were resolving quicker than we could cancel them // Commenting this out till we can find a query that resolves slow enough for us to cancel its execution. - it("2. Bug #14006, #16093 Cancel Request button should abort Query action execution", function() { + it("2. Bug #14006, #16093 Cancel Request button should abort Query action execution", function () { _.dataSources.CreateDataSource("MySql"); cy.get("@dsName").then(($dsName) => { _.dataSources.CreateQueryAfterDSSaved( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/AllWidgets_Reset_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/AllWidgets_Reset_Spec.ts index c27ba5f627..43cddb48c8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/AllWidgets_Reset_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/AllWidgets_Reset_Spec.ts @@ -187,7 +187,7 @@ function selectTabAndReset() { } function selectTableAndReset() { - table.SelectTableRow(1,0, true, "v2"); + table.SelectTableRow(1, 0, true, "v2"); agHelper.GetNAssertElementText( locator._textWidgetInDeployed, "#2", @@ -202,9 +202,7 @@ function selectTableAndReset() { } function selectSwitchGroupAndReset() { - cy.get(".bp3-control-indicator") - .last() - .click({ force: true }); + cy.get(".bp3-control-indicator").last().click({ force: true }); agHelper.GetNAssertElementText( locator._textWidgetInDeployed, "RED", @@ -219,9 +217,7 @@ function selectSwitchGroupAndReset() { } function selectSwitchAndReset() { - cy.get(".bp3-control-indicator") - .last() - .click({ force: true }); + cy.get(".bp3-control-indicator").last().click({ force: true }); cy.get(".t--switch-widget-active").should("not.exist"); agHelper.ClickButton("Submit"); cy.get(".t--switch-widget-active").should("be.visible"); @@ -229,9 +225,7 @@ function selectSwitchAndReset() { function selectAndReset() { cy.get(".select-button").click({ force: true }); - cy.get(".menu-item-text") - .contains("Blue") - .click({ force: true }); + cy.get(".menu-item-text").contains("Blue").click({ force: true }); cy.wait(1000); agHelper.GetNAssertElementText( locator._textWidgetInDeployed, @@ -247,9 +241,7 @@ function selectAndReset() { } function selectCurrencyInputAndReset() { - cy.get(".bp3-input") - .click({ force: true }) - .type("123"); + cy.get(".bp3-input").click({ force: true }).type("123"); cy.wait(1000); agHelper.GetNAssertElementText( locator._textWidgetInDeployed, @@ -284,9 +276,7 @@ function multiTreeSelectAndReset() { } function radiogroupAndReset() { - cy.get("input") - .last() - .click({ force: true }); + cy.get("input").last().click({ force: true }); cy.wait(1000); agHelper.GetNAssertElementText( locator._textWidgetInDeployed, @@ -320,9 +310,7 @@ function listwidgetAndReset() { } function ratingwidgetAndReset() { - cy.get(".bp3-icon-star svg") - .last() - .click({ force: true }); + cy.get(".bp3-icon-star svg").last().click({ force: true }); cy.wait(1000); agHelper.GetNAssertElementText( locator._textWidgetInDeployed, @@ -358,9 +346,7 @@ function checkboxGroupAndReset() { } function checkboxAndReset() { - cy.get("input") - .last() - .click({ force: true }); + cy.get("input").last().click({ force: true }); cy.wait(1000); agHelper.GetNAssertElementText( locator._textWidgetInDeployed, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14002_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14002_Spec.ts index 166a1eb62d..ad679a4159 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14002_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14002_Spec.ts @@ -1,7 +1,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Invalid JSObject export statement", function() { - it("Shows error toast for invalid js object export statement", function() { +describe("Invalid JSObject export statement", function () { + it("Shows error toast for invalid js object export statement", function () { const JSObjectWithInvalidExport = `{ myFun1: ()=>{ return (name)=>name diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14037_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14037_Spec.ts index 69489e5c77..85e1d5dfaa 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14037_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14037_Spec.ts @@ -1,14 +1,14 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Error logged when adding a suggested table widget", function() { - it("Bug 14037: User gets an error even when table widget is added from the API page successfully", function() { - cy.fixture("datasources").then((datasourceFormData : any) => { - _.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"], "Api1"); - _.apiPage.RunAPI(); +describe("Error logged when adding a suggested table widget", function () { + it("Bug 14037: User gets an error even when table widget is added from the API page successfully", function () { + cy.fixture("datasources").then((datasourceFormData: any) => { + _.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"], "Api1"); + _.apiPage.RunAPI(); - _.apiPage.AddSuggestedWidget("TABLE_WIDGET_V2"); + _.apiPage.AddSuggestedWidget("TABLE_WIDGET_V2"); - _.debuggerHelper.AssertErrorCount(0); + _.debuggerHelper.AssertErrorCount(0); }); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14987_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14987_spec.js index e11b798927..56405135ee 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14987_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14987_spec.js @@ -6,19 +6,19 @@ let guid, datasourceName; let dataSources = ObjectsRegistry.DataSources, agHelper = ObjectsRegistry.AggregateHelper; -describe("Verify setting tab form controls not to have tooltip and tooltip (underline) styles", function() { +describe("Verify setting tab form controls not to have tooltip and tooltip (underline) styles", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); - it("1. Creates a new Mongo datasource", function() { + it("1. Creates a new Mongo datasource", function () { dataSources.CreateDataSource("Mongo"); cy.get("@dsName").then(($dsName) => { datasourceName = $dsName; }); }); - it("2. We make sure the label in the settings tab does not have any underline styles", function() { + it("2. We make sure the label in the settings tab does not have any underline styles", function () { cy.NavigateToActiveDSQueryPane(datasourceName); cy.get(queryLocators.querySettingsTab).click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug15056_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug15056_Spec.ts index a0098ebdcf..b8fe99dddc 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug15056_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug15056_Spec.ts @@ -6,12 +6,12 @@ const jsEditor = ObjectsRegistry.JSEditor; const apiPage = ObjectsRegistry.ApiPage; const ee = ObjectsRegistry.EntityExplorer; -describe("JS data update on button click", function() { +describe("JS data update on button click", function () { before(() => { agHelper.AddDsl(dsl); }); - it("Populates js function data when triggered via button click", function() { + it("Populates js function data when triggered via button click", function () { apiPage.CreateAndFillApi( "https://jsonplaceholder.typicode.com/posts", "Api1", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug15909_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug15909_Spec.ts index 2585cbcfac..92e24d5356 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug15909_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug15909_Spec.ts @@ -7,11 +7,11 @@ const jsEditor = ObjectsRegistry.JSEditor, propPane = ObjectsRegistry.PropertyPane, CommonLocators = ObjectsRegistry.CommonLocators; -describe("JS Function Execution", function() { +describe("JS Function Execution", function () { before(() => { ee.DragDropWidgetNVerify(WIDGET.BUTTON, 200, 200); }); - it("1. Shows js function data as part of autocompletion hints", function() { + it("1. Shows js function data as part of autocompletion hints", function () { jsEditor.CreateJSObject( `export default { myFun1: ()=>{ diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16377_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16377_spec.ts index a7b3c0e395..89f6e8a473 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16377_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16377_spec.ts @@ -8,8 +8,8 @@ const locator = ObjectsRegistry.CommonLocators, apiPage = ObjectsRegistry.ApiPage, agHelper = ObjectsRegistry.AggregateHelper; -describe("Binding Expressions should not be truncated in Url and path extraction", function() { - it("Bug 16377, When Api url has dynamic binding expressions, ensure the url and path derived is not corrupting Api execution", function() { +describe("Binding Expressions should not be truncated in Url and path extraction", function () { + it("Bug 16377, When Api url has dynamic binding expressions, ensure the url and path derived is not corrupting Api execution", function () { //Since the specified expression always returns true - it will never run mock-apis - which actually doesn't exist const apiUrl = `http://host.docker.internal:5001/v1/{{true ? 'mock-api' : 'mock-apis'}}?records=10`; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16683_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16683_Spec.ts index a03f82c45a..04ce76d32e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16683_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16683_Spec.ts @@ -8,8 +8,8 @@ const locator = ObjectsRegistry.CommonLocators, apiPage = ObjectsRegistry.ApiPage, agHelper = ObjectsRegistry.AggregateHelper; -describe("Binding Expressions should not be truncated in Url Query Param", function() { - it("Bug 16683, When Api url has dynamic binding expressions, ensures the query params is not truncated", function() { +describe("Binding Expressions should not be truncated in Url Query Param", function () { + it("Bug 16683, When Api url has dynamic binding expressions, ensures the query params is not truncated", function () { const apiUrl = `https://echo.hoppscotch.io/v6/deployments?limit=4{{Math.random() > 0.5 ? '¶m1=5' : '¶m2=6'}}`; apiPage.CreateAndFillApi(apiUrl, "BindingExpressions"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16702_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16702_Spec.ts index 6c3ef23871..e4d95a6451 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16702_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16702_Spec.ts @@ -23,8 +23,8 @@ const GRAPHQL_RESPONSE = { mission_name: "Sentinel-6 Michael Freilich", }; -describe("Binding Expressions should not be truncated in Url and path extraction", function() { - it.skip("Bug 16702, Moustache+Quotes formatting goes wrong in graphql body resulting in autocomplete failure", function() { +describe("Binding Expressions should not be truncated in Url and path extraction", function () { + it.skip("Bug 16702, Moustache+Quotes formatting goes wrong in graphql body resulting in autocomplete failure", function () { const jsObjectBody = `export default { limitValue: 1, offsetValue: 1, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18035_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18035_Spec.ts index 9ffa187f56..2f703ead36 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18035_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18035_Spec.ts @@ -3,8 +3,8 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const dataSources = ObjectsRegistry.DataSources, agHelper = ObjectsRegistry.AggregateHelper; -describe("Bug 18035: Updates save button text on datasource discard popup", function() { - it("1. Create gsheet datasource, click on back button, discard popup should contain save and authorize", function() { +describe("Bug 18035: Updates save button text on datasource discard popup", function () { + it("1. Create gsheet datasource, click on back button, discard popup should contain save and authorize", function () { dataSources.NavigateToDSCreateNew(); dataSources.CreatePlugIn("Google Sheets"); agHelper.GoBack(); @@ -16,7 +16,7 @@ describe("Bug 18035: Updates save button text on datasource discard popup", func cy.get(dataSources._datasourceModalDoNotSave).click(); }); - it("2. Create any other datasource, click on back button, discard popup should contain save", function() { + it("2. Create any other datasource, click on back button, discard popup should contain save", function () { dataSources.NavigateToDSCreateNew(); dataSources.CreatePlugIn("PostgreSQL"); agHelper.GoBack(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18369_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18369_Spec.ts index fe08cc629e..5cd143a502 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18369_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18369_Spec.ts @@ -4,7 +4,7 @@ const ee = ObjectsRegistry.EntityExplorer, locator = ObjectsRegistry.CommonLocators, agHelper = ObjectsRegistry.AggregateHelper; -describe("JS Function Execution", function() { +describe("JS Function Execution", function () { before(() => { cy.fixture("formWithtabdsl.json").then((val: any) => { agHelper.AddDsl(val); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18876_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18876_Spec.ts index 966649b331..5b8738d9c9 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18876_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18876_Spec.ts @@ -12,9 +12,7 @@ describe("Application crashes when saving datasource", () => { "POST", ); apiPage.SelectPaneTab("Authentication"); - cy.get(apiPage._saveAsDS) - .last() - .click({ force: true }); + cy.get(apiPage._saveAsDS).last().click({ force: true }); cy.get(".t--close-editor").click({ force: true }); cy.get(datasource._datasourceModalSave).click(); // ensures app does not crash and datasource is saved. diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19426_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19426_spec.ts index 8290a60bcd..a981012b4e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19426_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19426_spec.ts @@ -2,8 +2,8 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const dataSources = ObjectsRegistry.DataSources; -describe("Testing empty datasource without saving should not throw 404", function() { - it("Bug 19426: Create empty S3 datasource, test it", function() { +describe("Testing empty datasource without saving should not throw 404", function () { + it("Bug 19426: Create empty S3 datasource, test it", function () { dataSources.NavigateToDSCreateNew(); dataSources.CreatePlugIn("S3"); dataSources.TestDatasource(false); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19893_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19893_spec.ts index 83c8602ff2..4cb4be84ed 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19893_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19893_spec.ts @@ -5,8 +5,8 @@ let dsName: any; const agHelper = ObjectsRegistry.AggregateHelper, dataSources = ObjectsRegistry.DataSources; -describe("Bug 19933: Authenticated API DS in case of OAuth2, should have save and authorise button enabled all the times", function() { - it("1. Create Auth API DS, save i, now edit again and check the save and authorise button state", function() { +describe("Bug 19933: Authenticated API DS in case of OAuth2, should have save and authorise button enabled all the times", function () { + it("1. Create Auth API DS, save i, now edit again and check the save and authorise button state", function () { dataSources.NavigateToDSCreateNew(); agHelper.GenerateUUID(); cy.get("@guid").then((uid) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19933_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19933_spec.ts index 69a8ce15dd..6ea7fffd85 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19933_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19933_spec.ts @@ -4,8 +4,8 @@ let dsName: string; const testString = "test"; -describe("Bug 19933: Authenticated API DS in case of OAuth2, should have save and authorise button enabled all the times", function() { - it("1. Create Auth API DS, save i, now edit again and check the save and authorise button state", function() { +describe("Bug 19933: Authenticated API DS in case of OAuth2, should have save and authorise button enabled all the times", function () { + it("1. Create Auth API DS, save i, now edit again and check the save and authorise button state", function () { _.dataSources.NavigateToDSCreateNew(); _.agHelper.GenerateUUID(); cy.get("@guid").then((uid) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19982_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19982_Spec.ts index ed990e89d7..6e77eb62af 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19982_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19982_Spec.ts @@ -3,8 +3,8 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const jsEditor = ObjectsRegistry.JSEditor, agHelper = ObjectsRegistry.AggregateHelper; -describe("JS Execution of Higher-order-functions", function() { - it("Completes execution properly", function() { +describe("JS Execution of Higher-order-functions", function () { + it("Completes execution properly", function () { const JSObjectWithHigherOrderFunction = `export default{ myFun1: ()=>{ return (name)=>name diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug20275_Spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug20275_Spec.js index 5eba7d7220..b45fbb53f7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug20275_Spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug20275_Spec.js @@ -8,8 +8,8 @@ const jsEditor = ObjectsRegistry.JSEditor, ee = ObjectsRegistry.EntityExplorer, propPane = ObjectsRegistry.PropertyPane; -describe("Testing if user.email is avaible on page load", function() { - it("Bug: 20275: {{appsmith.user.email}} is not available on page load", function() { +describe("Testing if user.email is avaible on page load", function () { + it("Bug: 20275: {{appsmith.user.email}} is not available on page load", function () { const JS_OBJECT_BODY = `export default{ myFun1: ()=>{ showAlert(appsmith.user.email) diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug20841_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug20841_Spec.ts index 0474ad057b..2e43e33d1c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug20841_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug20841_Spec.ts @@ -1,8 +1,8 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; import { WIDGET } from "../../../../locators/WidgetLocators"; -describe("Evaluations causing error when page is cloned", function() { - it("Bug: 20841: JSObjects | Sync methods | Not run consistently when Page is cloned", function() { +describe("Evaluations causing error when page is cloned", function () { + it("Bug: 20841: JSObjects | Sync methods | Not run consistently when Page is cloned", function () { const JS_OBJECT_BODY = `export default{ myFun1: ()=>{ return "Default text"; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug9334_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug9334_Spec.ts index 2e036062de..3c0c61a183 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug9334_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug9334_Spec.ts @@ -8,12 +8,12 @@ const agHelper = ObjectsRegistry.AggregateHelper, table = ObjectsRegistry.Table, appSettings = ObjectsRegistry.AppSettings; -describe("Bug 9334: The Select widget value is sent as null when user switches between the pages", function() { +describe("Bug 9334: The Select widget value is sent as null when user switches between the pages", function () { before(() => { appSettings.OpenPaneAndChangeTheme("Pampas"); }); - it("1. Create Postgress DS", function() { + it("1. Create Postgress DS", function () { dataSources.CreateDataSource("Postgres"); cy.get("@dsName").then(($dsName) => { dsName = $dsName; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/CatchBlock_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/CatchBlock_Spec.ts index 4765cd1051..654f006346 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/CatchBlock_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/CatchBlock_Spec.ts @@ -4,7 +4,7 @@ const { AggregateHelper: agHelper, ApiPage: apiPage, JSEditor: jsEditor, - EntityExplorer : ee + EntityExplorer: ee, } = ObjectsRegistry; describe("Bug #15372 Catch block was not triggering in Safari/firefox", () => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/DSDiscardBugs_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/DSDiscardBugs_spec.ts index 824c41287c..bbffd5dbeb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/DSDiscardBugs_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/DSDiscardBugs_spec.ts @@ -7,7 +7,7 @@ const agHelper = ObjectsRegistry.AggregateHelper, const testString = "test"; -describe("datasource unsaved changes popup shows even without changes", function() { +describe("datasource unsaved changes popup shows even without changes", function () { // In case of postgres and other plugins, host address and port key values are initialized by default making form dirty it("1. Bug 18664: Create postgres datasource, save it and edit it and go back, now unsaved changes popup should not be shown", () => { dataSources.NavigateToDSCreateNew(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/DatasourceSchema_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/DatasourceSchema_spec.ts index 440384bec9..5368651420 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/DatasourceSchema_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/DatasourceSchema_spec.ts @@ -6,7 +6,7 @@ const agHelper = ObjectsRegistry.AggregateHelper, let guid; let dataSourceName: string; -describe("Datasource form related tests", function() { +describe("Datasource form related tests", function () { it("1. Bug - 17238 Verify datasource structure refresh on save - invalid datasource", () => { agHelper.GenerateUUID(); cy.get("@guid").then((uid) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/GitBugs_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/GitBugs_Spec.ts index 7bffb13d58..ea1f22a1a4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/GitBugs_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/GitBugs_Spec.ts @@ -2,7 +2,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; import { WIDGET } from "../../../../locators/WidgetLocators"; let repoName: any; -describe("Git Bugs", function() { +describe("Git Bugs", function () { before(() => { _.homePage.NavigateToHome(); _.agHelper.GenerateUUID(); @@ -12,7 +12,7 @@ describe("Git Bugs", function() { }); }); - it("1. Bug 16248, When GitSync modal is open, block shortcut action execution", function() { + it("1. Bug 16248, When GitSync modal is open, block shortcut action execution", function () { const largeResponseApiUrl = "https://jsonplaceholder.typicode.com/users"; const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; _.apiPage.CreateAndFillApi(largeResponseApiUrl, "GitSyncTest"); @@ -24,7 +24,7 @@ describe("Git Bugs", function() { _.agHelper.ValidateNetworkStatus("@postExecute"); }); - it("2. Bug 18665 : Creates a new Git branch, Create datasource, discard it and check current branch", function() { + it("2. Bug 18665 : Creates a new Git branch, Create datasource, discard it and check current branch", function () { _.gitSync.CreateNConnectToGit(); _.gitSync.CreateGitBranch(); _.dataSources.NavigateToDSCreateNew(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/InputTruncateCheck_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/InputTruncateCheck_Spec.ts index aa4904b07a..c31f6cc88c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/InputTruncateCheck_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/InputTruncateCheck_Spec.ts @@ -80,7 +80,7 @@ const widgetsToTest = { function configureApi() { cy.fixture("datasources").then((datasourceFormData) => { - apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"], "FirstAPI"); + apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"], "FirstAPI"); }); apiPage.EnterHeader("value", "{{this.params.value}}"); } diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Moment_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Moment_Spec.ts index 4704bad50a..cc8299d8cd 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Moment_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Moment_Spec.ts @@ -2,7 +2,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; let dsName: any, query: string; -describe("Bug #14299 - The data from the query does not show up on the widget", function() { +describe("Bug #14299 - The data from the query does not show up on the widget", function () { before("Create Postgress DS & set theme", () => { cy.fixture("/Bugs/14299dsl").then((val: any) => { _.agHelper.AddDsl(val); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/MultipleOnPageLoadConfirmation_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/MultipleOnPageLoadConfirmation_Spec.ts index e6b3ab311d..4465e79bb0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/MultipleOnPageLoadConfirmation_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/MultipleOnPageLoadConfirmation_Spec.ts @@ -6,11 +6,11 @@ const jsEditor = ObjectsRegistry.JSEditor, locator = ObjectsRegistry.CommonLocators, deployMode = ObjectsRegistry.DeployMode; -describe("Multiple rejection of confirmation for onPageLoad function execution", function() { +describe("Multiple rejection of confirmation for onPageLoad function execution", function () { before(() => { ee.DragDropWidgetNVerify("buttonwidget", 300, 300); }); - it("Works properly", function() { + it("Works properly", function () { const FUNCTIONS_SETTINGS_DEFAULT_DATA = [ { name: "myFun1", @@ -29,9 +29,10 @@ describe("Multiple rejection of confirmation for onPageLoad function execution", }, ]; - const numOfOnLoadAndConfirmExecutionActions = FUNCTIONS_SETTINGS_DEFAULT_DATA.filter( - (setting) => setting.confirmBeforeExecute && setting.onPageLoad, - ).length; + const numOfOnLoadAndConfirmExecutionActions = + FUNCTIONS_SETTINGS_DEFAULT_DATA.filter( + (setting) => setting.confirmBeforeExecute && setting.onPageLoad, + ).length; jsEditor.CreateJSObject( `export default { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/formHasChanged_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/formHasChanged_Spec.ts index 57396c1be7..d2c9b4f3d7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/formHasChanged_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/formHasChanged_Spec.ts @@ -4,7 +4,7 @@ const ee = ObjectsRegistry.EntityExplorer, locator = ObjectsRegistry.CommonLocators, agHelper = ObjectsRegistry.AggregateHelper; -describe("JS Function Execution", function() { +describe("JS Function Execution", function () { before(() => { cy.fixture("formChangeDSL.json").then((val: any) => { agHelper.AddDsl(val); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/CodeComment/PropertyPaneCodeComment_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/CodeComment/PropertyPaneCodeComment_spec.ts index a95f952f64..b949879bab 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/CodeComment/PropertyPaneCodeComment_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/CodeComment/PropertyPaneCodeComment_spec.ts @@ -23,5 +23,4 @@ describe("Property Pane Code Commenting", () => { PropertyPane.ValidatePropertyFieldValue("Label", "{{appsmith}}"); }); - }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Auto_Height_Limit_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Auto_Height_Limit_spec.js index 9db436727e..c54699cf8e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Auto_Height_Limit_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Auto_Height_Limit_spec.js @@ -1,8 +1,8 @@ const dsl = require("../../../../fixtures/dynamicHeightContainerdsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Dynamic Height Width validation with limits", function() { - it("Validate change in auto height with limits width for widgets and highlight section validation", function() { +describe("Dynamic Height Width validation with limits", function () { + it("Validate change in auto height with limits width for widgets and highlight section validation", function () { cy.addDsl(dsl); cy.wait(3000); //for dsl to settle cy.openPropertyPane("containerwidget"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Auto_Height_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Auto_Height_spec.js index a10b132484..45b1fefa28 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Auto_Height_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Auto_Height_spec.js @@ -6,7 +6,7 @@ const widgetsPage = require("../../../../locators/Widgets.json"); import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Dynamic Height Width validation", function() { +describe("Dynamic Height Width validation", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -14,7 +14,7 @@ describe("Dynamic Height Width validation", function() { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); - it("Validate change with auto height width for widgets", function() { + it("Validate change with auto height width for widgets", function () { cy.addDsl(dsl); cy.wait(3000); //for dsl to settle cy.openPropertyPane("containerwidget"); @@ -91,7 +91,7 @@ describe("Dynamic Height Width validation", function() { }); }); - it("Validate container with auto height and child widgets with fixed height", function() { + it("Validate container with auto height and child widgets with fixed height", function () { cy.addDsl(cdsl); cy.wait(3000); //for dsl to settle //cy.openPropertyPane("containerwidget"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_CanvasHeight_resize_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_CanvasHeight_resize_spec.js index e1684a2378..ea9401592f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_CanvasHeight_resize_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_CanvasHeight_resize_spec.js @@ -3,7 +3,7 @@ const commonlocators = require("../../../../locators/commonlocators.json"); import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Dynamic Height Width validation with multiple containers and text widget", function() { +describe("Dynamic Height Width validation with multiple containers and text widget", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -11,7 +11,7 @@ describe("Dynamic Height Width validation with multiple containers and text widg beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); - it("Validate change with auto height width for widgets", function() { + it("Validate change with auto height width for widgets", function () { const textMsg = "Dynamic panel validation for text widget wrt height Dynamic panel validation for text widget wrt height Dynamic panel validation for text widget wrt height"; cy.addDsl(dsl); @@ -54,11 +54,9 @@ describe("Dynamic Height Width validation with multiple containers and text widg .type(`{${modifierKey}}a`) .then(($cm) => { if ($cm.val() !== "") { - cy.get(".CodeMirror textarea") - .first() - .clear({ - force: true, - }); + cy.get(".CodeMirror textarea").first().clear({ + force: true, + }); } }); cy.wait("@updateLayout"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Container_Scroll_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Container_Scroll_spec.js index 5a3d589db9..e9b5519440 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Container_Scroll_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Container_Scroll_spec.js @@ -1,8 +1,8 @@ const dsl = require("../../../../fixtures/dynamicHeightContainerScrolldsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Dynamic Height Width validation", function() { - it("Validate change with auto height width for widgets", function() { +describe("Dynamic Height Width validation", function () { + it("Validate change with auto height width for widgets", function () { cy.addDsl(dsl); cy.wait(3000); //for dsl to settle cy.openPropertyPane("containerwidget"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Container_collapse_undo_redoSpec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Container_collapse_undo_redoSpec.js index 4fe9e47dd0..b569193f3e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Container_collapse_undo_redoSpec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Container_collapse_undo_redoSpec.js @@ -1,8 +1,8 @@ const dsl = require("../../../../fixtures/DynamicHeightDefaultHeightdsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Dynamic Height Width validation", function() { - it("Validate change with auto height width for widgets", function() { +describe("Dynamic Height Width validation", function () { + it("Validate change with auto height width for widgets", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; cy.addDsl(dsl); cy.wait(3000); //for dsl to settle diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Form_With_SwitchGroup_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Form_With_SwitchGroup_spec.js index 1d98ca2d30..f3548760a4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Form_With_SwitchGroup_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Form_With_SwitchGroup_spec.js @@ -1,8 +1,8 @@ const dsl = require("../../../../fixtures/dynamicHeightFormSwitchdsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Dynamic Height Width validation", function() { - it("Validate change with auto height width for Form/Switch", function() { +describe("Dynamic Height Width validation", function () { + it("Validate change with auto height width for Form/Switch", function () { cy.addDsl(dsl); cy.wait(3000); //for dsl to settle cy.openPropertyPane("formwidget"); @@ -82,9 +82,7 @@ describe("Dynamic Height Width validation", function() { .click({ force: true }); cy.wait(3000); cy.get(".t--modal-widget").should("have.length", 1); - cy.get(".t--widget-propertypane-toggle") - .first() - .click({ force: true }); + cy.get(".t--widget-propertypane-toggle").first().click({ force: true }); //cy.changeLayoutHeight(commonlocators.autoHeightWithLimits); //cy.checkMinDefaultValue(commonlocators.minHeight,"4") //cy.checkMaxDefaultValue(commonlocators.maxHeight,"24") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_JsonForm_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_JsonForm_spec.js index 9f9abe5573..d7bfe0bd70 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_JsonForm_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_JsonForm_spec.js @@ -1,8 +1,8 @@ const dsl = require("../../../../fixtures/jsonFormDynamicHeightDsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Dynamic Height Width validation", function() { - it("Validate change with auto height width for JsonForm", function() { +describe("Dynamic Height Width validation", function () { + it("Validate change with auto height width for JsonForm", function () { cy.addDsl(dsl); cy.wait(3000); //for dsl to settle cy.openPropertyPane("jsonformwidget"); @@ -15,15 +15,9 @@ describe("Dynamic Height Width validation", function() { .invoke("css", "height") .then((newformheight) => { expect(formheight).to.not.equal(newformheight); - cy.get(".t--show-column-btn") - .eq(0) - .click({ force: true }); - cy.get(".t--show-column-btn") - .eq(1) - .click({ force: true }); - cy.get(".t--show-column-btn") - .eq(2) - .click({ force: true }); + cy.get(".t--show-column-btn").eq(0).click({ force: true }); + cy.get(".t--show-column-btn").eq(1).click({ force: true }); + cy.get(".t--show-column-btn").eq(2).click({ force: true }); // cy.get("[data-cy='t--resizable-handle-TOP']") // .within(($el) => { // cy.window().then((win) => { @@ -38,12 +32,8 @@ describe("Dynamic Height Width validation", function() { .invoke("css", "height") .then((updatedformheight) => { expect(newformheight).to.not.equal(updatedformheight); - cy.get(".t--show-column-btn") - .eq(2) - .click({ force: true }); - cy.get(".t--show-column-btn") - .eq(1) - .click({ force: true }); + cy.get(".t--show-column-btn").eq(2).click({ force: true }); + cy.get(".t--show-column-btn").eq(1).click({ force: true }); // cy.get("[data-cy='t--resizable-handle-TOP']").should("exist"); // cy.get("[data-cy='t--resizable-handle-BOTTOM']").should("exist"); cy.changeLayoutHeight(commonlocators.autoHeight); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_List_TextWidget_Spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_List_TextWidget_Spec.js index 8b68a4d299..fb3d6de32a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_List_TextWidget_Spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_List_TextWidget_Spec.js @@ -6,7 +6,7 @@ const explorer = require("../../../../locators/explorerlocators.json"); const agHelper = ObjectsRegistry.AggregateHelper; -describe("Dynamic Height Width validation list widget", function() { +describe("Dynamic Height Width validation list widget", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -14,7 +14,7 @@ describe("Dynamic Height Width validation list widget", function() { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); - it("Validate change with auto height width for list widgets", function() { + it("Validate change with auto height width for list widgets", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; const textMsg = "Dynamic panel validation for text widget wrt height"; cy.addDsl(dsl); @@ -84,9 +84,7 @@ describe("Dynamic Height Width validation list widget", function() { cy.selectEntityByName("Text3CopyCopy"); cy.wait(2000); cy.get(commonlocators.generalSectionHeight).should("be.visible"); - cy.get(".t--widget-textwidget") - .first() - .click({ force: true }); + cy.get(".t--widget-textwidget").first().click({ force: true }); cy.get(".t--widget-textwidget") .first() .invoke("css", "height") @@ -99,9 +97,7 @@ describe("Dynamic Height Width validation list widget", function() { 200, ); cy.wait(3000); - cy.get(".t--widget-textwidget") - .first() - .click({ force: true }); + cy.get(".t--widget-textwidget").first().click({ force: true }); cy.get(".t--widget-textwidget") .first() .wait(1000) diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_List_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_List_spec.js index 61294085f0..17667df68b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_List_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_List_spec.js @@ -3,7 +3,7 @@ const commonlocators = require("../../../../locators/commonlocators.json"); import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Dynamic Height Width validation", function() { +describe("Dynamic Height Width validation", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -11,7 +11,7 @@ describe("Dynamic Height Width validation", function() { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); - it("Validate change with auto height width for widgets", function() { + it("Validate change with auto height width for widgets", function () { const textMsg = "Dynamic panel validation for text widget wrt height"; cy.addDsl(dsl); cy.wait(3000); //for dsl to settle diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Modal_Widget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Modal_Widget_spec.js index cab83daf3d..c5dcf36f93 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Modal_Widget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Modal_Widget_spec.js @@ -1,8 +1,8 @@ const dsl = require("../../../../fixtures/DynamicHeightModalDsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Dynamic Height Width validation with limits", function() { - it("Validate change in auto height with limits width for widgets and highlight section validation", function() { +describe("Dynamic Height Width validation with limits", function () { + it("Validate change in auto height with limits width for widgets and highlight section validation", function () { const textMsg = "Dynamic panel validation for text widget wrt heightDynamic panel validation for text widget wrt heightDynamic panel validation for text widget wrt height Dynamic panel validation for text widget Dynamic panel validation for text widget Dynamic panel validation for text widget"; cy.addDsl(dsl); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Multiple_Container_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Multiple_Container_spec.js index e62feac13b..3f268e8892 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Multiple_Container_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Multiple_Container_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../fixtures/multipleContainerdsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Dynamic Height Width validation for multiple container", function() { +describe("Dynamic Height Width validation for multiple container", function () { before(() => { cy.addDsl(dsl); }); - it("Validate change in auto height width with multiple containers", function() { + it("Validate change in auto height width with multiple containers", function () { cy.wait(3000); //for dsl to settle cy.openPropertyPaneWithIndex("containerwidget", 0); cy.changeLayoutHeight(commonlocators.fixed); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Tab_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Tab_spec.js index c8f030199c..b5ce55dd5d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Tab_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Tab_spec.js @@ -3,7 +3,7 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const publish = require("../../../../locators/publishWidgetspage.json"); import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Dynamic Height Width validation for Tab widget", function() { +describe("Dynamic Height Width validation for Tab widget", function () { before(() => { cy.addDsl(dsl); }); @@ -30,7 +30,7 @@ describe("Dynamic Height Width validation for Tab widget", function() { }); }); } - it("Tab widget validation of height with dynamic height feature with publish mode", function() { + it("Tab widget validation of height with dynamic height feature with publish mode", function () { //changing the Text Name and verifying cy.wait(3000); cy.openPropertyPane("tabswidget"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Text_Widget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Text_Widget_spec.js index 362b004650..be20f1764a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Text_Widget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Text_Widget_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../fixtures/textWidgetDynamicdsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Dynamic Height Width validation for text widget", function() { +describe("Dynamic Height Width validation for text widget", function () { before(() => { cy.addDsl(dsl); }); - it("Text widget validation of height with dynamic height feature", function() { + it("Text widget validation of height with dynamic height feature", function () { const textMsg = "Dynamic panel validation for text widget wrt height"; //changing the Text Name and verifying cy.openPropertyPane("textwidget"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Text_With_Different_Size_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Text_With_Different_Size_spec.js index 40e5278db2..76d1e6e19e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Text_With_Different_Size_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Text_With_Different_Size_spec.js @@ -1,7 +1,7 @@ const dsl = require("../../../../fixtures/alignmentWithDynamicHeightDsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Dynamic Height Width validation", function() { +describe("Dynamic Height Width validation", function () { function validateCssProperties(property) { cy.get("button:contains('Small')").click({ force: true }); cy.wait(3000); @@ -128,7 +128,7 @@ describe("Dynamic Height Width validation", function() { }); }); } - it("Validate change with auto height width for text widgets", function() { + it("Validate change with auto height width for text widgets", function () { cy.addDsl(dsl); cy.wait(30000); //for dsl to settled validateCssProperties("height"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Visibility_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Visibility_spec.js index 17c2fac37c..f373652fe1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Visibility_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Visibility_spec.js @@ -1,11 +1,11 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const dsl = require("../../../../fixtures/invisibleWidgetdsl.json"); -describe("Dynamic Height Width validation for Visibility", function() { +describe("Dynamic Height Width validation for Visibility", function () { before(() => { cy.addDsl(dsl); }); - it("Validating visbility/invisiblity of widget with dynamic height feature", function() { + it("Validating visbility/invisiblity of widget with dynamic height feature", function () { //changing the Text Name and verifying cy.wait(3000); cy.openPropertyPane("containerwidget"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/EmbedSettings/EmbedSettings_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/EmbedSettings/EmbedSettings_spec.js index 2f5116b9c6..2826bb3be7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/EmbedSettings/EmbedSettings_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/EmbedSettings/EmbedSettings_spec.js @@ -1,7 +1,7 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; import adminSettings from "../../../../locators/AdminsSettings"; -describe("Embed settings options", function() { +describe("Embed settings options", function () { const { AggregateHelper: agHelper, DeployMode: deployMode, @@ -38,9 +38,7 @@ describe("Embed settings options", function() { ee.DragDropWidgetNVerify("buttonwidget", 100, 100); deployMode.DeployApp(); cy.get("[data-cy='viewmode-share']").click(); - cy.get("[data-cy='copy-application-url']") - .last() - .click(); + cy.get("[data-cy='copy-application-url']").last().click(); agHelper.GiveChromeCopyPermission(); cy.window() .its("navigator.clipboard") @@ -56,18 +54,11 @@ describe("Embed settings options", function() { // cy.testJsontext("url", this.embeddedAppUrl); deployMode.DeployApp(); cy.get("[data-cy='viewmode-share']").click(); - cy.get("[data-cy='copy-application-url']") - .last() - .click(); - cy.window() - .its("navigator.clipboard") - .invoke("readText") - .as("deployUrl"); + cy.get("[data-cy='copy-application-url']").last().click(); + cy.window().its("navigator.clipboard").invoke("readText").as("deployUrl"); cy.enablePublicAccess(); cy.wait(6000); - getIframeBody() - .contains("Submit") - .should("exist"); + getIframeBody().contains("Submit").should("exist"); deployMode.NavigateBacktoEditor(); }); @@ -80,15 +71,13 @@ describe("Embed settings options", function() { }); describe("Wrapper to get access to the alias in all tests", () => { - it("1. Allow embedding everywhere", function() { + it("1. Allow embedding everywhere", function () { cy.log(this.deployUrl); homePage.NavigateToHome(); cy.get(".admin-settings-menu-option").click(); cy.get(".t--admin-settings-APPSMITH_ALLOWED_FRAME_ANCESTORS").within( () => { - cy.get("input") - .eq(0) - .click(); + cy.get("input").eq(0).click(); }, ); cy.get(adminSettings.saveButton).click(); @@ -102,51 +91,37 @@ describe("Embed settings options", function() { // }); cy.get(adminSettings.restartNotice).should("not.exist"); cy.visit(this.deployUrl); - getIframeBody() - .contains("Submit") - .should("exist"); + getIframeBody().contains("Submit").should("exist"); ValidateEditModeSetting(embedSettings.locators._allowAllText); }); - it("2. Limit embedding", function() { + it("2. Limit embedding", function () { cy.log(this.deployUrl); homePage.NavigateToHome(); cy.get(".admin-settings-menu-option").click(); cy.get(".t--admin-settings-APPSMITH_ALLOWED_FRAME_ANCESTORS").within( () => { - cy.get("input") - .eq(1) - .click(); - cy.get(".bp3-tag-remove") - .eq(1) - .click(); - cy.get(".bp3-tag-remove") - .eq(0) - .click(); - cy.get(".bp3-input-ghost") - .type(window.location.origin) - .blur(); + cy.get("input").eq(1).click(); + cy.get(".bp3-tag-remove").eq(1).click(); + cy.get(".bp3-tag-remove").eq(0).click(); + cy.get(".bp3-input-ghost").type(window.location.origin).blur(); }, ); cy.get(adminSettings.saveButton).click(); cy.waitForServerRestart(); cy.get(adminSettings.restartNotice).should("not.exist"); cy.visit(this.deployUrl); - getIframeBody() - .contains("Submit") - .should("exist"); + getIframeBody().contains("Submit").should("exist"); ValidateEditModeSetting(embedSettings.locators._restrictedText); }); - it("3. Disable everywhere", function() { + it("3. Disable everywhere", function () { cy.log(this.deployUrl); homePage.NavigateToHome(); cy.get(".admin-settings-menu-option").click(); cy.get(".t--admin-settings-APPSMITH_ALLOWED_FRAME_ANCESTORS").within( () => { - cy.get("input") - .last() - .click(); + cy.get("input").last().click(); }, ); cy.get(adminSettings.saveButton).click(); @@ -160,9 +135,7 @@ describe("Embed settings options", function() { // } = interception[1].response.body.data; // expect(APPSMITH_ALLOWED_FRAME_ANCESTORS).to.equal("'none'"); // }); - getIframeBody() - .contains("Submit") - .should("not.exist"); + getIframeBody().contains("Submit").should("not.exist"); ValidateEditModeSetting(embedSettings.locators._disabledText); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Admin_settings_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Admin_settings_spec.js index b031c700c8..9b9bc32af9 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Admin_settings_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Admin_settings_spec.js @@ -20,7 +20,7 @@ const routes = { VERSION: "/settings/version", }; -describe("Admin settings page", function() { +describe("Admin settings page", function () { beforeEach(() => { cy.intercept("GET", "/api/v1/admin/env", { body: { responseMeta: { status: 200, success: true }, data: {} }, @@ -105,9 +105,7 @@ describe("Admin settings page", function() { }; assertVisibilityAndDisabledState(); cy.get(adminsSettings.instanceName).should("be.visible"); - cy.get(adminsSettings.instanceName) - .clear() - .type("AppsmithInstance"); + cy.get(adminsSettings.instanceName).clear().type("AppsmithInstance"); cy.get(adminsSettings.saveButton).should("be.visible"); cy.get(adminsSettings.saveButton).should("not.be.disabled"); cy.get(adminsSettings.resetButton).should("be.visible"); @@ -123,9 +121,7 @@ describe("Admin settings page", function() { let instanceName; cy.generateUUID().then((uuid) => { instanceName = uuid; - cy.get(adminsSettings.instanceName) - .clear() - .type(uuid); + cy.get(adminsSettings.instanceName).clear().type(uuid); }); cy.get(adminsSettings.saveButton).should("be.visible"); cy.get(adminsSettings.saveButton).should("not.be.disabled"); @@ -151,9 +147,7 @@ describe("Admin settings page", function() { let instanceName; cy.generateUUID().then((uuid) => { instanceName = uuid; - cy.get(adminsSettings.instanceName) - .clear() - .type(uuid); + cy.get(adminsSettings.instanceName).clear().type(uuid); }); cy.get(adminsSettings.saveButton).should("be.visible"); cy.get(adminsSettings.saveButton).should("not.be.disabled"); @@ -164,9 +158,7 @@ describe("Admin settings page", function() { let fromAddress; cy.generateUUID().then((uuid) => { fromAddress = uuid; - cy.get(adminsSettings.fromAddress) - .clear() - .type(`${uuid}@appsmith.com`); + cy.get(adminsSettings.fromAddress).clear().type(`${uuid}@appsmith.com`); }); cy.intercept("POST", "/api/v1/admin/restart", { body: { responseMeta: { status: 200, success: true }, data: true }, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_API_Pane_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_API_Pane_spec.js index cabc9032cd..8325088415 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_API_Pane_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_API_Pane_spec.js @@ -9,8 +9,8 @@ let ee = ObjectsRegistry.EntityExplorer, locator = ObjectsRegistry.CommonLocators, homePage = ObjectsRegistry.HomePage; -describe("Entity explorer API pane related testcases", function() { - it("1. Empty Message validation for Widgets/API/Queries", function() { +describe("Entity explorer API pane related testcases", function () { + it("1. Empty Message validation for Widgets/API/Queries", function () { homePage.NavigateToHome(); homePage.CreateNewWorkspace("EmptyMsgCheck"); homePage.CreateAppInWorkspace("EmptyMsgCheck"); @@ -33,7 +33,7 @@ describe("Entity explorer API pane related testcases", function() { agHelper.AssertElementVisible(locator._visibleTextDiv("NEW DATASOURCE")); }); - it("2. Move to page / edit API name /properties validation", function() { + it("2. Move to page / edit API name /properties validation", function () { cy.NavigateToAPI_Panel(); cy.CreateAPI("FirstAPI"); cy.enterDatasourceAndPath(testdata.baseUrl, testdata.methods); @@ -47,7 +47,7 @@ describe("Entity explorer API pane related testcases", function() { cy.ResponseStatusCheck(testdata.successStatusCode); ee.ExpandCollapseEntity("Queries/JS"); ee.ActionContextMenuByEntityName("FirstAPI", "Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(5); expect($lis.eq(0)).to.contain("{{FirstAPI.isLoading}}"); expect($lis.eq(1)).to.contain("{{FirstAPI.data}}"); @@ -55,9 +55,7 @@ describe("Entity explorer API pane related testcases", function() { expect($lis.eq(3)).to.contain("{{FirstAPI.run()}}"); expect($lis.eq(4)).to.contain("{{FirstAPI.clear()}}"); }); - cy.get(apiwidget.actionlist) - .contains(testdata.Get) - .should("be.visible"); + cy.get(apiwidget.actionlist).contains(testdata.Get).should("be.visible"); cy.Createpage(pageid); ee.SelectEntityByName("Page1"); agHelper.Sleep(); //for the selected entity to settle loading! @@ -75,7 +73,7 @@ describe("Entity explorer API pane related testcases", function() { ee.ExpandCollapseEntity("Queries/JS"); ee.AssertEntityPresenceInExplorer("SecondAPI"); ee.ActionContextMenuByEntityName("SecondAPI", "Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(5); expect($lis.eq(0)).to.contain("{{SecondAPI.isLoading}}"); expect($lis.eq(1)).to.contain("{{SecondAPI.data}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_CopyQuery_RenameDatasource_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_CopyQuery_RenameDatasource_spec.js index 266e428348..ff9967d24c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_CopyQuery_RenameDatasource_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_CopyQuery_RenameDatasource_spec.js @@ -9,7 +9,7 @@ const pageid = "MyPage"; let updatedName; let datasourceName; -describe("Entity explorer tests related to copy query", function() { +describe("Entity explorer tests related to copy query", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); @@ -20,7 +20,7 @@ describe("Entity explorer tests related to copy query", function() { // } // }); - it("1. Create a query with dataSource in explorer, Create new Page", function() { + it("1. Create a query with dataSource in explorer, Create new Page", function () { cy.Createpage(pageid); ee.SelectEntityByName("Page1"); cy.NavigateToDatasourceEditor(); @@ -41,10 +41,7 @@ describe("Entity explorer tests related to copy query", function() { ); cy.get(queryLocators.templateMenu).click(); - cy.get(".CodeMirror textarea") - .first() - .focus() - .type("select * from users"); + cy.get(".CodeMirror textarea").first().focus().type("select * from users"); cy.EvaluateCurrentValue("select * from users"); cy.get(".t--action-name-edit-field").click({ force: true }); @@ -52,7 +49,7 @@ describe("Entity explorer tests related to copy query", function() { datasourceName = httpResponse.response.body.data.name; ee.ExpandCollapseEntity("Queries/JS"); ee.ActionContextMenuByEntityName("Query1", "Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(5); expect($lis.eq(0)).to.contain("{{Query1.isLoading}}"); expect($lis.eq(1)).to.contain("{{Query1.data}}"); @@ -63,14 +60,14 @@ describe("Entity explorer tests related to copy query", function() { }); }); - it("2. Copy query in explorer to new page & verify Bindings are copied too", function() { + it("2. Copy query in explorer to new page & verify Bindings are copied too", function () { ee.SelectEntityByName("Query1", "Queries/JS"); ee.ActionContextMenuByEntityName("Query1", "Copy to page", pageid); ee.ExpandCollapseEntity("Queries/JS"); ee.SelectEntityByName("Query1"); cy.runQuery(); ee.ActionContextMenuByEntityName("Query1", "Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis.eq(0)).to.contain("{{Query1.isLoading}}"); expect($lis.eq(1)).to.contain("{{Query1.data}}"); expect($lis.eq(2)).to.contain("{{Query1.responseMeta}}"); @@ -79,7 +76,7 @@ describe("Entity explorer tests related to copy query", function() { }); }); - it("3. Rename datasource in explorer, Delete query and try to Delete datasource", function() { + it("3. Rename datasource in explorer, Delete query and try to Delete datasource", function () { ee.SelectEntityByName("Page1"); cy.generateUUID().then((uid) => { updatedName = uid; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Datasource_Structure_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Datasource_Structure_spec.js index 438dc83a39..7f3d5830cd 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Datasource_Structure_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Datasource_Structure_spec.js @@ -8,7 +8,7 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let ee = ObjectsRegistry.EntityExplorer; let datasourceName; -describe("Entity explorer datasource structure", function() { +describe("Entity explorer datasource structure", function () { beforeEach(() => { //cy.ClearSearch(); cy.startRoutesForDatasource(); @@ -18,7 +18,7 @@ describe("Entity explorer datasource structure", function() { }); }); - it("1. Entity explorer datasource structure", function() { + it("1. Entity explorer datasource structure", function () { cy.NavigateToActiveDSQueryPane(datasourceName); cy.wait("@createNewApi").should( "have.nested.property", @@ -50,9 +50,7 @@ describe("Entity explorer datasource structure", function() { // .click(); // cy.get(".bp3-popover-content").should("be.visible"); - cy.get(explorer.templateMenuIcon) - .first() - .click({ force: true }); + cy.get(explorer.templateMenuIcon).first().click({ force: true }); cy.get(".t--structure-template-menu-popover") .last() .contains("SELECT") @@ -66,9 +64,7 @@ describe("Entity explorer datasource structure", function() { cy.deleteQueryUsingContext(); cy.CheckAndUnfoldEntityItem("Queries/JS"); cy.GlobalSearchEntity("MyQuery"); - cy.get(`.t--entity-name:contains(MyQuery)`) - .scrollIntoView() - .click(); + cy.get(`.t--entity-name:contains(MyQuery)`).scrollIntoView().click(); cy.deleteQueryUsingContext(); cy.get(commonlocators.entityExplorersearch).clear({ force: true }); @@ -76,7 +72,7 @@ describe("Entity explorer datasource structure", function() { cy.deleteDatasource(datasourceName); }); - it("2. Refresh datasource structure", function() { + it("2. Refresh datasource structure", function () { cy.NavigateToActiveDSQueryPane(datasourceName); cy.get(queryLocators.templateMenu).click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_DragAndDropWidget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_DragAndDropWidget_spec.js index 3d203aa682..590f72f8b4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_DragAndDropWidget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_DragAndDropWidget_spec.js @@ -5,15 +5,13 @@ const formWidgetsPage = require("../../../../locators/FormWidgets.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const widgetsPage = require("../../../../locators/Widgets.json"); -describe("Entity explorer Drag and Drop widgets testcases", function() { - it("Drag and drop form widget and validate", function() { +describe("Entity explorer Drag and Drop widgets testcases", function () { + it("Drag and drop form widget and validate", function () { cy.log("Login Successful"); cy.reload(); // To remove the rename tooltip cy.get(explorer.addWidget).click({ force: true }); cy.get(commonlocators.entityExplorersearch).should("be.visible"); - cy.get(commonlocators.entityExplorersearch) - .clear() - .type("form"); + cy.get(commonlocators.entityExplorersearch).clear().type("form"); cy.dragAndDropToCanvas("formwidget", { x: 300, y: 80 }); cy.get(formWidgetsPage.formD).click(); /** @@ -43,14 +41,12 @@ describe("Entity explorer Drag and Drop widgets testcases", function() { .should("be.visible"); cy.get(explorer.explorerSwitchId).click(); cy.PublishtheApp(); - cy.get(publish.backToEditor) - .first() - .click(); + cy.get(publish.backToEditor).first().click(); cy.CheckAndUnfoldEntityItem("Widgets"); cy.get(`.t--entity-name:contains(FormTest)`).trigger("mouseover"); cy.hoverAndClickParticularIndex(1); cy.selectAction("Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(3); expect($lis.eq(0)).to.contain("{{FormTest.isVisible}}"); expect($lis.eq(1)).to.contain("{{FormTest.data}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Naming_conflict_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Naming_conflict_spec.js index 22bd258bbd..9048c5055e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Naming_conflict_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Naming_conflict_spec.js @@ -1,14 +1,14 @@ const dsl = require("../../../../fixtures/basicTabledsl.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json"); -describe("Tab widget test", function() { +describe("Tab widget test", function () { const apiName = "Table1"; const tableName = "Table"; before(() => { cy.addDsl(dsl); }); - it("Rename API with table widget name validation test", function() { + it("Rename API with table widget name validation test", function () { cy.log("Login Successful"); cy.NavigateToAPI_Panel(); cy.log("Navigation to API Panel screen successful"); @@ -19,7 +19,7 @@ describe("Tab widget test", function() { .should("have.value", tableName); }); - it("Rename Table widget with api name validation test", function() { + it("Rename Table widget with api name validation test", function () { cy.GlobalSearchEntity("Table1"); cy.CheckAndUnfoldEntityItem("Queries/JS"); cy.RenameEntity(apiName); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Renaming_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Renaming_spec.js index 480adbfae2..eed7881bef 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Renaming_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Renaming_spec.js @@ -5,8 +5,8 @@ let ee = ObjectsRegistry.EntityExplorer; const firstApiName = "First"; const secondApiName = "Second"; -describe("Api Naming conflict on a page test", function() { - it("1. Expects actions on the same page cannot have identical names", function() { +describe("Api Naming conflict on a page test", function () { + it("1. Expects actions on the same page cannot have identical names", function () { cy.log("Login Successful"); // create an API cy.NavigateToAPI_Panel(); @@ -22,9 +22,7 @@ describe("Api Naming conflict on a page test", function() { }); cy.selectAction("Edit Name"); //cy.RenameEntity(tabname); - cy.get(explorer.editEntity) - .last() - .type(firstApiName, { force: true }); + cy.get(explorer.editEntity).last().type(firstApiName, { force: true }); //cy.RenameEntity(firstApiName); cy.validateMessage(firstApiName); cy.ClearSearch(); @@ -39,8 +37,8 @@ describe("Api Naming conflict on a page test", function() { }); }); -describe("Api Naming conflict on different pages test", function() { - it("2. It expects actions on different pages can have identical names", function() { +describe("Api Naming conflict on different pages test", function () { + it("2. It expects actions on different pages can have identical names", function () { cy.log("Login Successful"); // create a new API cy.CreateAPI(firstApiName); @@ -49,9 +47,7 @@ describe("Api Naming conflict on different pages test", function() { cy.Createpage("Page2"); cy.CreateAPI(firstApiName); ee.ExpandCollapseEntity("Queries/JS", true); - cy.get(".t--entity-name") - .contains(firstApiName) - .should("exist"); + cy.get(".t--entity-name").contains(firstApiName).should("exist"); cy.get(`.t--entity-item:contains(${firstApiName})`).within(() => { cy.get(".t--context-menu").click({ force: true }); }); @@ -68,8 +64,8 @@ describe("Api Naming conflict on different pages test", function() { }); }); -describe("Entity Naming conflict test", function() { - it("3. Expects JS objects and actions to not have identical names on the same page.", function() { +describe("Entity Naming conflict test", function () { + it("3. Expects JS objects and actions to not have identical names on the same page.", function () { cy.log("Login Successful"); ee.ExpandCollapseEntity("Queries/JS", true); // create JS object and name it @@ -92,9 +88,7 @@ describe("Entity Naming conflict test", function() { }); cy.selectAction("Edit Name"); - cy.get(explorer.editEntity) - .last() - .type(firstApiName, { force: true }); + cy.get(explorer.editEntity).last().type(firstApiName, { force: true }); cy.VerifyPopOverMessage(firstApiName + " is already being used.", true); cy.get("body").click(0, 0); cy.wait(2000); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Long_Name_Tooltip_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Long_Name_Tooltip_spec.js index 53790a71d6..08a39c19ce 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Long_Name_Tooltip_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Long_Name_Tooltip_spec.js @@ -6,8 +6,8 @@ const shortName = "shortName"; const longName = "AVeryLongNameThatOverflows"; const alternateName = "AlternateName"; -describe("Entity Explorer showing tooltips on long names", function() { - it("Expect tooltip on long names only", function() { +describe("Entity Explorer showing tooltips on long names", function () { + it("Expect tooltip on long names only", function () { // create an API with a short name cy.NavigateToAPI_Panel(); cy.CreateAPI(shortName); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Multiple_Widgets_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Multiple_Widgets_spec.js index 3cb739fea6..ecc4625711 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Multiple_Widgets_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Multiple_Widgets_spec.js @@ -9,7 +9,7 @@ const pageid = "MyPage"; import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let agHelper = ObjectsRegistry.AggregateHelper; -describe("Entity explorer tests related to widgets and validation", function() { +describe("Entity explorer tests related to widgets and validation", function () { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); @@ -18,20 +18,18 @@ describe("Entity explorer tests related to widgets and validation", function() { agHelper.SaveLocalStorageCache(); }); - it("Add a widget to default page and verify the properties", function() { + it("Add a widget to default page and verify the properties", function () { cy.addDsl(dsl); cy.OpenBindings("Text1"); - cy.get(explorer.property) - .last() - .click({ force: true }); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(explorer.property).last().click({ force: true }); + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(2); expect($lis.eq(0)).to.contain("{{Text1.isVisible}}"); expect($lis.eq(1)).to.contain("{{Text1.text}}"); }); }); - it("Create another page and add another widget and verify properties", function() { + it("Create another page and add another widget and verify properties", function () { cy.Createpage(pageid); cy.addDsl(tdsl); cy.openPropertyPane("tablewidget"); @@ -42,10 +40,8 @@ describe("Entity explorer tests related to widgets and validation", function() { ); cy.GlobalSearchEntity("Table1"); cy.OpenBindings("Table1"); - cy.get(explorer.property) - .last() - .click({ force: true }); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(explorer.property).last().click({ force: true }); + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(13); expect($lis.eq(0)).to.contain("{{Table1.selectedRow}}"); expect($lis.eq(1)).to.contain("{{Table1.selectedRows}}"); @@ -63,18 +59,14 @@ describe("Entity explorer tests related to widgets and validation", function() { }); }); - it("Toggle between widgets in different pages using search functionality", function() { + it("Toggle between widgets in different pages using search functionality", function () { cy.CheckAndUnfoldEntityItem("Pages"); - cy.get(".t--entity-name") - .contains("Page1") - .click({ force: true }); + cy.get(".t--entity-name").contains("Page1").click({ force: true }); cy.wait(2000); cy.SearchEntityandOpen("Text1"); cy.OpenBindings("Text1"); - cy.get(explorer.property) - .last() - .click({ force: true }); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(explorer.property).last().click({ force: true }); + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(2); expect($lis.eq(0)).to.contain("{{Text1.isVisible}}"); expect($lis.eq(1)).to.contain("{{Text1.text}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Pin_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Pin_spec.js index 27e6a6db73..a026f49c1b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Pin_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Pin_spec.js @@ -6,12 +6,12 @@ const ee = ObjectsRegistry.EntityExplorer, agHelper = ObjectsRegistry.AggregateHelper, locator = ObjectsRegistry.CommonLocators; -describe("Entity explorer tests related to pinning and unpinning", function() { +describe("Entity explorer tests related to pinning and unpinning", function () { before(() => { cy.addDsl(dsl); }); - it("checks entity explorer visibility on unpin", function() { + it("checks entity explorer visibility on unpin", function () { cy.wait(5000); cy.get(".t--entity-explorer").should("be.visible"); cy.get(".t--pin-entity-explorer").click(); @@ -21,12 +21,12 @@ describe("Entity explorer tests related to pinning and unpinning", function() { cy.get(".t--entity-explorer").should("not.be.visible"); }); - it("checks entity explorer visibility on pin", function() { + it("checks entity explorer visibility on pin", function () { cy.get(".t--pin-entity-explorer").click(); cy.get(".t--entity-explorer").should("be.visible"); }); - it("Widgets visibility in widget pane", function() { + it("Widgets visibility in widget pane", function () { ee.NavigateToSwitcher("widgets"); agHelper.ScrollTo(locator._widgetPane, "bottom"); agHelper.AssertElementVisible(ee.locator._widgetPageIcon(WIDGET.VIDEO)); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Query_Datasource_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Query_Datasource_spec.js index 085d86b332..3f0cb422e7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Query_Datasource_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Query_Datasource_spec.js @@ -11,7 +11,7 @@ let ee = ObjectsRegistry.EntityExplorer; const pageid = "MyPage"; let datasourceName; -describe("Entity explorer tests related to query and datasource", function() { +describe("Entity explorer tests related to query and datasource", function () { before(() => { cy.generateUUID().then((uid) => { datasourceName = uid; @@ -22,12 +22,10 @@ describe("Entity explorer tests related to query and datasource", function() { cy.startRoutesForDatasource(); }); - it("1. Create a page/moveQuery/rename/delete in explorer", function() { + it("1. Create a page/moveQuery/rename/delete in explorer", function () { cy.Createpage(pageid); cy.wait(2000); - cy.get(".t--entity-name") - .contains("Page1") - .click({ force: true }); + cy.get(".t--entity-name").contains("Page1").click({ force: true }); cy.wait(2000); cy.NavigateToDatasourceEditor(); cy.get(datasource.PostgreSQL).click(); @@ -84,16 +82,13 @@ describe("Entity explorer tests related to query and datasource", function() { ); // cy.get(queryLocators.templateMenu).click(); - cy.get(".CodeMirror textarea") - .first() - .focus() - .type("select * from users"); + cy.get(".CodeMirror textarea").first().focus().type("select * from users"); cy.EvaluateCurrentValue("select * from users"); cy.get(".t--action-name-edit-field").click({ force: true }); ee.ActionContextMenuByEntityName("Query1", "Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(5); expect($lis.eq(0)).to.contain("{{Query1.isLoading}}"); expect($lis.eq(1)).to.contain("{{Query1.data}}"); @@ -104,9 +99,7 @@ describe("Entity explorer tests related to query and datasource", function() { ee.ActionContextMenuByEntityName("Query1", "Edit Name"); cy.EditApiNameFromExplorer("MyQuery"); ee.ActionContextMenuByEntityName("MyQuery", "Move to page", pageid); - cy.get(".t--entity-name") - .contains("MyQuery") - .click(); + cy.get(".t--entity-name").contains("MyQuery").click(); cy.wait(2000); cy.runQuery(); @@ -120,9 +113,7 @@ describe("Entity explorer tests related to query and datasource", function() { .click({ force: true }); cy.contains(".t--datasource-name", datasourceName).click(); cy.get(".t--delete-datasource").click(); - cy.get(".t--delete-datasource") - .contains("Are you sure?") - .click(); + cy.get(".t--delete-datasource").contains("Are you sure?").click(); cy.wait("@deleteDatasource").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Tab_rename_Delete_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Tab_rename_Delete_spec.js index 560c7b48c8..cd8a23d299 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Tab_rename_Delete_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Tab_rename_Delete_spec.js @@ -4,24 +4,22 @@ const explorer = require("../../../../locators/explorerlocators.json"); const dsl = require("../../../../fixtures/tabdsl.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json"); -describe("Tab widget test", function() { +describe("Tab widget test", function () { const tabname = "UpdatedTab"; before(() => { cy.addDsl(dsl); }); - it("Tab Widget Functionality To rename Tabs from entity explorer", function() { + it("Tab Widget Functionality To rename Tabs from entity explorer", function () { cy.GlobalSearchEntity("Tab1"); cy.hoverAndClickParticularIndex(2); cy.selectAction("Edit Name"); //cy.RenameEntity(tabname); - cy.get(explorer.editEntity) - .last() - .type(tabname, { force: true }); + cy.get(explorer.editEntity).last().type(tabname, { force: true }); //cy.RenameEntity(tabname); }); - it("Tab name validation in properties and widget ", function() { + it("Tab name validation in properties and widget ", function () { cy.openPropertyPane("tabswidget"); cy.closePropertyPane(); cy.get(Layoutpage.tabWidget) @@ -30,14 +28,12 @@ describe("Tab widget test", function() { .should("be.visible"); }); - it("Tab Widget Functionality To delete Tabs from entity explorer", function() { + it("Tab Widget Functionality To delete Tabs from entity explorer", function () { cy.GlobalSearchEntity("Tab2"); cy.hoverAndClickParticularIndex(3); cy.selectAction("Edit Name"); //cy.RenameEntity(tabname); - cy.get(explorer.editEntity) - .last() - .type(tabname, { force: true }); + cy.get(explorer.editEntity).last().type(tabname, { force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(3000); cy.validateMessage(tabname); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Delete_Undo_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Delete_Undo_spec.js index 404c1862ca..74dfe06192 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Delete_Undo_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Delete_Undo_spec.js @@ -8,10 +8,10 @@ before(() => { cy.addDsl(dsl); }); -describe("Test Suite to validate copy/delete/undo functionalites", function() { +describe("Test Suite to validate copy/delete/undo functionalites", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; - it("Drag and drop form widget and validate copy widget via toast message", function() { + it("Drag and drop form widget and validate copy widget via toast message", function () { cy.openPropertyPane("formwidget"); cy.widgetText( "FormTest", @@ -21,27 +21,21 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() { cy.get(commonlocators.copyWidget).click(); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); - cy.get(commonlocators.toastBody) - .first() - .contains("Copied"); + cy.get(commonlocators.toastBody).first().contains("Copied"); }); - it("Delete Widget from sidebar and Undo action validation", function() { + it("Delete Widget from sidebar and Undo action validation", function () { cy.GlobalSearchEntity("Widgets"); - cy.get(".t--entity-name") - .contains("FormTest") - .trigger("mouseover"); + cy.get(".t--entity-name").contains("FormTest").trigger("mouseover"); cy.hoverAndClickParticularIndex(1); cy.selectAction("Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(3); expect($lis.eq(0)).to.contain("{{FormTest.isVisible}}"); expect($lis.eq(1)).to.contain("{{FormTest.data}}"); expect($lis.eq(2)).to.contain("{{FormTest.hasChanges}}"); }); - cy.get(".t--entity-name") - .contains("FormTest") - .trigger("mouseover"); + cy.get(".t--entity-name").contains("FormTest").trigger("mouseover"); cy.hoverAndClickParticularIndex(1); cy.selectAction("Delete"); //cy.DeleteWidgetFromSideBar(); @@ -62,12 +56,10 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() { ); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); - cy.get(".t--entity-name") - .contains("FormTest") - .trigger("mouseover"); + cy.get(".t--entity-name").contains("FormTest").trigger("mouseover"); cy.hoverAndClickParticularIndex(1); cy.selectAction("Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(3); expect($lis.eq(0)).to.contain("{{FormTest.isVisible}}"); expect($lis.eq(1)).to.contain("{{FormTest.data}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js index 767f747bca..95629303ab 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js @@ -10,8 +10,8 @@ before(() => { cy.addDsl(dsl); }); -describe("Test Suite to validate copy/delete/undo functionalites", function() { - it.only("Drag and drop form widget and validate copy widget via toast message", function() { +describe("Test Suite to validate copy/delete/undo functionalites", function () { + it.only("Drag and drop form widget and validate copy widget via toast message", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; cy.openPropertyPane("formwidget"); @@ -24,10 +24,7 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() { cy.get("body").type(`{${modifierKey}}c`); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); - cy.get(commonlocators.toastBody) - .first() - .contains("Copied") - .click(); + cy.get(commonlocators.toastBody).first().contains("Copied").click(); cy.get("body").type(`{${modifierKey}}v`, { force: true }); cy.wait("@updateLayout").should( "have.nested.property", @@ -44,7 +41,7 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() { ee.ExpandCollapseEntity("Widgets"); ee.ExpandCollapseEntity("FormTest"); ee.ActionContextMenuByEntityName("FormTestCopy", "Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(3); expect($lis.eq(0)).to.contain("{{FormTestCopy.isVisible}}"); expect($lis.eq(1)).to.contain("{{FormTestCopy.data}}"); @@ -53,12 +50,8 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() { cy.get($lis.eq(1)) .contains("{{FormTestCopy.data}}") .click({ force: true }); - cy.get(".bp3-input") - .first() - .click({ force: true }); - cy.get(".bp3-input") - .first() - .type(`{${modifierKey}}v`, { force: true }); + cy.get(".bp3-input").first().click({ force: true }); + cy.get(".bp3-input").first().type(`{${modifierKey}}v`, { force: true }); }); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_spec.js index 5dd1cc931a..d34a6b2034 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_spec.js @@ -1,39 +1,31 @@ const dsl = require("../../../../fixtures/displayWidgetDsl.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json"); -describe("Entity explorer tests related to widgets and validation", function() { +describe("Entity explorer tests related to widgets and validation", function () { before(() => { cy.addDsl(dsl); }); - it("Widget edit/delete/copy to clipboard validation", function() { + it("Widget edit/delete/copy to clipboard validation", function () { cy.CheckAndUnfoldEntityItem("Widgets"); cy.selectEntityByName("Container4"); - cy.get(".t--entity-collapse-toggle") - .eq(4) - .click({ force: true }); - cy.get(".t--entity-name") - .contains("Text1") - .trigger("mouseover"); + cy.get(".t--entity-collapse-toggle").eq(4).click({ force: true }); + cy.get(".t--entity-name").contains("Text1").trigger("mouseover"); cy.hoverAndClickParticularIndex(4); cy.selectAction("Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(2); expect($lis.eq(0)).to.contain("{{Text1.isVisible}}"); expect($lis.eq(1)).to.contain("{{Text1.text}}"); }); - cy.get(".t--entity-name") - .contains("Text1") - .trigger("mouseover"); + cy.get(".t--entity-name").contains("Text1").trigger("mouseover"); cy.hoverAndClickParticularIndex(4); cy.selectAction("Edit Name"); cy.EditApiNameFromExplorer("TextUpdated"); - cy.get(".t--entity-name") - .contains("TextUpdated") - .trigger("mouseover"); + cy.get(".t--entity-name").contains("TextUpdated").trigger("mouseover"); cy.hoverAndClickParticularIndex(4); cy.selectAction("Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(2); expect($lis.eq(0)).to.contain("{{TextUpdated.isVisible}}"); expect($lis.eq(1)).to.contain("{{TextUpdated.text}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Hide_Page_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Hide_Page_spec.js index 01b4f20686..b17433d613 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Hide_Page_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Hide_Page_spec.js @@ -4,13 +4,11 @@ const publish = require("../../../../locators/publishWidgetspage.json"); const pageOne = "MyPage1"; const pageTwo = "MyPage2"; -describe("Hide / Show page test functionality", function() { - it("Hide page test ", function() { +describe("Hide / Show page test functionality", function () { + it("Hide page test ", function () { cy.Createpage(pageOne); cy.Createpage(pageTwo); - cy.get(".t--entity-name") - .contains("Page1") - .click({ force: true }); + cy.get(".t--entity-name").contains("Page1").click({ force: true }); cy.get(`.t--entity-item:contains('MyPage2')`).within(() => { cy.get(".t--context-menu").click({ force: true }); }); @@ -20,7 +18,7 @@ describe("Hide / Show page test functionality", function() { cy.get(".t--page-switch-tab").should("have.length", 2); }); - it("Show page test ", function() { + it("Show page test ", function () { cy.get(publish.backToEditor).click(); cy.get(`.t--entity-name:contains('MyPage2')`).trigger("mouseover"); cy.hoverAndClick(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/JSEditorContextMenu_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/JSEditorContextMenu_Spec.ts index c9b0031f94..6f80d98059 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/JSEditorContextMenu_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/JSEditorContextMenu_Spec.ts @@ -13,13 +13,13 @@ describe("Validate basic operations on Entity explorer JSEditor structure", () = jsEditor.ValidateDefaultJSObjProperties("JSObject1"); }); - it("2. Validate Rename JSObject from Form Header", function() { + it("2. Validate Rename JSObject from Form Header", function () { jsEditor.RenameJSObjFromPane("RenamedJSObject"); ee.AssertEntityPresenceInExplorer("RenamedJSObject"); jsEditor.ValidateDefaultJSObjProperties("RenamedJSObject"); }); - it("3. Validate Copy JSObject", function() { + it("3. Validate Copy JSObject", function () { ee.ActionContextMenuByEntityName("RenamedJSObject", "Copy to page", pageId); cy.wait("@createNewJSCollection").should( "have.nested.property", @@ -30,13 +30,13 @@ describe("Validate basic operations on Entity explorer JSEditor structure", () = jsEditor.ValidateDefaultJSObjProperties("RenamedJSObjectCopy"); }); - it("4. Validate Rename JSObject from Entity Explorer", function() { + it("4. Validate Rename JSObject from Entity Explorer", function () { jsEditor.RenameJSObjFromExplorer("RenamedJSObject", "ExplorerRenamed"); ee.AssertEntityPresenceInExplorer("ExplorerRenamed"); jsEditor.ValidateDefaultJSObjProperties("ExplorerRenamed"); }); - it("5. Validate Move JSObject", function() { + it("5. Validate Move JSObject", function () { const newPageId = "Page2"; ee.AddNewPage(); ee.AssertEntityPresenceInExplorer(newPageId); @@ -52,7 +52,7 @@ describe("Validate basic operations on Entity explorer JSEditor structure", () = jsEditor.ValidateDefaultJSObjProperties("RenamedJSObjectCopy"); }); - it("6. Validate Deletion of JSObject", function() { + it("6. Validate Deletion of JSObject", function () { ee.SelectEntityByName(pageId); ee.ActionContextMenuByEntityName( "ExplorerRenamed", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Page_Load_Spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Page_Load_Spec.js index fdc54a0ead..403077b0e4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Page_Load_Spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Page_Load_Spec.js @@ -59,9 +59,7 @@ describe("Page Load tests", () => { "This is Page 2", ); // Switch page - cy.get(".t--page-switch-tab") - .contains("Page1") - .click({ force: true }); + cy.get(".t--page-switch-tab").contains("Page1").click({ force: true }); // Assert active page tab cy.get(".t--page-switch-tab") .contains("Page1") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Pages_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Pages_spec.js index 77055ab4f9..f51c6fd9f8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Pages_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Pages_spec.js @@ -4,11 +4,11 @@ const locators = { errorPageTitle: ".t--error-page-title", }; -describe("Pages", function() { +describe("Pages", function () { let veryLongPageName = `abcdefghijklmnopqrstuvwxyz1234`; let apiName = "someApi"; - it("1. Clone page", function() { + it("1. Clone page", function () { //cy.NavigateToAPI_Panel(); _.apiPage.CreateApi(apiName); _.entityExplorer.SelectEntityByName("Page1", "Pages"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Scrolling_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Scrolling_Spec.ts index ef7ca68e9a..46ba2331d8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Scrolling_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Scrolling_Spec.ts @@ -1,8 +1,8 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; let mockDBNameUsers: string, mockDBNameMovies: string; -describe("Entity explorer context menu should hide on scrolling", function() { - it("1. Bug #15474 - Entity explorer menu must close on scroll", function() { +describe("Entity explorer context menu should hide on scrolling", function () { + it("1. Bug #15474 - Entity explorer menu must close on scroll", function () { // Setup to make the explorer scrollable _.entityExplorer.ExpandCollapseEntity("Queries/JS"); _.entityExplorer.ExpandCollapseEntity("Datasources"); @@ -32,8 +32,16 @@ describe("Entity explorer context menu should hide on scrolling", function() { after(() => { //clean up - _.entityExplorer.ActionContextMenuByEntityName("Query1", "Delete", "Are you sure?"); - _.entityExplorer.ActionContextMenuByEntityName("Query2", "Delete", "Are you sure?"); + _.entityExplorer.ActionContextMenuByEntityName( + "Query1", + "Delete", + "Are you sure?", + ); + _.entityExplorer.ActionContextMenuByEntityName( + "Query2", + "Delete", + "Are you sure?", + ); _.dataSources.DeleteDatasouceFromActiveTab(mockDBNameMovies); //Since sometimes after Queries are deleted, ds is no more visible in EE tr_.ee _.dataSources.DeleteDatasouceFromActiveTab(mockDBNameUsers); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/UpdateUsersName_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/UpdateUsersName_spec.js index 10ca612df4..e661a658f8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/UpdateUsersName_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/UpdateUsersName_spec.js @@ -1,10 +1,10 @@ import homePage from "../../../../locators/HomePage"; import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Update a user's name", function() { +describe("Update a user's name", function () { let username; - it("1. Update a user's name", function() { + it("1. Update a user's name", function () { _.homePage.NavigateToHome(); cy.get(homePage.profileMenu).click(); cy.get(".t--edit-profile").click({ force: true }); @@ -12,9 +12,7 @@ describe("Update a user's name", function() { cy.generateUUID().then((uid) => { username = uid; cy.get("[data-cy=t--display-name]").clear(); - cy.get("[data-cy=t--display-name]") - .click() - .type(username); + cy.get("[data-cy=t--display-name]").click().type(username); // Waiting as the input onchange has a debounce // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); @@ -25,7 +23,7 @@ describe("Update a user's name", function() { }); }); - it("2. Validate email address and Reset pwd", function() { + it("2. Validate email address and Reset pwd", function () { cy.intercept("POST", "/api/v1/users/forgotPassword", { fixture: "resetPassword.json", }).as("resetPwd"); @@ -41,10 +39,7 @@ describe("Update a user's name", function() { const someText = text; expect(someText).to.equal(Cypress.env("USERNAME")); }); - cy.get(".react-tabs a") - .last() - .contains("Reset Password") - .click(); + cy.get(".react-tabs a").last().contains("Reset Password").click(); cy.wait("@resetPwd").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/FormLogin/EnableFormLogin_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/FormLogin/EnableFormLogin_spec.js index 9e81453ece..48e0a4c0ea 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/FormLogin/EnableFormLogin_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/FormLogin/EnableFormLogin_spec.js @@ -1,8 +1,8 @@ import adminSettings from "../../../../locators/AdminsSettings"; import homePage from "../../../../locators/HomePage"; -describe("Form Login test functionality", function() { - it("1. Go to admin settings and disable Form Signup", function() { +describe("Form Login test functionality", function () { + it("1. Go to admin settings and disable Form Signup", function () { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); @@ -66,7 +66,7 @@ describe("Form Login test functionality", function() { }); }); - it("2. Go to admin settings and disable Form Login", function() { + it("2. Go to admin settings and disable Form Login", function () { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/FormNativeToRawTests/Mongo_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/FormNativeToRawTests/Mongo_spec.ts index 88f516b75d..5c4460da46 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/FormNativeToRawTests/Mongo_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/FormNativeToRawTests/Mongo_spec.ts @@ -27,21 +27,33 @@ describe("Mongo Form to Native conversion works", () => { formControls.mongoFindProjection, ); - _.dataSources.ValidateNSelectDropdown("Commands", "Find Document(s)", "Raw"); + _.dataSources.ValidateNSelectDropdown( + "Commands", + "Find Document(s)", + "Raw", + ); _.agHelper.VerifyCodeInputValue(formControls.rawBody, expectedOutput); // then we test to check if the conversion is only done once. // and then we ensure that upon switching between another command and Raw, the Template menu does not show up. - _.dataSources.ValidateNSelectDropdown("Commands", "Raw", "Find Document(s)"); + _.dataSources.ValidateNSelectDropdown( + "Commands", + "Raw", + "Find Document(s)", + ); _.agHelper.TypeDynamicInputValueNValidate( "modifyCollection", formControls.mongoCollection, ); - _.dataSources.ValidateNSelectDropdown("Commands", "Find Document(s)", "Raw"); + _.dataSources.ValidateNSelectDropdown( + "Commands", + "Find Document(s)", + "Raw", + ); // make sure template menu no longer reappears _.agHelper.AssertElementAbsence(_.dataSources._templateMenu); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitDiscardChange/DiscardChanges_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitDiscardChange/DiscardChanges_spec.js index 97670350ef..a03b4eb7ea 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitDiscardChange/DiscardChanges_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitDiscardChange/DiscardChanges_spec.js @@ -5,7 +5,7 @@ const queryLocators = require("../../../../../locators/QueryEditor.json"); const dynamicInputLocators = require("../../../../../locators/DynamicInput.json"); const explorer = require("../../../../../locators/explorerlocators.json"); -describe("Git discard changes:", function() { +describe("Git discard changes:", function () { let datasourceName; let repoName; const query1 = "get_users"; @@ -39,9 +39,7 @@ describe("Git discard changes:", function() { }); // Create new postgres query cy.get(queryLocators.queryNameField).type(`${query1}`); - cy.get(queryLocators.switch) - .last() - .click({ force: true }); + cy.get(queryLocators.switch).last().click({ force: true }); cy.get(queryLocators.templateMenu).click(); cy.get(queryLocators.query).click({ force: true }); cy.get(".CodeMirror textarea") @@ -56,9 +54,7 @@ describe("Git discard changes:", function() { cy.CheckAndUnfoldEntityItem("Pages"); cy.wait(1000); - cy.get(".t--entity-item:contains(Page1)") - .first() - .click(); + cy.get(".t--entity-item:contains(Page1)").first().click(); cy.wait("@getPage"); // bind input widget to postgres query on page1 cy.get(explorer.addWidget).click(); @@ -75,9 +71,7 @@ describe("Git discard changes:", function() { cy.CheckAndUnfoldEntityItem("Pages"); cy.Createpage(page2); cy.wait(1000); - cy.get(`.t--entity-item:contains(${page2})`) - .first() - .click(); + cy.get(`.t--entity-item:contains(${page2})`).first().click(); cy.wait("@getPage"); cy.createJSObject('return "Success";'); cy.get(explorer.addWidget).click(); @@ -102,9 +96,7 @@ describe("Git discard changes:", function() { }); it("2. Add new datasource query, discard changes, verify query is deleted", () => { - cy.get(`.t--entity-item:contains("Page1")`) - .first() - .click(); + cy.get(`.t--entity-item:contains("Page1")`).first().click(); cy.wait("@getPage"); // create new postgres query cy.NavigateToQueryEditor(); @@ -118,9 +110,7 @@ describe("Git discard changes:", function() { cy.get(datasource.createQuery).click(); }); cy.get(queryLocators.queryNameField).type(`${query2}`); - cy.get(queryLocators.switch) - .last() - .click({ force: true }); + cy.get(queryLocators.switch).last().click({ force: true }); cy.get(queryLocators.templateMenu).click(); cy.get(queryLocators.query).click({ force: true }); cy.get(".CodeMirror textarea") @@ -133,9 +123,7 @@ describe("Git discard changes:", function() { cy.WaitAutoSave(); cy.runQuery(); // navoigate to Page1 - cy.get(`.t--entity-item:contains(Page1)`) - .first() - .click(); + cy.get(`.t--entity-item:contains(Page1)`).first().click(); cy.wait("@getPage"); // discard changes cy.gitDiscardChanges(); @@ -167,9 +155,7 @@ describe("Git discard changes:", function() { cy.wait(5000); // verify page2 is recovered back cy.get(`.t--entity-name:contains(${page2})`).should("be.visible"); - cy.get(`.t--entity-item:contains(${page2})`) - .first() - .click(); + cy.get(`.t--entity-item:contains(${page2})`).first().click(); cy.wait("@getPage"); // verify data binding on page2 cy.get(".bp3-input").should("have.value", "Success"); @@ -195,9 +181,7 @@ describe("Git discard changes:", function() { it("6. Delete JSObject1 and trigger discard flow, JSObject1 should be active again", () => { // navigate to page2 cy.CheckAndUnfoldEntityItem("Pages"); - cy.get(`.t--entity-item:contains(${page2})`) - .first() - .click(); + cy.get(`.t--entity-item:contains(${page2})`).first().click(); cy.wait("@getPage"); cy.wait(3000); /* create and save jsObject */ @@ -214,9 +198,7 @@ describe("Git discard changes:", function() { cy.gitDiscardChanges(); cy.wait(5000); cy.CheckAndUnfoldEntityItem("Pages"); - cy.get(`.t--entity-item:contains(${page2})`) - .first() - .click(); + cy.get(`.t--entity-item:contains(${page2})`).first().click(); cy.wait("@getPage"); cy.wait(3000); //verify JSObject is recovered @@ -227,9 +209,7 @@ describe("Git discard changes:", function() { it("7. Add new page i.e page3, go to page2 & discard changes, verify page3 is removed", () => { // create new page page3 and move to page1 cy.Createpage(page3); - cy.get(`.t--entity-item:contains(${page2})`) - .first() - .click(); + cy.get(`.t--entity-item:contains(${page2})`).first().click(); // discard changes cy.gitDiscardChanges(); cy.wait(5000); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitImport/GitImport_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitImport/GitImport_spec.js index 0724e06a6a..378b401fb3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitImport/GitImport_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitImport/GitImport_spec.js @@ -9,7 +9,7 @@ const mainBranch = "master"; let repoName, newWorkspaceName; import * as _ from "../../../../../support/Objects/ObjectsCore"; -describe("Git import flow ", function() { +describe("Git import flow ", function () { before(() => { cy.NavigateToHome(); cy.createWorkspace(); @@ -20,9 +20,7 @@ describe("Git import flow ", function() { }); it("1. Import an app from JSON with Postgres, MySQL, Mongo db & then connect it to Git", () => { cy.NavigateToHome(); - cy.get(homePage.optionsIcon) - .first() - .click(); + cy.get(homePage.optionsIcon).first().click(); cy.get(homePage.workspaceImportAppOption).click({ force: true }); cy.get(homePage.workspaceImportAppModal).should("be.visible"); cy.wait(1000); @@ -82,13 +80,9 @@ describe("Git import flow ", function() { cy.CreateAppForWorkspace(newWorkspaceName, "gitImport"); }); cy.get(homePage.homeIcon).click(); - cy.get(homePage.optionsIcon) - .first() - .click(); + cy.get(homePage.optionsIcon).first().click(); cy.get(homePage.workspaceImportAppOption).click({ force: true }); - cy.get(".t--import-json-card") - .next() - .click(); + cy.get(".t--import-json-card").next().click(); cy.importAppFromGit(repoName); cy.wait(5000); cy.get(reconnectDatasourceModal.Modal).should("be.visible"); @@ -137,13 +131,9 @@ describe("Git import flow ", function() { it("3. Verfiy imported app should have all the data binding visible in view and edit mode", () => { // verify postgres data binded to table - cy.get(".tbody") - .first() - .should("contain.text", "Test user 7"); + cy.get(".tbody").first().should("contain.text", "Test user 7"); //verify MySQL data binded to table - cy.get(".tbody") - .last() - .should("contain.text", "New Config"); + cy.get(".tbody").last().should("contain.text", "New Config"); // verify api response binded to input widget cy.xpath("//input[@value='this is a test']").should("be.visible"); // verify js object binded to input widget @@ -157,13 +147,9 @@ describe("Git import flow ", function() { newBranch = branName; cy.log("newBranch is " + newBranch); }); - cy.get(".tbody") - .first() - .should("contain.text", "Test user 7"); + cy.get(".tbody").first().should("contain.text", "Test user 7"); // verify MySQL data binded to table - cy.get(".tbody") - .last() - .should("contain.text", "New Config"); + cy.get(".tbody").last().should("contain.text", "New Config"); // verify api response binded to input widget cy.xpath("//input[@value='this is a test']"); // verify js object binded to input widget @@ -199,9 +185,7 @@ describe("Git import flow ", function() { // verify js object binded to input widget cy.xpath("//input[@value='Success']"); // navigate to Page1 and verify data - cy.get(".t--page-switch-tab") - .contains("Page1") - .click({ force: true }); + cy.get(".t--page-switch-tab").contains("Page1").click({ force: true }); _.table.AssertTableLoaded(); // verify api response binded to input widget cy.xpath("//input[@value='this is a test']"); @@ -216,18 +200,12 @@ describe("Git import flow ", function() { cy.wait(2000); // validate data binding in edit and deploy mode cy.latestDeployPreview(); - cy.get(".tbody") - .first() - .should("contain.text", "Test user 7"); + cy.get(".tbody").first().should("contain.text", "Test user 7"); cy.xpath("//input[@value='this is a test']"); cy.xpath("//input[@value='Success']"); // navigate to Page1 and verify data - cy.get(".t--page-switch-tab") - .contains("Page1 Copy") - .click({ force: true }); - cy.get(".tbody") - .first() - .should("contain.text", "Test user 7"); + cy.get(".t--page-switch-tab").contains("Page1 Copy").click({ force: true }); + cy.get(".tbody").first().should("contain.text", "Test user 7"); cy.xpath("//input[@value='this is a test']"); cy.xpath("//input[@value='Success']"); cy.get(commonlocators.backToEditor).click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitImport/ImportEmptyRepo_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitImport/ImportEmptyRepo_spec.js index 2169a749c6..dc34409296 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitImport/ImportEmptyRepo_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitImport/ImportEmptyRepo_spec.js @@ -2,7 +2,7 @@ import homePage from "../../../../../locators/HomePage"; import gitSyncLocators from "../../../../../locators/gitSyncLocators"; import * as _ from "../../../../../support/Objects/ObjectsCore"; -describe("Git import empty repository", function() { +describe("Git import empty repository", function () { let repoName; const assertConnectFailure = true; const failureMessage = @@ -23,13 +23,9 @@ describe("Git import empty repository", function() { it("Bug #12749 Git Import - Empty Repo NullPointerException", () => { cy.get(homePage.homeIcon).click(); - cy.get(homePage.optionsIcon) - .first() - .click(); + cy.get(homePage.optionsIcon).first().click(); cy.get(homePage.workspaceImportAppOption).click({ force: true }); - cy.get(".t--import-json-card") - .next() - .click(); + cy.get(".t--import-json-card").next().click(); cy.generateUUID().then((uid) => { repoName = uid; //cy.createTestGithubRepo(repoName); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Connection_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Connection_spec.js index 0337555bb2..708727e0d5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Connection_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Connection_spec.js @@ -16,7 +16,7 @@ let repoName; let generatedKey; let windowOpenSpy; const owner = Cypress.env("TEST_GITHUB_USER_NAME"); -describe("Git sync modal: connect tab", function() { +describe("Git sync modal: connect tab", function () { before(() => { cy.NavigateToHome(); cy.createWorkspace(); @@ -31,7 +31,7 @@ describe("Git sync modal: connect tab", function() { }); }); - it("1. validates repo URL", function() { + it("1. validates repo URL", function () { // open gitSync modal cy.get(homePage.deployPopupOptionTrigger).click({ force: true }); cy.get(homePage.connectToGitBtn).click({ force: true }); @@ -90,11 +90,9 @@ describe("Git sync modal: connect tab", function() { cy.xpath(gitSyncLocators.learnMoreDeployKey).click({ force: true }); }); - it("2. validates copy key and validates repo url input after key generation", function() { + it("2. validates copy key and validates repo url input after key generation", function () { cy.window().then((win) => { - cy.stub(win, "prompt") - .returns(win.prompt) - .as("copyToClipboardPrompt"); + cy.stub(win, "prompt").returns(win.prompt).as("copyToClipboardPrompt"); }); cy.get(gitSyncLocators.copySshKey).click(); @@ -115,7 +113,7 @@ describe("Git sync modal: connect tab", function() { cy.get(gitSyncLocators.connectSubmitBtn).should("not.be.disabled"); }); - it("3. validates git user config", function() { + it("3. validates git user config", function () { cy.get(gitSyncLocators.useGlobalGitConfig).click(); // name empty invalid @@ -183,7 +181,7 @@ describe("Git sync modal: connect tab", function() { }); }); - it("4. validates submit errors", function() { + it("4. validates submit errors", function () { cy.get(gitSyncLocators.useGlobalGitConfig).click(); cy.get(gitSyncLocators.gitConfigNameInput) .scrollIntoView() @@ -209,9 +207,7 @@ describe("Git sync modal: connect tab", function() { force: true, }, ); - cy.get(gitSyncLocators.connectSubmitBtn) - .scrollIntoView() - .click(); + cy.get(gitSyncLocators.connectSubmitBtn).scrollIntoView().click(); cy.get(gitSyncLocators.connetStatusbar).should("exist"); cy.wait("@connectGitLocalRepo").then((interception) => { const status = interception.response.body.responseMeta.status; @@ -256,9 +252,7 @@ describe("Git sync modal: connect tab", function() { }, }); - cy.get(gitSyncLocators.connectSubmitBtn) - .scrollIntoView() - .click(); + cy.get(gitSyncLocators.connectSubmitBtn).scrollIntoView().click(); cy.get(gitSyncLocators.connetStatusbar).should("exist"); cy.wait("@connectGitLocalRepo").then((interception) => { const status = interception.response.body.responseMeta.status; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Deploy_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Deploy_spec.js index 05c4480956..5f3dab8d01 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Deploy_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Deploy_spec.js @@ -3,7 +3,7 @@ import homePage from "../../../../../locators/HomePage"; import * as _ from "../../../../../support/Objects/ObjectsCore"; let repoName; -describe("Git sync modal: deploy tab", function() { +describe("Git sync modal: deploy tab", function () { before(() => { _.homePage.NavigateToHome(); cy.createWorkspace(); @@ -18,7 +18,7 @@ describe("Git sync modal: deploy tab", function() { }); }); - it("1. Validate commit comment inputbox and last deployed preview", function() { + it("1. Validate commit comment inputbox and last deployed preview", function () { // last deployed preview // The deploy preview Link should be displayed only after the first commit done cy.get(gitSyncLocators.bottomBarCommitButton).click(); @@ -31,7 +31,7 @@ describe("Git sync modal: deploy tab", function() { cy.get(gitSyncLocators.closeGitSyncModal).click(); }); - it("2. Post connection app name deploy menu", function() { + it("2. Post connection app name deploy menu", function () { // deploy _.agHelper.GetNClick(_.locators._publishButton); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/DisconnectGit_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/DisconnectGit_spec.js index bb211c1a23..2ffeef3045 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/DisconnectGit_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/DisconnectGit_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; let repoName; let windowOpenSpy; -describe("Git disconnect modal:", function() { +describe("Git disconnect modal:", function () { before(() => { cy.NavigateToHome(); cy.createWorkspace(); @@ -17,7 +17,7 @@ describe("Git disconnect modal:", function() { }); }); - it("1. should be opened with proper components", function() { + it("1. should be opened with proper components", function () { _.gitSync.AuthorizeKeyToGitea(repoName); cy.get(gitSyncLocators.bottomBarCommitButton).click(); cy.get("[data-cy=t--tab-GIT_CONNECTION]").click(); @@ -59,7 +59,7 @@ describe("Git disconnect modal:", function() { cy.wait(2000); }); - it("2. should have disconnect repo button", function() { + it("2. should have disconnect repo button", function () { cy.get(gitSyncLocators.bottomBarCommitButton).click(); cy.get("[data-cy=t--tab-GIT_CONNECTION]").click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitBugs_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitBugs_spec.js index 3f97a97f8a..0a6cb9b8e8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitBugs_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitBugs_spec.js @@ -15,7 +15,7 @@ const jsObject = "JSObject1"; let repoName; -describe("Git sync Bug #10773", function() { +describe("Git sync Bug #10773", function () { beforeEach(() => { _.agHelper.RestoreLocalStorageCache(); }); @@ -126,9 +126,7 @@ describe("Git sync Bug #10773", function() { "be.visible", ); // switch to Page1 and validate data binding - cy.get(".t--page-switch-tab") - .contains("Page1") - .click({ force: true }); + cy.get(".t--page-switch-tab").contains("Page1").click({ force: true }); cy.xpath("//input[@class='bp3-input' and @value='Success']").should( "be.visible", ); @@ -172,7 +170,7 @@ describe("Git sync Bug #10773", function() { _.gitSync.DeleteTestGithubRepo(repoName); }); - it("4. Create an app with JSObject, connect it to git and verify its data in edit and deploy mode", function() { + it("4. Create an app with JSObject, connect it to git and verify its data in edit and deploy mode", function () { cy.NavigateToHome(); cy.createWorkspace(); cy.wait("@createWorkspace").then((interception) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitSyncedApps_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitSyncedApps_spec.js index 6aa3feadb5..16d609e64a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitSyncedApps_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitSyncedApps_spec.js @@ -21,7 +21,7 @@ const mainBranch = "master"; let datasourceName; let repoName; -describe("Git sync apps", function() { +describe("Git sync apps", function () { before(() => { // cy.NavigateToHome(); // cy.createWorkspace(); @@ -31,9 +31,7 @@ describe("Git sync apps", function() { }); it("1. Generate postgreSQL crud page , connect to git, clone the page, rename page with special character in it", () => { cy.NavigateToHome(); - cy.get(homePage.createNew) - .first() - .click({ force: true }); + cy.get(homePage.createNew).first().click({ force: true }); cy.wait("@createNewApplication").should( "have.nested.property", @@ -72,9 +70,7 @@ describe("Git sync apps", function() { cy.get(generatePage.selectTableDropdown).click(); - cy.get(generatePage.dropdownOption) - .contains("public.configs") - .click(); + cy.get(generatePage.dropdownOption).contains("public.configs").click(); // skip optional search column selection. cy.get(generatePage.generatePageFormSubmitBtn).click(); @@ -217,9 +213,7 @@ describe("Git sync apps", function() { .find(".bp3-input") .invoke("val") .should("be.oneOf", ["morpheus", "This is a test"]); - cy.get(`.t--entity-item:contains(${newPage})`) - .first() - .click(); + cy.get(`.t--entity-item:contains(${newPage})`).first().click(); cy.wait("@getPage"); cy.get(".t--draggable-inputwidgetv2") .first() @@ -235,9 +229,7 @@ describe("Git sync apps", function() { cy.readTabledataPublish("0", "1").then((cellData) => { expect(cellData).to.be.equal("New Config"); }); - cy.get(`.t--entity-item:contains(${pageName})`) - .first() - .click(); + cy.get(`.t--entity-item:contains(${pageName})`).first().click(); cy.wait("@getPage"); cy.readTabledataPublish("0", "1").then((cellData) => { expect(cellData).to.be.equal("New Config"); @@ -256,9 +248,7 @@ describe("Git sync apps", function() { cy.readTabledataPublish("0", "1").then((cellData) => { expect(cellData).to.be.equal("New Config"); }); - cy.get(".t--page-switch-tab") - .contains(`${newPage}`) - .click({ force: true }); + cy.get(".t--page-switch-tab").contains(`${newPage}`).click({ force: true }); cy.get(".bp3-input") .first() .invoke("val") @@ -304,9 +294,7 @@ describe("Git sync apps", function() { cy.get(datasource.createQuery).click(); }); cy.get(queryLocators.queryNameField).type("get_users"); - cy.get(queryLocators.switch) - .last() - .click({ force: true }); + cy.get(queryLocators.switch).last().click({ force: true }); cy.get(queryLocators.templateMenu).click(); cy.get(queryLocators.query).click({ force: true }); // writing query to get the schema @@ -395,9 +383,7 @@ describe("Git sync apps", function() { cy.readTabledataPublish("0", "1").then((cellData) => { expect(cellData).to.be.equal("New Config"); }); - cy.get(".t--page-switch-tab") - .contains(`${newPage}`) - .click({ force: true }); + cy.get(".t--page-switch-tab").contains(`${newPage}`).click({ force: true }); cy.wait(2000); cy.get(".bp3-input") .first() @@ -530,33 +516,19 @@ describe("Git sync apps", function() { }); it("10. Import app from git and verify page order should not change", () => { cy.get(homePage.homeIcon).click(); - cy.get(homePage.optionsIcon) - .first() - .click(); + cy.get(homePage.optionsIcon).first().click(); cy.get(homePage.workspaceImportAppOption).click({ force: true }); - cy.get(".t--import-json-card") - .next() - .click(); + cy.get(".t--import-json-card").next().click(); // import application from git cy.importAppFromGit(repoName); cy.wait(2000); // verify page order remains same as in orignal app cy.CheckAndUnfoldEntityItem("Pages"); - cy.get(".t--entity-item") - .eq(1) - .contains("crudpage_1"); - cy.get(".t--entity-item") - .eq(2) - .contains("crudpage_1 Copy"); - cy.get(".t--entity-item") - .eq(3) - .contains("ApiCalls_1"); - cy.get(".t--entity-item") - .eq(4) - .contains("ApiCalls_1 Copy"); - cy.get(".t--entity-item") - .eq(5) - .contains("Child_Page"); + cy.get(".t--entity-item").eq(1).contains("crudpage_1"); + cy.get(".t--entity-item").eq(2).contains("crudpage_1 Copy"); + cy.get(".t--entity-item").eq(3).contains("ApiCalls_1"); + cy.get(".t--entity-item").eq(4).contains("ApiCalls_1 Copy"); + cy.get(".t--entity-item").eq(5).contains("Child_Page"); }); after(() => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Git_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Git_spec.js index 73983eba5c..db152c5172 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Git_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Git_spec.js @@ -26,7 +26,7 @@ let applicationId = null; let applicationName = null; let repoName; -describe.skip("Git sync:", function() { +describe.skip("Git sync:", function () { before(() => { cy.NavigateToHome(); cy.createWorkspace(); @@ -52,7 +52,7 @@ describe.skip("Git sync:", function() { }); }); - it("1. Shows remote is ahead warning and conflict error during commit and push", function() { + it("1. Shows remote is ahead warning and conflict error during commit and push", function () { _.gitSync.CreateGitBranch(tempBranch, false); cy.get("@gitbranchName").then((branName) => { tempBranch = branName; @@ -104,7 +104,7 @@ describe.skip("Git sync:", function() { cy.get(gitSyncLocators.closeGitSyncModal).click(); }); - it("2. Detect conflicts when merging head to base branch", function() { + it("2. Detect conflicts when merging head to base branch", function () { cy.switchGitBranch(mainBranch); cy.get(explorerLocators.widgetSwitchId).click(); cy.wait(2000); // wait for transition @@ -130,15 +130,13 @@ describe.skip("Git sync:", function() { cy.get(gitSyncLocators.bottomBarMergeButton).click(); cy.wait(5000); // wait for git status call to finish cy.get(gitSyncLocators.mergeBranchDropdownDestination).click(); - cy.get(commonlocators.dropdownmenu) - .contains(mainBranch) - .click(); + cy.get(commonlocators.dropdownmenu).contains(mainBranch).click(); // assert conflicting status cy.contains(Cypress.env("MESSAGES").GIT_CONFLICTING_INFO()); cy.get(gitSyncLocators.closeGitSyncModal).click(); }); - it("3. Supports merging head to base branch", function() { + it("3. Supports merging head to base branch", function () { cy.switchGitBranch(mainBranch); cy.createGitBranch(tempBranch2); cy.get(explorerLocators.explorerSwitchId).click({ force: true }); @@ -153,7 +151,7 @@ describe.skip("Git sync:", function() { cy.contains("NewPage"); }); - it("4. Enables pulling remote changes from bottom bar", function() { + it("4. Enables pulling remote changes from bottom bar", function () { _.gitSync.CreateGitBranch(tempBranch3, false); cy.get(explorerLocators.widgetSwitchId).click(); cy.wait(2000); // wait for transition @@ -217,7 +215,7 @@ describe.skip("Git sync:", function() { cy.xpath("//span[@name='close-modal']").click({ force: true }); }); - it("5. Clicking '+' icon on bottom bar should open deploy popup", function() { + it("5. Clicking '+' icon on bottom bar should open deploy popup", function () { cy.get(gitSyncLocators.bottomBarCommitButton).click({ force: true }); cy.get(gitSyncLocators.gitSyncModal).should("exist"); cy.get("[data-cy=t--tab-DEPLOY]").should("exist"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Merge_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Merge_spec.js index 02151f26d9..72b4cfd957 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Merge_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Merge_spec.js @@ -5,7 +5,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; let repoName; let childBranchKey = "ChildBranch"; let mainBranch = "master"; -describe("Git sync modal: merge tab", function() { +describe("Git sync modal: merge tab", function () { before(() => { cy.NavigateToHome(); cy.createWorkspace(); @@ -20,7 +20,7 @@ describe("Git sync modal: merge tab", function() { }); }); - it("1. Verify the functionality of the default dropdown under merge tab", function() { + it("1. Verify the functionality of the default dropdown under merge tab", function () { cy.get(commonLocators.canvas).click({ force: true }); _.gitSync.CreateGitBranch(childBranchKey); cy.get(gitSyncLocators.bottomBarMergeButton).click(); @@ -33,9 +33,7 @@ describe("Git sync modal: merge tab", function() { cy.get(gitSyncLocators.mergeButton).should("be.disabled"); cy.wait(3000); cy.get(gitSyncLocators.mergeBranchDropdownDestination).click(); - cy.get(commonLocators.dropdownmenu) - .contains(mainBranch) - .click(); + cy.get(commonLocators.dropdownmenu).contains(mainBranch).click(); _.agHelper.AssertElementAbsence(_.gitSync._checkMergeability, 30000); cy.wait("@mergeStatus", { timeout: 35000 }).should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/PreconnectionAppNameDeployMenu_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/PreconnectionAppNameDeployMenu_spec.ts index 7f7a6bdd95..ae2cfb5827 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/PreconnectionAppNameDeployMenu_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/PreconnectionAppNameDeployMenu_spec.ts @@ -2,7 +2,7 @@ import homePage from "../../../../../locators/HomePage"; import * as _ from "../../../../../support/Objects/ObjectsCore"; import gitSyncLocators from "../../../../../locators/gitSyncLocators"; -describe("Pre git connection spec:", function() { +describe("Pre git connection spec:", function () { it("1. Deploy menu at the application dropdown menu", () => { // create new app cy.NavigateToHome(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/RegenerateSSHKey_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/RegenerateSSHKey_spec.js index ad04d5733e..001ee0fafd 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/RegenerateSSHKey_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/RegenerateSSHKey_spec.js @@ -1,7 +1,7 @@ import gitSyncLocators from "../../../../../locators/gitSyncLocators"; import * as _ from "../../../../../support/Objects/ObjectsCore"; -describe("Git regenerate SSH key flow", function() { +describe("Git regenerate SSH key flow", function () { let repoName; it("1. Verify SSH key regeneration flow ", () => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/RepoLimitExceededErrorModal_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/RepoLimitExceededErrorModal_spec.js index afd345dea4..73537fc1da 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/RepoLimitExceededErrorModal_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/RepoLimitExceededErrorModal_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; import { REPO, CURRENT_REPO } from "../../../../../fixtures/REPO"; let repoName1, repoName2, repoName3, repoName4, windowOpenSpy; -describe("Repo Limit Exceeded Error Modal", function() { +describe("Repo Limit Exceeded Error Modal", function () { before(() => { cy.generateUUID().then((uid) => { cy.Signup(`${uid}@appsmithtest.com`, uid); @@ -16,7 +16,7 @@ describe("Repo Limit Exceeded Error Modal", function() { _.agHelper.ClickButton("Build on my own"); }); - it("1. Modal should be opened with proper components", function() { + it("1. Modal should be opened with proper components", function () { _.homePage.NavigateToHome(); _.homePage.CreateNewApplication(); _.gitSync.CreateNConnectToGit(repoName1, true, true); @@ -75,9 +75,7 @@ describe("Repo Limit Exceeded Error Modal", function() { cy.get(gitSyncLocators.learnMoreOnRepoLimitModal).click(); cy.get(gitSyncLocators.connectedApplication).should("have.length", 3); - cy.get(gitSyncLocators.diconnectLink) - .first() - .click(); + cy.get(gitSyncLocators.diconnectLink).first().click(); cy.get(gitSyncLocators.repoLimitExceededErrorModal).should("not.exist"); cy.get(gitSyncLocators.disconnectGitModal).should("exist"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/SwitchBranches_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/SwitchBranches_spec.js index eeb8adeb2e..e9290ad502 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/SwitchBranches_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/SwitchBranches_spec.js @@ -12,7 +12,7 @@ let parentBranchKey = "ParentBranch", branchQueryKey = "branch"; let repoName; -describe("Git sync:", function() { +describe("Git sync:", function () { before(() => { cy.NavigateToHome(); cy.createWorkspace(); @@ -28,7 +28,7 @@ describe("Git sync:", function() { cy.wait(3000); }); - it("1. create branch input", function() { + it("1. create branch input", function () { cy.get(commonLocators.canvas).click({ force: true }); cy.get(gitSyncLocators.branchButton).click(); @@ -56,7 +56,7 @@ describe("Git sync:", function() { cy.get(gitSyncLocators.closeBranchList).click(); }); - it("2. creates a new branch and create branch specific resources", function() { + it("2. creates a new branch and create branch specific resources", function () { cy.get(commonLocators.canvas).click({ force: true }); //cy.createGitBranch(parentBranchKey); _.gitSync.CreateGitBranch(parentBranchKey, true); @@ -121,7 +121,7 @@ describe("Git sync:", function() { }); // rename entities - it("3. makes branch specific resource updates", function() { + it("3. makes branch specific resource updates", function () { cy.switchGitBranch(childBranchKey); cy.CheckAndUnfoldEntityItem("Queries/JS"); cy.CheckAndUnfoldEntityItem("Pages"); @@ -235,7 +235,7 @@ describe("Git sync:", function() { }); // Validate the error faced when user switches between the branches - it("6. error faced when user switches branch with new page", function() { + it("6. error faced when user switches branch with new page", function () { cy.goToEditFromPublish(); //Adding since skipping 6th case cy.generateUUID().then((uuid) => { _.gitSync.CreateGitBranch(childBranchKey, true); @@ -245,9 +245,7 @@ describe("Git sync:", function() { cy.get(gitSyncLocators.branchButton).click({ force: true }); cy.get(gitSyncLocators.branchSearchInput).type("{selectall}master"); cy.wait(400); - cy.get(gitSyncLocators.branchListItem) - .contains("master") - .click(); + cy.get(gitSyncLocators.branchListItem).contains("master").click(); cy.wait(4000); cy.contains("Page not found"); }); @@ -255,7 +253,7 @@ describe("Git sync:", function() { cy.reload(); }); - it("7. branch list search", function() { + it("7. branch list search", function () { cy.get(".bp3-spinner").should("not.exist"); cy.get(commonLocators.canvas).click({ force: true }); let parentBKey, childBKey; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitWithTheming/GitWithTheming_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitWithTheming/GitWithTheming_spec.js index 15171de89c..fbc221ff17 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitWithTheming/GitWithTheming_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitWithTheming/GitWithTheming_spec.js @@ -2,7 +2,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; const commonlocators = require("../../../../../locators/commonlocators.json"); -describe("Git with Theming:", function() { +describe("Git with Theming:", function () { const backgroudColorMaster = "rgb(85, 61, 233)"; const backgroudColorChildBranch = "rgb(100, 116, 139)"; const tempBranch = "tempBranch"; @@ -34,15 +34,13 @@ describe("Git with Theming:", function() { // cy.connectToGitRepo(repoName); //}); }); - it("Bug #13860 Theming is not getting applied on view mode when the app is connected to Git", function() { + it("Bug #13860 Theming is not getting applied on view mode when the app is connected to Git", function () { _.appSettings.OpenAppSettings(); _.appSettings.GoToThemeSettings(); // apply theme on master branch and deploy cy.get(commonlocators.changeThemeBtn).click({ force: true }); - cy.get(commonlocators.themeCard) - .eq(1) - .click({ force: true }); + cy.get(commonlocators.themeCard).eq(1).click({ force: true }); // check for alert cy.get(`${commonlocators.themeCard}`) @@ -74,9 +72,7 @@ describe("Git with Theming:", function() { cy.get(commonlocators.changeThemeBtn).click({ force: true }); // select a theme - cy.get(commonlocators.themeCard) - .last() - .click({ force: true }); + cy.get(commonlocators.themeCard).last().click({ force: true }); // check for alert cy.get(`${commonlocators.themeCard}`) diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Github/EnableGithub_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Github/EnableGithub_spec.js index e31a75c508..1e73b364e1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Github/EnableGithub_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Github/EnableGithub_spec.js @@ -2,8 +2,8 @@ import adminSettings from "../../../../locators/AdminsSettings"; const commonlocators = require("../../../../locators/commonlocators.json"); import homePage from "../../../../locators/HomePage"; -describe("SSO with Github test functionality", function() { - it("1. Go to admin settings and enable Github with not all mandatory fields filled", function() { +describe("SSO with Github test functionality", function () { + it("1. Go to admin settings and enable Github with not all mandatory fields filled", function () { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); @@ -27,7 +27,7 @@ describe("SSO with Github test functionality", function() { ); }); - it("2. Go to admin settings and enable Github", function() { + it("2. Go to admin settings and enable Github", function () { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); @@ -60,7 +60,7 @@ describe("SSO with Github test functionality", function() { ); }); - it("3. Go to admin settings and disable Github", function() { + it("3. Go to admin settings and disable Github", function () { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Google/EnableGoogle_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Google/EnableGoogle_spec.js index eee356fae2..6067c96daf 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Google/EnableGoogle_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Google/EnableGoogle_spec.js @@ -2,8 +2,8 @@ import adminSettings from "../../../../locators/AdminsSettings"; const commonlocators = require("../../../../locators/commonlocators.json"); import homePage from "../../../../locators/HomePage"; -describe("SSO with Google test functionality", function() { - it("1. Go to admin settings and enable Google with not all mandatory fields filled", function() { +describe("SSO with Google test functionality", function () { + it("1. Go to admin settings and enable Google with not all mandatory fields filled", function () { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); @@ -27,7 +27,7 @@ describe("SSO with Google test functionality", function() { ); }); - it("2. Go to admin settings and enable Google", function() { + it("2. Go to admin settings and enable Google", function () { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); @@ -60,7 +60,7 @@ describe("SSO with Google test functionality", function() { ); }); - it("3. Go to admin settings and disable Google", function() { + it("3. Go to admin settings and disable Google", function () { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Bug_Fixes.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Bug_Fixes.js index c4137779c4..9ca1ce9910 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Bug_Fixes.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Bug_Fixes.js @@ -1,6 +1,6 @@ const dsl = require("../../../../fixtures/Bugs/CheckboxGroupInListWidgetDsl.json"); -describe("Canvas context Property Pane", function() { +describe("Canvas context Property Pane", function () { it("Bug Fix: Unable to delete checkbox child when it is inside list widget #18191", () => { cy.addDsl(dsl); cy.openPropertyPane("checkboxgroupwidget"); @@ -29,9 +29,7 @@ describe("Canvas context Property Pane", function() { "not.exist", ); - cy.get(".t--widget-imagewidget") - .eq(0) - .click(); + cy.get(".t--widget-imagewidget").eq(0).click(); //check if the entities are not expanded cy.get(`[data-guided-tour-id="explorer-entity-Image1"]`).should("exist"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Property_Pane_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Property_Pane_spec.js index 2197d28f15..f2b8e60012 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Property_Pane_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Property_Pane_spec.js @@ -9,7 +9,7 @@ const api1 = "API1"; const agHelper = ObjectsRegistry.AggregateHelper; const ee = ObjectsRegistry.EntityExplorer; -describe("Canvas context Property Pane", function() { +describe("Canvas context Property Pane", function () { before(() => { cy.addDsl(dsl); cy.Createpage(page2); @@ -24,7 +24,7 @@ describe("Canvas context Property Pane", function() { agHelper.RefreshPage(); }); - it("1. Code Editor should have focus while switching between widgets, pages and Editor Panes", function() { + it("1. Code Editor should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlSelector = ".t--property-control-label"; verifyPropertyPaneContext( () => { @@ -37,7 +37,7 @@ describe("Canvas context Property Pane", function() { ); }); - it("2. Action Property controls should have focus while switching between widgets, pages and Editor Panes", function() { + it("2. Action Property controls should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlSelector = ".t--property-control-onclick .t--open-dropdown-Select-Action"; verifyPropertyPaneContext( @@ -51,7 +51,7 @@ describe("Canvas context Property Pane", function() { ); }); - it("3. Toggle Property controls should have focus while switching between widgets, pages and Editor Panes", function() { + it("3. Toggle Property controls should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlSelector = `.t--property-control-animateloading input[type="checkbox"]`; verifyPropertyPaneContext( () => { @@ -64,16 +64,14 @@ describe("Canvas context Property Pane", function() { ); }); - it("4. DropDown Property controls should have focus while switching between widgets, pages and Editor Panes", function() { + it("4. DropDown Property controls should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlClickSelector = `.t--property-control-googlerecaptchaversion div:nth-child(2) .bp3-popover-target div`; const propertyControlVerifySelector = ".t--property-control-googlerecaptchaversion .ur--has-border"; verifyPropertyPaneContext( () => { - cy.get(propertyControlClickSelector) - .eq(0) - .click({ force: true }); + cy.get(propertyControlClickSelector).eq(0).click({ force: true }); }, () => { cy.get(propertyControlVerifySelector).should("be.focused"); @@ -82,7 +80,7 @@ describe("Canvas context Property Pane", function() { ); }); - it("5. Icon Button Property controls should have focus while switching between widgets, pages and Editor Panes", function() { + it("5. Icon Button Property controls should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlClickSelector = `.t--property-control-borderradius div[aria-selected="true"]`; const propertyControlVerifySelector = `.t--property-control-borderradius div[role="tablist"]`; verifyPropertyPaneContext( @@ -97,7 +95,7 @@ describe("Canvas context Property Pane", function() { ); }); - it("6. ColorPicker Property controls should have focus while switching between widgets, pages and Editor Panes", function() { + it("6. ColorPicker Property controls should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlSelector = `.t--property-control-buttoncolor input[type="text"]`; verifyPropertyPaneContext( () => { @@ -111,7 +109,7 @@ describe("Canvas context Property Pane", function() { ); }); - it("7. Property Sections should retain state while switching between widgets, pages and Editor Panes", function() { + it("7. Property Sections should retain state while switching between widgets, pages and Editor Panes", function () { const propertySectionState = { basic: false, general: true, @@ -130,7 +128,7 @@ describe("Canvas context Property Pane", function() { ); }); - it("8. Property Tabs and Sections should retain state while switching between widgets, pages and Editor Panes", function() { + it("8. Property Tabs and Sections should retain state while switching between widgets, pages and Editor Panes", function () { const propertySectionState = { general: true, icon: false, @@ -140,9 +138,7 @@ describe("Canvas context Property Pane", function() { verifyPropertyPaneContext( () => { - cy.get(`.tab-title:contains("STYLE")`) - .eq(0) - .click(); + cy.get(`.tab-title:contains("STYLE")`).eq(0).click(); setPropertyPaneSectionState(propertySectionState); }, () => { @@ -152,7 +148,7 @@ describe("Canvas context Property Pane", function() { ); }); - it("9. Layered PropertyPane - Code Editor should have focus while switching between widgets, pages and Editor Panes", function() { + it("9. Layered PropertyPane - Code Editor should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlSelector = ".t--property-control-computedvalue"; verifyPropertyPaneContext( () => { @@ -169,7 +165,7 @@ describe("Canvas context Property Pane", function() { cy.get(".t--property-pane-title").should("contain", "Table1"); }); - it("10. Layered PropertyPane - Toggle Property controls should have focus while switching between widgets, pages and Editor Panes", function() { + it("10. Layered PropertyPane - Toggle Property controls should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlSelector = `.t--property-control-cellwrapping input[type="checkbox"]`; verifyPropertyPaneContext( () => { @@ -186,7 +182,7 @@ describe("Canvas context Property Pane", function() { cy.get(".t--property-pane-title").should("contain", "Table1"); }); - it("11. Layered PropertyPane - Property Sections should retain state while switching between widgets, pages and Editor Panes", function() { + it("11. Layered PropertyPane - Property Sections should retain state while switching between widgets, pages and Editor Panes", function () { const propertySectionState = { data: false, general: true, @@ -208,7 +204,7 @@ describe("Canvas context Property Pane", function() { cy.get(".t--property-pane-title").should("contain", "Table1"); }); - it("12. Layered PropertyPane - Property Tabs and Sections should retain state while switching between widgets, pages and Editor Panes", function() { + it("12. Layered PropertyPane - Property Tabs and Sections should retain state while switching between widgets, pages and Editor Panes", function () { const propertySectionState = { textformatting: true, color: false, @@ -217,9 +213,7 @@ describe("Canvas context Property Pane", function() { verifyPropertyPaneContext( () => { cy.editColumn("step"); - cy.get(`.tab-title:contains("STYLE")`) - .eq(0) - .click(); + cy.get(`.tab-title:contains("STYLE")`).eq(0).click(); setPropertyPaneSectionState(propertySectionState); }, () => { @@ -232,7 +226,7 @@ describe("Canvas context Property Pane", function() { cy.get(".t--property-pane-title").should("contain", "Table1"); }); - it("13. Multi Layered PropertyPane - Code Editor should have focus while switching between widgets, pages and Editor Panes", function() { + it("13. Multi Layered PropertyPane - Code Editor should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlSelector = ".t--property-control-text"; verifyPropertyPaneContext( () => { @@ -254,7 +248,7 @@ describe("Canvas context Property Pane", function() { cy.get(".t--property-pane-title").should("contain", "Table1"); }); - it("14. Multi Layered PropertyPane - Toggle Property controls should have focus while switching between widgets, pages and Editor Panes", function() { + it("14. Multi Layered PropertyPane - Toggle Property controls should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlSelector = `.t--property-control-visible input[type="checkbox"]`; verifyPropertyPaneContext( () => { @@ -276,7 +270,7 @@ describe("Canvas context Property Pane", function() { cy.get(".t--property-pane-title").should("contain", "Table1"); }); - it("15. Multi Layered PropertyPane - Property Sections should retain state while switching between widgets, pages and Editor Panes", function() { + it("15. Multi Layered PropertyPane - Property Sections should retain state while switching between widgets, pages and Editor Panes", function () { const propertySectionState = { basic: false, general: true, @@ -303,7 +297,7 @@ describe("Canvas context Property Pane", function() { cy.get(".t--property-pane-title").should("contain", "Table1"); }); - it("16. Multi Layered PropertyPane - Property Tabs and Sections should retain state while switching between widgets, pages and Editor Panes", function() { + it("16. Multi Layered PropertyPane - Property Tabs and Sections should retain state while switching between widgets, pages and Editor Panes", function () { const propertySectionState = { icon: true, color: false, @@ -313,9 +307,7 @@ describe("Canvas context Property Pane", function() { () => { cy.editColumn("status"); cy.editColumn("menuIteme63irwbvnd", false); - cy.get(`.tab-title:contains("STYLE")`) - .eq(0) - .click(); + cy.get(`.tab-title:contains("STYLE")`).eq(0).click(); setPropertyPaneSectionState(propertySectionState); }, () => { @@ -379,9 +371,7 @@ function verifyPropertyPaneContext( cy.get(".t--property-pane-title").should("contain", widgetName); if (isStyleTab) { - cy.get(`.tab-title:contains("STYLE")`) - .eq(0) - .click(); + cy.get(`.tab-title:contains("STYLE")`).eq(0).click(); } //Focus Callback diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Selected_Widgets_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Selected_Widgets_spec.js index f550bd6daf..c5efc99270 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Selected_Widgets_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Selected_Widgets_spec.js @@ -10,7 +10,7 @@ const api1 = "API1"; const agHelper = ObjectsRegistry.AggregateHelper; const ee = ObjectsRegistry.EntityExplorer; -describe("Canvas context widget selection", function() { +describe("Canvas context widget selection", function () { before(() => { cy.addDsl(dsl); cy.Createpage(page2); @@ -30,7 +30,7 @@ describe("Canvas context widget selection", function() { }); }); - it("1. Widget should be selected while switching back and forth between pages", function() { + it("1. Widget should be selected while switching back and forth between pages", function () { //select widget in page1 ee.SelectEntityByName("Camera1", "Widgets"); @@ -59,7 +59,7 @@ describe("Canvas context widget selection", function() { cy.isInViewport(`//*[@id="${dsl.dsl.children[0].widgetId}"]`); }); - it("2. Widget should be selected while switching back to page from API pane", function() { + it("2. Widget should be selected while switching back to page from API pane", function () { //select widget in page1 ee.SelectEntityByName("Camera1", "Widgets"); @@ -82,7 +82,7 @@ describe("Canvas context widget selection", function() { //cy.isInViewport(`//*[@id="${dsl.dsl.children[0].widgetId}"]`); }); - it("3. Multiple widgets should be selected while switching back and forth between pages", function() { + it("3. Multiple widgets should be selected while switching back and forth between pages", function () { //select widgets in page1 ee.SelectEntityByName("Camera1", "Widgets", true); ee.SelectEntityByName("Button1", "Widgets", true); @@ -108,7 +108,7 @@ describe("Canvas context widget selection", function() { cy.get(`.t--multi-selection-box`).should("have.length", 1); }); - it("4. Multiple widgets should be selected while switching back to page from API pane", function() { + it("4. Multiple widgets should be selected while switching back to page from API pane", function () { //select widgets in page1 ee.SelectEntityByName("Camera1", "Widgets", true); ee.SelectEntityByName("Button1", "Widgets", true); @@ -129,7 +129,7 @@ describe("Canvas context widget selection", function() { cy.get(`.t--multi-selection-box`).should("have.length", 1); }); - it("5. Modal widget should be selected and open while switching back and forth between pages", function() { + it("5. Modal widget should be selected and open while switching back and forth between pages", function () { //select widget in page1 ee.SelectEntityByName("Modal1", "Widgets"); @@ -154,7 +154,7 @@ describe("Canvas context widget selection", function() { cy.get(".t--property-pane-title").should("contain", "Modal1"); }); - it("6. Modal widget should be selected and open while switching back to page from API pane", function() { + it("6. Modal widget should be selected and open while switching back to page from API pane", function () { //select widget in page1 ee.SelectEntityByName("Modal1", "Widgets"); @@ -175,7 +175,7 @@ describe("Canvas context widget selection", function() { cy.get(".t--property-pane-title").should("contain", "Modal1"); }); - it("7. Widget inside modal should be selected and modal should be open while switching back and forth between pages", function() { + it("7. Widget inside modal should be selected and modal should be open while switching back and forth between pages", function () { //select widget in page1 ee.SelectEntityInModal("Modal1", "Widgets"); @@ -202,7 +202,7 @@ describe("Canvas context widget selection", function() { cy.get(".t--property-pane-title").should("contain", "Text1"); }); - it("8. Widget inside modal should be selected and modal should be open while switching back to page from API pane", function() { + it("8. Widget inside modal should be selected and modal should be open while switching back to page from API pane", function () { //select widget in page1 ee.SelectEntityInModal("Modal1", "Widgets"); @@ -225,7 +225,7 @@ describe("Canvas context widget selection", function() { cy.get(".t--property-pane-title").should("contain", "Text1"); }); - it.skip("9. Widget inside non default tab in tab widget should be selected and the given tab should be open while switching back and forth between pages", function() { + it.skip("9. Widget inside non default tab in tab widget should be selected and the given tab should be open while switching back and forth between pages", function () { //switch to tab 2 and select widget a button inside tab 2 in page1 cy.get(".t--tabid-tab2").click({ force: true }); cy.SearchEntityandOpen("Button4", "Widgets"); @@ -251,7 +251,7 @@ describe("Canvas context widget selection", function() { cy.get(".t--property-pane-title").should("contain", "Button4"); }); - it.skip("10. Widget inside non default tab in tab widget should be selected and the given tab should be open while switching back to page from API pane", function() { + it.skip("10. Widget inside non default tab in tab widget should be selected and the given tab should be open while switching back to page from API pane", function () { //switch to tab 2 and select widget a button inside tab 2 in page1 cy.get(".t--tabid-tab2").click({ force: true }); cy.SearchEntityandOpen("Button4", "Widgets"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Command_Click_Navigation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Command_Click_Navigation_spec.js index 573a4e5fce..bc78db3691 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Command_Click_Navigation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Command_Click_Navigation_spec.js @@ -28,7 +28,7 @@ const JSInput2TestCode = let repoName; -describe("1. CommandClickNavigation", function() { +describe("1. CommandClickNavigation", function () { it("1. Import the test application", () => { homePage.NavigateToHome(); cy.reload(); @@ -185,9 +185,7 @@ describe("1. CommandClickNavigation", function() { }); it.skip("Will work with string arguments in framework functions", () => { - cy.get(PROPERTY_SELECTOR.onClick) - .find(".t--js-toggle") - .click(); + cy.get(PROPERTY_SELECTOR.onClick).find(".t--js-toggle").click(); cy.updateCodeInput( PROPERTY_SELECTOR.onClick, "{{ resetWidget('Input1') }}", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/MaintainContext&Focus_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/MaintainContext&Focus_spec.js index 9f728ed732..be83bda197 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/MaintainContext&Focus_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/MaintainContext&Focus_spec.js @@ -10,7 +10,7 @@ const dataSources = ObjectsRegistry.DataSources; const ee = ObjectsRegistry.EntityExplorer; const apiPage = ObjectsRegistry.ApiPage; -describe("MaintainContext&Focus", function() { +describe("MaintainContext&Focus", function () { it("1. Import the test application", () => { homePage.NavigateToHome(); cy.intercept("GET", "/api/v1/users/features", { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Linting/BasicLint_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Linting/BasicLint_spec.ts index 62698701f1..3d9765a6b5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Linting/BasicLint_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Linting/BasicLint_spec.ts @@ -55,7 +55,7 @@ describe("Linting", () => { ee.NavigateToSwitcher("explorer"); dataSources.CreateDataSource("MySql"); cy.get("@dsName").then(($dsName) => { - dsName = ($dsName as unknown) as string; + dsName = $dsName as unknown as string; }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Linting/ErrorReporting_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Linting/ErrorReporting_spec.ts index 81f53dea54..34fbc8c2e1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Linting/ErrorReporting_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Linting/ErrorReporting_spec.ts @@ -307,11 +307,7 @@ describe("Lint error reporting", () => { const element = isError ? cy.get(locator._lintErrorElement) : cy.get(locator._lintWarningElement); - element - .contains(lintOn) - .should("exist") - .first() - .trigger("mouseover"); + element.contains(lintOn).should("exist").first().trigger("mouseover"); agHelper.AssertContains(debugMsg); } diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/CreateNewApp_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/CreateNewApp_spec.js index f7c9d04720..4dfc9bfe46 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/CreateNewApp_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/CreateNewApp_spec.js @@ -4,8 +4,8 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const homePage = require("../../../../locators/HomePage"); import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Creating new app after discontinuing guided tour should not start the same", function() { - it("1. Creating new app after discontinuing guided tour should not start the same", function() { +describe("Creating new app after discontinuing guided tour should not start the same", function () { + it("1. Creating new app after discontinuing guided tour should not start the same", function () { // Start guided tour _.homePage.NavigateToHome(); cy.get(guidedTourLocators.welcomeTour).click(); @@ -14,9 +14,7 @@ describe("Creating new app after discontinuing guided tour should not start the cy.get(guidedTourLocators.startBuilding).should("be.visible"); // Go back to applications page cy.get(commonlocators.homeIcon).click({ force: true }); - cy.get(homePage.createNewAppButton) - .first() - .click(); + cy.get(homePage.createNewAppButton).first().click(); // Check if explorer is visible, explorer is collapsed initialy in guided tour cy.get(explorerLocators.entityExplorer).should("be.visible"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/FirstTimeUserOnboarding_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/FirstTimeUserOnboarding_spec.js index 9995c27142..03fee50dea 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/FirstTimeUserOnboarding_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/FirstTimeUserOnboarding_spec.js @@ -1,14 +1,14 @@ const OnboardingLocator = require("../../../../locators/FirstTimeUserOnboarding.json"); const _ = require("lodash"); -describe("FirstTimeUserOnboarding", function() { +describe("FirstTimeUserOnboarding", function () { beforeEach(() => { cy.generateUUID().then((uid) => { cy.Signup(`${uid}@appsmithtest.com`, uid); }); }); - it("1. onboarding flow - should check page entity selection in explorer", function() { + it("1. onboarding flow - should check page entity selection in explorer", function () { cy.get(OnboardingLocator.introModal).should("be.visible"); cy.get(OnboardingLocator.introModalBuild).click(); cy.get(OnboardingLocator.introModal).should("not.exist"); @@ -18,7 +18,7 @@ describe("FirstTimeUserOnboarding", function() { cy.get(OnboardingLocator.dropTarget).should("be.visible"); }); - it("2. onboarding flow - should check the checklist page actions", function() { + it("2. onboarding flow - should check the checklist page actions", function () { cy.get(OnboardingLocator.introModalBuild).click(); cy.get(OnboardingLocator.statusbar).click(); @@ -30,9 +30,7 @@ describe("FirstTimeUserOnboarding", function() { cy.get(OnboardingLocator.checklistDatasourceBtn).should("not.be.disabled"); cy.get(OnboardingLocator.checklistDatasourceBtn).click(); cy.get(OnboardingLocator.datasourcePage).should("be.visible"); - cy.get(OnboardingLocator.datasourceMock) - .first() - .click(); + cy.get(OnboardingLocator.datasourceMock).first().click(); cy.wait(1000); cy.get(OnboardingLocator.statusbar).click(); cy.get(OnboardingLocator.checklistStatus).should("contain", "1 of 5"); @@ -80,7 +78,7 @@ describe("FirstTimeUserOnboarding", function() { }); }); - it("3. onboarding flow - should check the tasks page actions", function() { + it("3. onboarding flow - should check the tasks page actions", function () { cy.get(OnboardingLocator.introModalBuild).click(); cy.get(OnboardingLocator.taskDatasourceBtn).should("be.visible"); @@ -89,9 +87,7 @@ describe("FirstTimeUserOnboarding", function() { ); cy.get(OnboardingLocator.taskDatasourceBtn).click(); cy.get(OnboardingLocator.datasourcePage).should("be.visible"); - cy.get(OnboardingLocator.datasourceMock) - .first() - .click(); + cy.get(OnboardingLocator.datasourceMock).first().click(); cy.wait(1000); cy.get(OnboardingLocator.datasourceBackBtn).click(); cy.get(OnboardingLocator.taskDatasourceBtn).should("not.exist"); @@ -102,9 +98,7 @@ describe("FirstTimeUserOnboarding", function() { ); cy.get(OnboardingLocator.taskActionBtn).click(); cy.get(OnboardingLocator.datasourcePage).should("be.visible"); - cy.get(OnboardingLocator.createQuery) - .first() - .click(); + cy.get(OnboardingLocator.createQuery).first().click(); cy.wait(1000); cy.get(OnboardingLocator.statusbar).click(); cy.get(OnboardingLocator.checklistBack).click(); @@ -122,7 +116,7 @@ describe("FirstTimeUserOnboarding", function() { cy.get(OnboardingLocator.taskWidgetBtn).should("not.exist"); }); - it("4. onboarding flow - should check the tasks page datasource action alternate widget action", function() { + it("4. onboarding flow - should check the tasks page datasource action alternate widget action", function () { cy.get(OnboardingLocator.introModalBuild).click(); cy.get(OnboardingLocator.taskDatasourceBtn).should("be.visible"); @@ -133,15 +127,13 @@ describe("FirstTimeUserOnboarding", function() { cy.get(OnboardingLocator.textWidgetName).should("be.visible"); }); - it("5. onboarding flow - should check the tasks page query action alternate widget action", function() { + it("5. onboarding flow - should check the tasks page query action alternate widget action", function () { cy.get(OnboardingLocator.introModalBuild).click(); cy.get(OnboardingLocator.taskDatasourceBtn).should("be.visible"); cy.get(OnboardingLocator.taskDatasourceBtn).click(); cy.get(OnboardingLocator.datasourcePage).should("be.visible"); - cy.get(OnboardingLocator.datasourceMock) - .first() - .click(); + cy.get(OnboardingLocator.datasourceMock).first().click(); cy.wait(1000); cy.get(OnboardingLocator.datasourceBackBtn).click(); @@ -153,16 +145,14 @@ describe("FirstTimeUserOnboarding", function() { cy.get(OnboardingLocator.textWidgetName).should("be.visible"); }); - it("6. onboarding flow - should check directly opening widget pane", function() { + it("6. onboarding flow - should check directly opening widget pane", function () { cy.get(OnboardingLocator.introModalBuild).click(); cy.get(OnboardingLocator.taskDatasourceBtn).should("be.visible"); cy.get(OnboardingLocator.widgetPaneTrigger).click(); cy.get(OnboardingLocator.widgetSidebar).should("be.visible"); cy.get(OnboardingLocator.dropTarget).should("be.visible"); cy.dragAndDropToCanvas("textwidget", { x: 400, y: 400 }); - cy.get(OnboardingLocator.textWidgetName) - .should("be.visible") - .wait(800); + cy.get(OnboardingLocator.textWidgetName).should("be.visible").wait(800); cy.reload(); cy.wait("@getPage").should( "have.nested.property", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/GuidedTour_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/GuidedTour_spec.js index 2932a66ae5..24cec99379 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/GuidedTour_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/GuidedTour_spec.js @@ -4,8 +4,8 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const explorerLocators = require("../../../../locators/explorerlocators.json"); import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Guided Tour", function() { - it("1. Guided tour should work when started from the editor", function() { +describe("Guided Tour", function () { + it("1. Guided tour should work when started from the editor", function () { cy.generateUUID().then((uid) => { cy.Signup(`${uid}@appsmith.com`, uid); }); @@ -14,7 +14,7 @@ describe("Guided Tour", function() { cy.get(onboardingLocators.welcomeTourBtn).should("be.visible"); }); - it("2. Guided Tour", function() { + it("2. Guided Tour", function () { // Start guided tour cy.get(commonlocators.homeIcon).click({ force: true }); cy.get(guidedTourLocators.welcomeTour).click(); @@ -71,9 +71,7 @@ describe("Guided Tour", function() { "Default Value", "{{CustomersTable.selectedRow.email}}", ); - cy.get(".t--entity-name") - .contains("CountryInput") - .click({ force: true }); + cy.get(".t--entity-name").contains("CountryInput").click({ force: true }); cy.wait(1000); cy.get(guidedTourLocators.inputfields) .eq(2) @@ -83,9 +81,7 @@ describe("Guided Tour", function() { "Default Value", "{{CustomersTable.selectedRow.country}}", ); - cy.get(".t--entity-name") - .contains("DisplayImage") - .click({ force: true }); + cy.get(".t--entity-name").contains("DisplayImage").click({ force: true }); cy.get(guidedTourLocators.successButton).click(); // Step 6: Drag and drop a widget cy.dragAndDropToCanvas("buttonwidget", { @@ -116,9 +112,7 @@ describe("Guided Tour", function() { // Step 9: Deploy cy.PublishtheApp(); cy.get(guidedTourLocators.rating).should("be.visible"); - cy.get(guidedTourLocators.rating) - .eq(4) - .click(); + cy.get(guidedTourLocators.rating).eq(4).click(); cy.get(guidedTourLocators.startBuilding).should("be.visible"); cy.get(guidedTourLocators.startBuilding).click(); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Analytics_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Analytics_spec.js index 54b8fc1e75..e9750379c5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Analytics_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Analytics_spec.js @@ -2,8 +2,8 @@ import User from "../../../../fixtures/user.json"; let appId; -describe("Checks for analytics initialization", function() { - it("Should check analytics is not initialised when enableTelemtry is false", function() { +describe("Checks for analytics initialization", function () { + it("Should check analytics is not initialised when enableTelemtry is false", function () { cy.visit("/applications"); cy.reload(); cy.wait(3000); @@ -33,7 +33,7 @@ describe("Checks for analytics initialization", function() { }); }); - it("Should check smartlook is not initialised when enableTelemtry is false", function() { + it("Should check smartlook is not initialised when enableTelemtry is false", function () { cy.visit("/applications"); cy.reload(); cy.wait(3000); @@ -57,7 +57,7 @@ describe("Checks for analytics initialization", function() { }); }); - it("Should check Sentry is not initialised when enableTelemtry is false", function() { + it("Should check Sentry is not initialised when enableTelemtry is false", function () { cy.visit("/applications"); cy.reload(); cy.wait(3000); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ApplicationURL_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ApplicationURL_spec.js index 1259aa6a1d..022ec9234f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ApplicationURL_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ApplicationURL_spec.js @@ -6,18 +6,12 @@ describe("Slug URLs", () => { it("Checks URL redirection from legacy URLs to slug URLs", () => { applicationId = localStorage.getItem("applicationId"); cy.location("pathname").then((pathname) => { - const pageId = pathname - .split("/")[3] - ?.split("-") - .pop(); + const pageId = pathname.split("/")[3]?.split("-").pop(); cy.visit(`/applications/${applicationId}/pages/${pageId}/edit`).then( () => { cy.wait(10000); cy.location("pathname").then((pathname) => { - const pageId = pathname - .split("/")[3] - ?.split("-") - .pop(); + const pageId = pathname.split("/")[3]?.split("-").pop(); const appName = localStorage.getItem("AppName"); expect(pathname).to.be.equal( `/app/${appName}/page1-${pageId}/edit`, @@ -39,10 +33,7 @@ describe("Slug URLs", () => { 200, ); cy.location("pathname").then((pathname) => { - const pageId = pathname - .split("/")[3] - ?.split("-") - .pop(); + const pageId = pathname.split("/")[3]?.split("-").pop(); expect(pathname).to.be.equal(`/app/${appName}/page1-${pageId}/edit`); }); }); @@ -55,9 +46,7 @@ describe("Slug URLs", () => { cy.get(".t--context-menu").click({ force: true }); }); cy.selectAction("Edit Name"); - cy.get(explorer.editEntity) - .last() - .type("Page renamed", { force: true }); + cy.get(explorer.editEntity).last().type("Page renamed", { force: true }); cy.get("body").click(0, 0); cy.wait("@updatePage").should( "have.nested.property", @@ -65,10 +54,7 @@ describe("Slug URLs", () => { 200, ); cy.location("pathname").then((pathname) => { - const pageId = pathname - .split("/")[3] - ?.split("-") - .pop(); + const pageId = pathname.split("/")[3]?.split("-").pop(); expect(pathname).to.be.equal( `/app/${applicationName}/page-renamed-${pageId}/edit`, ); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/DuplicateApplication_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/DuplicateApplication_spec.js index 7dc372f9a5..0ddff0b139 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/DuplicateApplication_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/DuplicateApplication_spec.js @@ -4,12 +4,12 @@ import homePage from "../../../../locators/HomePage"; let duplicateApplicationDsl; let parentApplicationDsl; -describe("Duplicate application", function() { +describe("Duplicate application", function () { before(() => { cy.addDsl(dsl); }); - it("Check whether the duplicate application has the same dsl as the original", function() { + it("Check whether the duplicate application has the same dsl as the original", function () { const appname = localStorage.getItem("AppName"); cy.SearchEntityandOpen("Input1"); cy.intercept("PUT", "/api/v1/layouts/*/pages/*").as("inputUpdate"); @@ -23,12 +23,8 @@ describe("Duplicate application", function() { cy.get(homePage.searchInput).type(appname); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); cy.get(homePage.duplicateApp).click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/DynamicLayout_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/DynamicLayout_spec.js index 880006c100..053ab689fc 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/DynamicLayout_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/DynamicLayout_spec.js @@ -1,22 +1,14 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const pages = require("../../../../locators/Pages.json"); -describe("Dynamic Layout Functionality", function() { - it("Dynamic Layout - Change Layout", function() { - cy.get(commonlocators.layoutControls) - .last() - .click(); - cy.get(commonlocators.canvas) - .invoke("width") - .should("be.eq", 450); +describe("Dynamic Layout Functionality", function () { + it("Dynamic Layout - Change Layout", function () { + cy.get(commonlocators.layoutControls).last().click(); + cy.get(commonlocators.canvas).invoke("width").should("be.eq", 450); }); - it("Dynamic Layout - New Page should have selected Layout", function() { - cy.get(pages.AddPage) - .first() - .click(); + it("Dynamic Layout - New Page should have selected Layout", function () { + cy.get(pages.AddPage).first().click(); - cy.get(commonlocators.canvas) - .invoke("width") - .should("be.eq", 450); + cy.get(commonlocators.canvas).invoke("width").should("be.eq", 450); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ExportApplication_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ExportApplication_spec.js index 4e001dccb3..5e35cf6500 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ExportApplication_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ExportApplication_spec.js @@ -4,7 +4,7 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const commonlocators = require("../../../../locators/commonlocators.json"); let HomePage = ObjectsRegistry.HomePage; -describe("Export application as a JSON file", function() { +describe("Export application as a JSON file", function () { let workspaceId; let appid; let newWorkspaceName; @@ -15,19 +15,15 @@ describe("Export application as a JSON file", function() { cy.wait(5000); }); - it("Check if exporting app flow works as expected", function() { + it("Check if exporting app flow works as expected", function () { cy.get(commonlocators.homeIcon).click({ force: true }); appname = localStorage.getItem("AppName"); cy.get(homePage.searchInput).type(appname); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); cy.get(homePage.exportAppFromMenu).click({ force: true }); cy.get(homePage.toastMessage).should("contain", "Successfully exported"); // fetching the exported app file manually to be verified. @@ -44,7 +40,7 @@ describe("Export application as a JSON file", function() { cy.LogOut(); }); - it("User with admin access,should be able to export the app", function() { + it("User with admin access,should be able to export the app", function () { cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.generateUUID().then((uid) => { workspaceId = uid; @@ -77,27 +73,19 @@ describe("Export application as a JSON file", function() { // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); cy.get(homePage.exportAppFromMenu).should("be.visible"); cy.get("body").click(50, 40); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appEditIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appEditIcon).first().click({ force: true }); cy.get(homePage.applicationName).click({ force: true }); cy.contains("Export Application").should("be.visible"); }); cy.LogOut(); }); - it("User with developer access,should not be able to export the app", function() { + it("User with developer access,should not be able to export the app", function () { cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.generateUUID().then((uid) => { workspaceId = uid; @@ -130,27 +118,19 @@ describe("Export application as a JSON file", function() { // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); cy.get(homePage.exportAppFromMenu).should("not.exist"); cy.get("body").click(50, 40); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appEditIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appEditIcon).first().click({ force: true }); cy.get(homePage.applicationName).click({ force: true }); cy.contains("Export Application").should("not.exist"); }); cy.LogOut(); }); - it("User with viewer access,should not be able to export the app", function() { + it("User with viewer access,should not be able to export the app", function () { cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.generateUUID().then((uid) => { workspaceId = uid; @@ -183,9 +163,7 @@ describe("Export application as a JSON file", function() { // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); + cy.get(homePage.applicationCard).first().trigger("mouseover"); cy.get(homePage.appEditIcon).should("not.exist"); }); cy.LogOut(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ForkApplication_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ForkApplication_spec.js index b652b9ddff..df4936f681 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ForkApplication_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ForkApplication_spec.js @@ -10,12 +10,12 @@ let forkedApplicationDsl; let parentApplicationDsl; let forkableAppUrl; -describe("Fork application across workspaces", function() { +describe("Fork application across workspaces", function () { before(() => { cy.addDsl(dsl); }); - it("Check if the forked application has the same dsl as the original", function() { + it("Check if the forked application has the same dsl as the original", function () { const appname = localStorage.getItem("AppName"); cy.SearchEntityandOpen("Input1"); cy.intercept("PUT", "/api/v1/layouts/*/pages/*").as("inputUpdate"); @@ -29,12 +29,8 @@ describe("Fork application across workspaces", function() { cy.get(homePage.searchInput).type(appname); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); cy.get(homePage.forkAppFromMenu).click({ force: true }); cy.get(homePage.forkAppWorkspaceButton).click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting @@ -54,12 +50,10 @@ describe("Fork application across workspaces", function() { }); }); - it("Non signed user should be able to fork a public forkable app", function() { + it("Non signed user should be able to fork a public forkable app", function () { cy.NavigateToHome(); cy.get(homePage.homeIcon).click(); - cy.get(homePage.optionsIcon) - .first() - .click(); + cy.get(homePage.optionsIcon).first().click(); cy.get(homePage.workspaceImportAppOption).click({ force: true }); cy.get(homePage.workspaceImportAppModal).should("be.visible"); cy.xpath(homePage.uploadLogo).attachFile("forkNonSignedInUser.json"); @@ -74,9 +68,7 @@ describe("Fork application across workspaces", function() { cy.PublishtheApp(); agHelper.Sleep(2000); - cy.get("button:contains('Share')") - .first() - .click({ force: true }); + cy.get("button:contains('Share')").first().click({ force: true }); // agHelper.Sleep(1000); // cy.get("body").then(($ele) => { // if ($ele.find(homePage.enablePublicAccess).length <= 0) { @@ -97,9 +89,7 @@ describe("Fork application across workspaces", function() { //cy.reload(); //cy.visit(forkableAppUrl); cy.wait(4000); - cy.get(applicationLocators.forkButton) - .first() - .click({ force: true }); + cy.get(applicationLocators.forkButton).first().click({ force: true }); cy.get(loginPageLocators.signupLink).click(); cy.generateUUID().then((uid) => { @@ -107,9 +97,7 @@ describe("Fork application across workspaces", function() { cy.get(signupPageLocators.password).type(uid); cy.get(signupPageLocators.submitBtn).click(); cy.wait(10000); - cy.get(applicationLocators.forkButton) - .first() - .click({ force: true }); + cy.get(applicationLocators.forkButton).first().click({ force: true }); cy.get(homePage.forkAppWorkspaceButton).should("be.visible"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/GlobalSearch_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/GlobalSearch_spec.js index 444e1aef0b..ef67ff6099 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/GlobalSearch_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/GlobalSearch_spec.js @@ -5,7 +5,7 @@ const globalSearchLocators = require("../../../../locators/GlobalSearch.json"); const datasourceHomeLocators = require("../../../../locators/apiWidgetslocator.json"); const datasourceLocators = require("../../../../locators/DatasourcesEditor.json"); -describe("GlobalSearch", function() { +describe("GlobalSearch", function () { before(() => { cy.addDsl(dsl); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Inspect_Element_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Inspect_Element_spec.js index 926941b2cb..29fccb41fb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Inspect_Element_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Inspect_Element_spec.js @@ -1,10 +1,10 @@ const dsl = require("../../../../fixtures/debuggerDependencyDsl.json"); -describe("Inspect Entity", function() { +describe("Inspect Entity", function () { before(() => { cy.addDsl(dsl); }); - it("Check whether depedencies and references are shown correctly", function() { + it("Check whether depedencies and references are shown correctly", function () { cy.openPropertyPane("inputwidgetv2"); cy.testJsontext("defaultvalue", "{{Button1.text}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Logs_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Logs_spec.ts index eb7ec2a91a..7cce926639 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Logs_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Logs_spec.ts @@ -21,9 +21,9 @@ const generateTestLogString = () => { return logString; }; -describe("Debugger logs", function() { +describe("Debugger logs", function () { before(() => { - cy.fixture("testdata").then(function(data) { + cy.fixture("testdata").then(function (data) { dataSet = data; }); }); @@ -31,7 +31,7 @@ describe("Debugger logs", function() { logString = generateTestLogString(); }); - it("1. Modifying widget properties should log the same", function() { + it("1. Modifying widget properties should log the same", function () { ee.DragDropWidgetNVerify("buttonwidget", 200, 200); propPane.UpdatePropertyFieldValue("Label", "Test"); debuggerHelper.ClickDebuggerIcon(0, true, 0); @@ -39,10 +39,8 @@ describe("Debugger logs", function() { debuggerHelper.LogStateContains("Test"); }); - it("2. Reset debugger state", function() { - cy.get(".t--property-control-visible") - .find(".t--js-toggle") - .click(); + it("2. Reset debugger state", function () { + cy.get(".t--property-control-visible").find(".t--js-toggle").click(); cy.testJsontext("visible", "Test"); cy.get(commonlocators.homeIcon).click({ force: true }); cy.generateUUID().then((id) => { @@ -51,7 +49,7 @@ describe("Debugger logs", function() { }); }); - it("3. Console log on button click with normal moustache binding", function() { + it("3. Console log on button click with normal moustache binding", function () { ee.DragDropWidgetNVerify("buttonwidget", 200, 200); // Testing with normal log in moustache binding propPane.EnterJSContext("onClick", `{{console.log("${logString}")}}`); @@ -62,7 +60,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(logString); }); - it("4. Console log on button click with arrow function IIFE", function() { + it("4. Console log on button click with arrow function IIFE", function () { debuggerHelper.ClearLogs(); ee.SelectEntityByName("Button1"); // Testing with normal log in iifee @@ -76,7 +74,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(logString); }); - it("5. Console log on button click with function keyword IIFE", function() { + it("5. Console log on button click with function keyword IIFE", function () { debuggerHelper.ClearLogs(); ee.SelectEntityByName("Button1"); // Testing with normal log in iifee @@ -90,7 +88,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(logString); }); - it("6. Console log on button click with async function IIFE", function() { + it("6. Console log on button click with async function IIFE", function () { debuggerHelper.ClearLogs(); // Testing with normal log in iifee ee.SelectEntityByName("Button1"); @@ -104,7 +102,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(logString); }); - it("7. Console log on button click with mixed function IIFE", function() { + it("7. Console log on button click with mixed function IIFE", function () { debuggerHelper.ClearLogs(); // Testing with normal log in iifee ee.SelectEntityByName("Button1"); @@ -121,7 +119,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(logStringChild); }); - it("8. Console log grouping on button click", function() { + it("8. Console log grouping on button click", function () { debuggerHelper.ClearLogs(); // Testing with normal log in iifee ee.SelectEntityByName("Button1"); @@ -140,7 +138,7 @@ describe("Debugger logs", function() { debuggerHelper.Assert_Consecutive_Console_Log_Count(5); }); - it("9. Console log grouping on button click with different log in between", function() { + it("9. Console log grouping on button click with different log in between", function () { debuggerHelper.ClearLogs(); // Testing with normal log in iifee ee.SelectEntityByName("Button1"); @@ -159,7 +157,7 @@ describe("Debugger logs", function() { debuggerHelper.Assert_Consecutive_Console_Log_Count(2); }); - it("10. Console log grouping on button click from different source", function() { + it("10. Console log grouping on button click from different source", function () { debuggerHelper.ClearLogs(); // Testing with normal log in iifee ee.SelectEntityByName("Button1"); @@ -175,7 +173,7 @@ describe("Debugger logs", function() { debuggerHelper.Assert_Consecutive_Console_Log_Count(0); }); - it("11. Console log on text widget with normal moustache binding", function() { + it("11. Console log on text widget with normal moustache binding", function () { ee.DragDropWidgetNVerify("textwidget", 400, 400); propPane.UpdatePropertyFieldValue( "Text", @@ -194,7 +192,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(logString); }); - it("12. Console log in sync function", function() { + it("12. Console log in sync function", function () { ee.NavigateToSwitcher("explorer"); jsEditor.CreateJSObject( `export default { @@ -218,7 +216,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(logString); }); - it("13. Console log in async function", function() { + it("13. Console log in async function", function () { ee.NavigateToSwitcher("explorer"); jsEditor.CreateJSObject( `export default { @@ -257,7 +255,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(logString); }); - it("14. Console log after API succedes", function() { + it("14. Console log after API succedes", function () { ee.NavigateToSwitcher("explorer"); apiPage.CreateAndFillApi(dataSet.baseUrl + dataSet.methods, "Api1"); const returnText = "success"; @@ -289,7 +287,7 @@ describe("Debugger logs", function() { agHelper.WaitUntilAllToastsDisappear(); cy.get("@jsObjName").then((jsObjName) => { - agHelper.Sleep(2000) + agHelper.Sleep(2000); agHelper.GetNClick(jsEditor._runButton); agHelper.GetNClick(jsEditor._logsTab); debuggerHelper.DoesConsoleLogExist(`${logString} Started`); @@ -305,7 +303,7 @@ describe("Debugger logs", function() { }); }); - it("15. Console log after API execution fails", function() { + it("15. Console log after API execution fails", function () { ee.NavigateToSwitcher("explorer"); apiPage.CreateAndFillApi(dataSet.baseUrl + dataSet.methods + "xyz", "Api2"); jsEditor.CreateJSObject( @@ -338,7 +336,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(`${logString} Failed`); }); - it("16. Console log source inside nested function", function() { + it("16. Console log source inside nested function", function () { jsEditor.CreateJSObject( `export default { myFun1: async () => { @@ -363,7 +361,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(`Child ${logString}`); }); - it("17. Console log grouping", function() { + it("17. Console log grouping", function () { jsEditor.CreateJSObject( `export default { myFun1: async () => { @@ -391,7 +389,7 @@ describe("Debugger logs", function() { debuggerHelper.Assert_Consecutive_Console_Log_Count(5); }); - it("18. Console log should not mutate the passed object", function() { + it("18. Console log should not mutate the passed object", function () { ee.NavigateToSwitcher("explorer"); jsEditor.CreateJSObject( `export default { @@ -420,7 +418,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist("end: [0,1,2,3,4]"); }); - it("6. Bug #19115 - Objects that start with an underscore `_JSObject1` fail to be navigated from the debugger", function() { + it("6. Bug #19115 - Objects that start with an underscore `_JSObject1` fail to be navigated from the debugger", function () { const JSOBJECT_WITH_UNNECCESARY_SEMICOLON = `export default { myFun1: () => { //write code here diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Omnibar_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Omnibar_spec.js index 4b315383b6..9170f485f3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Omnibar_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Omnibar_spec.js @@ -13,7 +13,7 @@ describe("Omnibar functionality test cases", () => { cy.addDsl(dsl); }); - it("1. Bug #15104 The Data is not displayed in Omnibar after clicking on learn more link from property pane", function() { + it("1. Bug #15104 The Data is not displayed in Omnibar after clicking on learn more link from property pane", function () { cy.dragAndDropToCanvas("audiowidget", { x: 300, y: 500 }); cy.xpath('//span[text()="Learn more"]').click(); cy.get(locators._omnibarDescription).scrollTo("top"); @@ -21,7 +21,7 @@ describe("Omnibar functionality test cases", () => { cy.get("body").click(0, 0); }); - it("2.Verify omnibar is present across all pages and validate its fields", function() { + it("2.Verify omnibar is present across all pages and validate its fields", function () { cy.get(omnibar.globalSearch) .trigger("mouseover") .should("have.css", "background-color", "rgba(0, 0, 0, 0)"); @@ -56,14 +56,10 @@ describe("Omnibar functionality test cases", () => { cy.get("body").type("{esc}"); }); - it("3. Verify when user clicks on a debugging error, related documentation should open in omnibar", function() { + it("3. Verify when user clicks on a debugging error, related documentation should open in omnibar", function () { // click on debugger icon - cy.get(commonlocators.debugger) - .should("be.visible") - .click({ force: true }); - cy.get(commonlocators.errorTab) - .should("be.visible") - .click({ force: true }); + cy.get(commonlocators.debugger).should("be.visible").click({ force: true }); + cy.get(commonlocators.errorTab).should("be.visible").click({ force: true }); cy.wait(1000); // click on open documention from error tab cy.get(commonlocators.debuggerContextMenu).click({ multiple: true }); @@ -80,62 +76,42 @@ describe("Omnibar functionality test cases", () => { // cy.get(omnibar.globalSearchClose).click(); }); - it("4. Verify Create New section and its data, also create a new api, new js object and new cURL import from omnibar ", function() { + it("4. Verify Create New section and its data, also create a new api, new js object and new cURL import from omnibar ", function () { cy.intercept("POST", "/api/v1/actions").as("createNewApi"); cy.intercept("POST", "/api/v1/collections/actions").as( "createNewJSCollection", ); - cy.get(omnibar.categoryTitle) - .eq(1) - .click(); + cy.get(omnibar.categoryTitle).eq(1).click(); // create new api, js object and cURL import from omnibar - cy.get(omnibar.createNew) - .eq(0) - .should("have.text", "New Blank API"); + cy.get(omnibar.createNew).eq(0).should("have.text", "New Blank API"); // 2 is the index value of the JS Object in omnibar ui - cy.get(omnibar.createNew) - .eq(2) - .should("have.text", "New JS Object"); + cy.get(omnibar.createNew).eq(2).should("have.text", "New JS Object"); // 3 is the index value of the Curl import in omnibar ui - cy.get(omnibar.createNew) - .eq(3) - .should("have.text", "New cURL Import"); - cy.get(omnibar.createNew) - .eq(0) - .click(); + cy.get(omnibar.createNew).eq(3).should("have.text", "New cURL Import"); + cy.get(omnibar.createNew).eq(0).click(); cy.wait(1000); cy.wait("@createNewApi"); cy.renameWithInPane(apiName); cy.get(omnibar.globalSearch).click({ force: true }); - cy.get(omnibar.categoryTitle) - .eq(1) - .click(); + cy.get(omnibar.categoryTitle).eq(1).click(); // 2 is the index value of the JS Object in omnibar ui - cy.get(omnibar.createNew) - .eq(2) - .click(); + cy.get(omnibar.createNew).eq(2).click(); cy.wait(1000); cy.wait("@createNewJSCollection"); cy.wait(1000); - cy.get(".t--js-action-name-edit-field") - .type(jsObjectName) - .wait(1000); + cy.get(".t--js-action-name-edit-field").type(jsObjectName).wait(1000); cy.get(omnibar.globalSearch).click({ force: true }); - cy.get(omnibar.categoryTitle) - .eq(1) - .click(); + cy.get(omnibar.categoryTitle).eq(1).click(); cy.wait(1000); // 3 is the index value of the JS Object in omnibar ui - cy.get(omnibar.createNew) - .eq(3) - .click(); + cy.get(omnibar.createNew).eq(3).click(); cy.wait(1000); cy.url().should("include", "curl-import?"); cy.get('p:contains("Import from CURL")').should("be.visible"); }); - it("5. On an invalid search, discord link should be displayed and on clicking that link, should open discord in new tab", function() { + it("5. On an invalid search, discord link should be displayed and on clicking that link, should open discord in new tab", function () { // typing a random string in search bar cy.get(omnibar.globalSearch).click({ force: true }); cy.wait(1000); @@ -157,17 +133,13 @@ describe("Omnibar functionality test cases", () => { cy.wait(2000); }); - it("6. Verify Navigate section shows recently opened widgets and datasources", function() { + it("6. Verify Navigate section shows recently opened widgets and datasources", function () { cy.get(".bp3-icon-chevron-left").click({ force: true }); cy.openPropertyPane("buttonwidget"); cy.get(omnibar.globalSearch).click({ force: true }); - cy.get(omnibar.categoryTitle) - .eq(0) - .click(); + cy.get(omnibar.categoryTitle).eq(0).click(); // verify recently opened items with their subtext i.e page name - cy.xpath(omnibar.recentlyopenItem) - .eq(0) - .should("have.text", "Page1"); + cy.xpath(omnibar.recentlyopenItem).eq(0).should("have.text", "Page1"); cy.xpath(omnibar.recentlyopenItem) .eq(1) .should("have.text", "Audio1") @@ -190,12 +162,10 @@ describe("Omnibar functionality test cases", () => { .should("have.text", "Page1"); }); - it("7. Verify documentation should open in new tab, on clicking open documentation", function() { + it("7. Verify documentation should open in new tab, on clicking open documentation", function () { //cy.get(omnibar.category).click() cy.get(omnibar.globalSearch).click({ force: true }); - cy.get(omnibar.categoryTitle) - .eq(3) - .click({ force: true }); + cy.get(omnibar.categoryTitle).eq(3).click({ force: true }); cy.get(omnibar.openDocumentationLink) .invoke("removeAttr", "target") .click() diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/PageOnLoad_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/PageOnLoad_spec.ts index 4d3720bcab..7a5188b3d3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/PageOnLoad_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/PageOnLoad_spec.ts @@ -5,11 +5,11 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const debuggerHelper = ObjectsRegistry.DebuggerHelper; -describe("Check debugger logs state when there are onPageLoad actions", function() { +describe("Check debugger logs state when there are onPageLoad actions", function () { before(() => { cy.addDsl(dsl); }); - it("Check debugger logs state when there are onPageLoad actions", function() { + it("Check debugger logs state when there are onPageLoad actions", function () { cy.openPropertyPane("tablewidget"); cy.testJsontext("tabledata", "{{TestApi.data.users}}"); cy.NavigateToAPI_Panel(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/PreviewMode_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/PreviewMode_spec.js index a5847aea9a..fb973b04fd 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/PreviewMode_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/PreviewMode_spec.js @@ -3,34 +3,31 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const publishPage = require("../../../../locators/publishWidgetspage.json"); import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Preview mode functionality", function() { +describe("Preview mode functionality", function () { before(() => { cy.addDsl(dsl); }); - it("checks entity explorer and property pane visiblity", function() { + it("checks entity explorer and property pane visiblity", function () { _.agHelper.GetNClick(_.locators._previewModeToggle("edit")); // in preview mode, entity explorer and property pane are not visible cy.get(".t--entity-explorer").should("not.be.visible"); cy.get(".t--property-pane-sidebar").should("not.be.visible"); }); - it("checks if widgets can be selected or not", function() { + it("checks if widgets can be selected or not", function () { // in preview mode, entity explorer and property pane are not visible // Also, draggable and resizable components are not available. const selector = `.t--draggable-buttonwidget`; cy.wait(500); - cy.get(selector) - .first() - .trigger("mouseover", { force: true }) - .wait(500); + cy.get(selector).first().trigger("mouseover", { force: true }).wait(500); cy.get( `${selector}:first-of-type .t--widget-propertypane-toggle > .t--widget-name`, ).should("not.exist"); }); - it("check invisible widget should not show in proview mode and should show in edit mode", function() { + it("check invisible widget should not show in proview mode and should show in edit mode", function () { _.agHelper.GetNClick(_.locators._previewModeToggle("preview")); cy.openPropertyPane("buttonwidget"); cy.UncheckWidgetProperties(commonlocators.visibleCheckbox); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ProductUpdates_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ProductUpdates_spec.js index 263bfa2083..a4e01207d0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ProductUpdates_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ProductUpdates_spec.js @@ -1,7 +1,7 @@ const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Check for product updates button and modal", function() { - it("Check if we should show the product updates button and it opens the updates modal", function() { +describe("Check for product updates button and modal", function () { + it("Check if we should show the product updates button and it opens the updates modal", function () { cy.get(commonlocators.homeIcon).click({ force: true }); //eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Redirects_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Redirects_spec.js index 8549786ad3..f216433038 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Redirects_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Redirects_spec.js @@ -1,5 +1,5 @@ -describe("Check for redirects associated with auth pages", function() { - it("Should redirect away from auth pages if already logged in", function() { +describe("Check for redirects associated with auth pages", function () { + it("Should redirect away from auth pages if already logged in", function () { const loginPageRoute = "/user/login"; cy.visit(loginPageRoute); // eslint-disable-next-line cypress/no-unnecessary-waiting diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Replay_Editor_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Replay_Editor_spec.js index 796f77ddd8..364f11370f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Replay_Editor_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Replay_Editor_spec.js @@ -5,7 +5,7 @@ const datasourceEditor = require("../../../../locators/DatasourcesEditor.json"); const datasourceFormData = require("../../../../fixtures/datasources.json"); const queryLocators = require("../../../../locators/QueryEditor.json"); -describe("Undo/Redo functionality", function() { +describe("Undo/Redo functionality", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; let postgresDatasourceName; @@ -29,24 +29,20 @@ describe("Undo/Redo functionality", function() { cy.get(datasourceEditor.password).type( datasourceFormData["postgres-password"], ); - cy.get(datasourceEditor.sectionAuthentication) - .trigger("click") - .wait(1000); + cy.get(datasourceEditor.sectionAuthentication).trigger("click").wait(1000); cy.get("body").type(`{${modifierKey}}z`); cy.get( `${datasourceEditor.sectionAuthentication} .bp3-icon-chevron-up`, ).should("exist"); cy.get(".t--application-name").click({ force: true }); - cy.get("li:contains(Edit)") - .eq(1) - .trigger("mouseover"); + cy.get("li:contains(Edit)").eq(1).trigger("mouseover"); cy.get("li:contains(Undo)").click({ multiple: true }); cy.get(datasourceEditor.username).should("be.empty"); cy.get(datasourceEditor.saveBtn).click({ force: true }); }); - it("2. Checks undo/redo for Api pane", function() { + it("2. Checks undo/redo for Api pane", function () { cy.NavigateToAPI_Panel(); cy.log("Navigation to API Panel screen successful"); cy.CreateAPI("FirstAPI"); @@ -88,13 +84,10 @@ describe("Undo/Redo functionality", function() { it("3. Checks undo/redo in query editor", () => { cy.NavigateToActiveDSQueryPane(postgresDatasourceName); cy.get(queryLocators.templateMenu).click(); - cy.get(".CodeMirror textarea") - .first() - .focus() - .type("{{FirstAPI}}", { - force: true, - parseSpecialCharSequences: false, - }); + cy.get(".CodeMirror textarea").first().focus().type("{{FirstAPI}}", { + force: true, + parseSpecialCharSequences: false, + }); cy.get("body").click(0, 0); // verifying Relationships is visible on dynamic binding cy.get(".icon-text") @@ -120,9 +113,7 @@ describe("Undo/Redo functionality", function() { cy.get(".CodeMirror-code").should("have.text", "{{FirstAPI}}"); // undo/redo through app menu cy.get(".t--application-name").click({ force: true }); - cy.get("li:contains(Edit)") - .eq(1) - .trigger("mouseover"); + cy.get("li:contains(Edit)").eq(1).trigger("mouseover"); cy.get("li:contains(Undo)").click({ multiple: true }); cy.get(".CodeMirror-code").should("not.have.text", "{{FirstAPI}}"); }); @@ -145,9 +136,7 @@ describe("Undo/Redo functionality", function() { cy.contains("testJSFunction").should("exist"); // performing undo from app menu cy.get(".t--application-name").click({ force: true }); - cy.get("li:contains(Edit)") - .eq(1) - .trigger("mouseover"); + cy.get("li:contains(Edit)").eq(1).trigger("mouseover"); cy.get("li:contains(Undo)").click({ multiple: true }); // cy.get(".function-name").should("not.contain.text", "test"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Replay_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Replay_spec.js index 493dde7f49..25c15440a4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Replay_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Replay_spec.js @@ -5,14 +5,14 @@ const explorer = require("../../../../locators/explorerlocators.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../fixtures/replay.json"); -describe("Undo/Redo functionality", function() { +describe("Undo/Redo functionality", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; before(() => { cy.addDsl(dsl); }); - it("checks undo/redo for new widgets", function() { + it("checks undo/redo for new widgets", function () { cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas("checkboxwidget", { x: 200, y: 200 }); @@ -74,7 +74,7 @@ describe("Undo/Redo functionality", function() { // }); // }); - it("checks undo/redo for toggle control in property pane", function() { + it("checks undo/redo for toggle control in property pane", function () { cy.openPropertyPane("checkboxwidget"); cy.CheckWidgetProperties(commonlocators.disableCheckbox); @@ -92,7 +92,7 @@ describe("Undo/Redo functionality", function() { cy.get(widgetLocators.checkboxWidget + " " + "input").should("be.disabled"); }); - it("checks undo/redo for input control in property pane", function() { + it("checks undo/redo for input control in property pane", function () { cy.get(widgetsPage.inputLabelControl).type("1"); cy.get(widgetsPage.inputLabelControl).contains("Label1"); @@ -107,7 +107,7 @@ describe("Undo/Redo functionality", function() { cy.get(`${publish.checkboxWidget} label`).should("have.text", "Label1"); }); - it("checks undo/redo for deletion of widgets", function() { + it("checks undo/redo for deletion of widgets", function () { cy.deleteWidget(widgetsPage.checkboxWidget); cy.get(widgetsPage.checkboxWidget).should("not.exist"); @@ -120,7 +120,7 @@ describe("Undo/Redo functionality", function() { // cy.get(widgetsPage.checkboxWidget).should("not.exist"); }); - it("checks if property Pane is open on undo/redo property changes", function() { + it("checks if property Pane is open on undo/redo property changes", function () { cy.dragAndDropToCanvas("textwidget", { x: 400, y: 400 }); cy.wait(100); @@ -142,35 +142,25 @@ describe("Undo/Redo functionality", function() { cy.deleteWidget(widgetsPage.textWidget); }); - it("checks if toast is shown while undo/redo widget deletion or creation only the first time", function() { + it("checks if toast is shown while undo/redo widget deletion or creation only the first time", function () { cy.dragAndDropToCanvas("textwidget", { x: 400, y: 400 }); localStorage.removeItem("undoToastShown"); localStorage.removeItem("redoToastShown"); cy.focused().blur(); cy.get("body").type(`{${modifierKey}}z`); - cy.get(commonlocators.toastmsg) - .eq(0) - .contains("is removed"); - cy.get(commonlocators.toastmsg) - .eq(1) - .contains("REDO"); - cy.get(commonlocators.toastBody) - .first() - .click(); + cy.get(commonlocators.toastmsg).eq(0).contains("is removed"); + cy.get(commonlocators.toastmsg).eq(1).contains("REDO"); + cy.get(commonlocators.toastBody).first().click(); cy.wait(100); cy.get("body").type(`{${modifierKey}}{shift}z`); - cy.get(commonlocators.toastmsg) - .eq(0) - .contains("is added back"); - cy.get(commonlocators.toastmsg) - .eq(1) - .contains("UNDO"); + cy.get(commonlocators.toastmsg).eq(0).contains("is added back"); + cy.get(commonlocators.toastmsg).eq(1).contains("UNDO"); cy.deleteWidget(widgetsPage.textWidget); }); - it("checks undo/redo for color picker", function() { + it("checks undo/redo for color picker", function () { cy.dragAndDropToCanvas("textwidget", { x: 100, y: 100 }); cy.moveToStyleTab(); cy.selectColor("textcolor"); @@ -180,9 +170,7 @@ describe("Undo/Redo functionality", function() { cy.wait("@updateLayout"); cy.readTextDataValidateCSS("color", "rgb(126, 34, 206)"); - cy.get("body") - .click({ force: true }) - .type(`{${modifierKey}}z`); + cy.get("body").click({ force: true }).type(`{${modifierKey}}z`); cy.get(widgetsPage.textColor) .first() .invoke("attr", "value") @@ -196,16 +184,12 @@ describe("Undo/Redo functionality", function() { .should("contain", "#7e22ce"); }); - it("checks undo/redo for option control for radio button", function() { + it("checks undo/redo for option control for radio button", function () { cy.dragAndDropToCanvas("radiogroupwidget", { x: 200, y: 600 }); - cy.get(widgetsPage.RadioInput) - .first() - .type("1"); + cy.get(widgetsPage.RadioInput).first().type("1"); - cy.get(widgetsPage.RadioInput) - .first() - .blur(); + cy.get(widgetsPage.RadioInput).first().blur(); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(200); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Resize_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Resize_spec.js index 5253bc47b1..46e21e9ae7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Resize_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Resize_spec.js @@ -1,11 +1,11 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const dsl = require("../../../../fixtures/CanvasResizeDsl.json"); -describe("Canvas Resize", function() { +describe("Canvas Resize", function () { before(() => { cy.addDsl(dsl); }); - it("Deleting bottom widget should resize canvas", function() { + it("Deleting bottom widget should resize canvas", function () { const InitHeight = "2950px"; cy.get(commonlocators.dropTarget).should("have.css", "height", InitHeight); cy.openPropertyPane("textwidget"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/TriggerErrors_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/TriggerErrors_spec.ts index 9f8a1b73ae..06dd5e1f3e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/TriggerErrors_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/TriggerErrors_spec.ts @@ -2,17 +2,15 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const dsl = require("../../../../fixtures/debuggerTableDsl.json"); const debuggerHelper = ObjectsRegistry.DebuggerHelper; -describe("Trigger errors in the debugger", function() { +describe("Trigger errors in the debugger", function () { before(() => { cy.addDsl(dsl); }); - it("Trigger errors need to be shown in the errors tab", function() { + it("Trigger errors need to be shown in the errors tab", function () { cy.openPropertyPane("tablewidget"); cy.testJsontext("tabledata", `[{"name": 1}, {"name": 2}]`); cy.focused().blur(); - cy.get(".t--property-control-onrowselected") - .find(".t--js-toggle") - .click(); + cy.get(".t--property-control-onrowselected").find(".t--js-toggle").click(); cy.EnableAllCodeEditors(); cy.testJsontext("onrowselected", "{{console.logs('test')}}"); // Click on a row of the table widget diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Unique_key_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Unique_key_spec.js index 37b1943ebc..fd65e68485 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Unique_key_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Unique_key_spec.js @@ -9,7 +9,7 @@ const agHelper = ObjectsRegistry.AggregateHelper; // Since we cannot test the root cause as it does not show up on the DOM, we are testing the sideEffects // the root cause is when widget has same keys, which are not visible in DOM but confuses React when the list is modified. // please refer to issue, https://github.com/appsmithorg/appsmith/issues/7415 for more details. -describe("Unique react keys", function() { +describe("Unique react keys", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -19,7 +19,7 @@ describe("Unique react keys", function() { cy.addDsl(dsl); }); - it("Should not create duplicate versions of widget on drop from explorer", function() { + it("Should not create duplicate versions of widget on drop from explorer", function () { cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas("chartwidget", { x: 200, y: 200 }); cy.dragAndDropToCanvas("selectwidget", { x: 200, y: 600 }); @@ -31,7 +31,7 @@ describe("Unique react keys", function() { cy.get(widgetsPage.selectwidget).should("have.length", 2); }); - it("Should not create duplicate versions of widget on widget copy", function() { + it("Should not create duplicate versions of widget on widget copy", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas("chartwidget", { x: 200, y: 200 }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/UpdateApplication_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/UpdateApplication_spec.js index 1aa024de88..465f9b5317 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/UpdateApplication_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/UpdateApplication_spec.js @@ -18,12 +18,8 @@ describe("Update Application", () => { // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); cy.get(homePage.applicationName).type(`${appname} updated` + "{enter}"); cy.wait("@updateApplication").should( "have.nested.property", @@ -34,9 +30,7 @@ describe("Update Application", () => { }); it("Open the application menu and update icon and then check whether update is reflected in the application card", () => { - cy.get(homePage.applicationIconSelector) - .first() - .click(); + cy.get(homePage.applicationIconSelector).first().click(); cy.wait("@updateApplication") .then((xhr) => { iconname = xhr.response.body.data.icon; @@ -45,9 +39,7 @@ describe("Update Application", () => { cy.get(homePage.applicationCard) .first() .within(() => { - cy.get("a") - .invoke("attr", "name") - .should("equal", iconname); + cy.get("a").invoke("attr", "name").should("equal", iconname); }); }); @@ -57,12 +49,8 @@ describe("Update Application", () => { cy.get(homePage.searchInput).type(appname); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appEditIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appEditIcon).first().click({ force: true }); cy.get("#loading").should("not.exist"); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); @@ -89,12 +77,8 @@ describe("Update Application", () => { // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); cy.get(homePage.applicationName).type(veryLongAppName + "{enter}"); cy.get(homePage.appsContainer).click({ force: true }); cy.wait("@updateApplication").should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ViewMode_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ViewMode_spec.js index aceee97879..a37ac59367 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ViewMode_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ViewMode_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/previewMode.json"); const BASE_URL = Cypress.config().baseUrl; -describe("Preview mode functionality", function() { +describe("Preview mode functionality", function () { before(() => { cy.addDsl(dsl); }); - it("on click of apps on header, it should take to application home page", function() { + it("on click of apps on header, it should take to application home page", function () { cy.PublishtheApp(); cy.get(".t--back-to-home").click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Widget_Error_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Widget_Error_spec.js index a568c70879..71207cec2c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Widget_Error_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Widget_Error_spec.js @@ -3,19 +3,17 @@ const widgetLocators = require("../../../../locators/Widgets.json"); import * as _ from "../../../../support/Objects/ObjectsCore"; import { WIDGET } from "../../../../locators/WidgetLocators"; -describe("Widget error state", function() { +describe("Widget error state", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; before(() => { cy.addDsl(dsl); }); - it("1. Check widget error state", function() { + it("1. Check widget error state", function () { cy.openPropertyPane("buttonwidget"); - cy.get(".t--property-control-visible") - .find(".t--js-toggle") - .click(); + cy.get(".t--property-control-visible").find(".t--js-toggle").click(); cy.EnableAllCodeEditors(); cy.testJsontext("visible", "Test"); @@ -23,18 +21,16 @@ describe("Widget error state", function() { cy.contains(".t--widget-error-count", 1); }); - it("2. Check if the current value is shown in the debugger", function() { + it("2. Check if the current value is shown in the debugger", function () { _.debuggerHelper.ClickDebuggerIcon(); cy.contains(".react-tabs__tab", "Errors").click(); //This feature is disabled in updated error log - epic 17720 // _.debuggerHelper.LogStateContains("Test"); }); - it("3. Switch to error tab when clicked on the debug button", function() { + it("3. Switch to error tab when clicked on the debug button", function () { cy.get("[data-cy=t--tab-LOGS_TAB]").click(); - cy.get(".t--property-control-onclick") - .find(".t--js-toggle") - .click(); + cy.get(".t--property-control-onclick").find(".t--js-toggle").click(); cy.EnableAllCodeEditors(); cy.testJsontext("onclick", "{{testApi.run()}}"); cy.get(widgetLocators.buttonWidget).click(); @@ -43,12 +39,12 @@ describe("Widget error state", function() { cy.contains(".react-tabs__tab--selected", "Errors"); }); - it("4. All errors should be expanded by default", function() { + it("4. All errors should be expanded by default", function () { //Updated count to 1 as the decision not to show triggerexecution/uncaughtpromise error in - epic 17720 _.debuggerHelper.AssertVisibleErrorMessagesCount(1); }); - it("5. Recent errors are shown at the top of the list", function() { + it("5. Recent errors are shown at the top of the list", function () { cy.testJsontext("label", "{{[]}}"); //This feature is disabled in updated error log - epic 17720 // _.debuggerHelper.LogStateContains("text", 0); @@ -60,14 +56,14 @@ describe("Widget error state", function() { // _.debuggerHelper.AssertContextMenuItemVisible(); // }); - it("7. Undoing widget deletion should show errors if present", function() { + it("7. Undoing widget deletion should show errors if present", function () { cy.deleteWidget(); _.debuggerHelper.AssertVisibleErrorMessagesCount(0); cy.get("body").type(`{${modifierKey}}z`); _.debuggerHelper.AssertVisibleErrorMessagesCount(2); }); - it("8. Bug-2760: Error log on a widget property not clearing out when the widget property is deleted", function() { + it("8. Bug-2760: Error log on a widget property not clearing out when the widget property is deleted", function () { _.entityExplorer.DragDropWidgetNVerify(WIDGET.TABLE, 150, 300); _.entityExplorer.SelectEntityByName("Table1", "Widgets"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PeekOverlay/PeekOverlay_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PeekOverlay/PeekOverlay_Spec.ts index 96a6de5c07..f62faa7dbf 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PeekOverlay/PeekOverlay_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PeekOverlay/PeekOverlay_Spec.ts @@ -2,13 +2,13 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; describe("peek overlay", () => { it("main test", () => { - cy.fixture("datasources").then((datasourceFormData : any) => { - _.entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 500, 100); - _.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]); - _.apiPage.RunAPI(); - _.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]); - _.jsEditor.CreateJSObject( - `export default { + cy.fixture("datasources").then((datasourceFormData: any) => { + _.entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 500, 100); + _.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]); + _.apiPage.RunAPI(); + _.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]); + _.jsEditor.CreateJSObject( + `export default { numArray: [1, 2, 3], objectArray: [ {x: 123}, { y: "123"} ], objectData: { x: 123, y: "123" }, @@ -26,101 +26,101 @@ describe("peek overlay", () => { return Api1.run() } }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - lineNumber: 0, - prettify: true, - }, - ); - _.jsEditor.SelectFunctionDropdown("myFun2"); - _.jsEditor.RunJSObj(); - _.agHelper.Sleep(); + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + lineNumber: 0, + prettify: true, + }, + ); + _.jsEditor.SelectFunctionDropdown("myFun2"); + _.jsEditor.RunJSObj(); + _.agHelper.Sleep(); - // check number array - _.peekOverlay.HoverCode("JSObject1.numArray"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("array"); - _.peekOverlay.CheckPrimitveArrayInOverlay([1, 2, 3]); - _.peekOverlay.ResetHover(); + // check number array + _.peekOverlay.HoverCode("JSObject1.numArray"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("array"); + _.peekOverlay.CheckPrimitveArrayInOverlay([1, 2, 3]); + _.peekOverlay.ResetHover(); - // check basic object - _.peekOverlay.HoverCode("JSObject1.objectData"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("object"); - _.peekOverlay.CheckBasicObjectInOverlay({ x: 123, y: "123" }); - _.peekOverlay.ResetHover(); + // check basic object + _.peekOverlay.HoverCode("JSObject1.objectData"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("object"); + _.peekOverlay.CheckBasicObjectInOverlay({ x: 123, y: "123" }); + _.peekOverlay.ResetHover(); - // check null - with this keyword - _.peekOverlay.HoverCode("JSObject1.nullData"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("null"); - _.peekOverlay.CheckPrimitiveValue("null"); - _.peekOverlay.ResetHover(); + // check null - with this keyword + _.peekOverlay.HoverCode("JSObject1.nullData"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("null"); + _.peekOverlay.CheckPrimitiveValue("null"); + _.peekOverlay.ResetHover(); - // check number - _.peekOverlay.HoverCode("JSObject1.numberData"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("number"); - _.peekOverlay.CheckPrimitiveValue("1"); - _.peekOverlay.ResetHover(); + // check number + _.peekOverlay.HoverCode("JSObject1.numberData"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("number"); + _.peekOverlay.CheckPrimitiveValue("1"); + _.peekOverlay.ResetHover(); - // check undefined - _.peekOverlay.HoverCode("Api2.data"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("undefined"); - _.peekOverlay.CheckPrimitiveValue("undefined"); - _.peekOverlay.ResetHover(); + // check undefined + _.peekOverlay.HoverCode("Api2.data"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("undefined"); + _.peekOverlay.CheckPrimitiveValue("undefined"); + _.peekOverlay.ResetHover(); - // check boolean - _.peekOverlay.HoverCode("Api1.isLoading"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("boolean"); - _.peekOverlay.CheckPrimitiveValue("false"); - _.peekOverlay.ResetHover(); + // check boolean + _.peekOverlay.HoverCode("Api1.isLoading"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("boolean"); + _.peekOverlay.CheckPrimitiveValue("false"); + _.peekOverlay.ResetHover(); - // TODO: handle this function failure on CI tests -> "function(){}" - // check function - // _.peekOverlay.HoverCode("Api1.run"); - // _.peekOverlay.IsOverlayOpen(); - // _.peekOverlay.VerifyDataType("function"); - // _.peekOverlay.CheckPrimitiveValue("function () {}"); - // _.peekOverlay.ResetHover(); + // TODO: handle this function failure on CI tests -> "function(){}" + // check function + // _.peekOverlay.HoverCode("Api1.run"); + // _.peekOverlay.IsOverlayOpen(); + // _.peekOverlay.VerifyDataType("function"); + // _.peekOverlay.CheckPrimitiveValue("function () {}"); + // _.peekOverlay.ResetHover(); - // check string - _.peekOverlay.HoverCode("appsmith.mode"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("string"); - _.peekOverlay.CheckPrimitiveValue("EDIT"); - _.peekOverlay.ResetHover(); + // check string + _.peekOverlay.HoverCode("appsmith.mode"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("string"); + _.peekOverlay.CheckPrimitiveValue("EDIT"); + _.peekOverlay.ResetHover(); - // check if overlay closes - _.peekOverlay.HoverCode("appsmith.store"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.ResetHover(); - _.peekOverlay.IsOverlayOpen(false); + // check if overlay closes + _.peekOverlay.HoverCode("appsmith.store"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.ResetHover(); + _.peekOverlay.IsOverlayOpen(false); - // widget object - _.peekOverlay.HoverCode("Table1"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("object"); - _.peekOverlay.ResetHover(); + // widget object + _.peekOverlay.HoverCode("Table1"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("object"); + _.peekOverlay.ResetHover(); - // widget property - _.peekOverlay.HoverCode("Table1.pageNo"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("number"); - _.peekOverlay.CheckPrimitiveValue("1"); - _.peekOverlay.ResetHover(); + // widget property + _.peekOverlay.HoverCode("Table1.pageNo"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("number"); + _.peekOverlay.CheckPrimitiveValue("1"); + _.peekOverlay.ResetHover(); - // widget property - _.peekOverlay.HoverCode("Table1.tableData"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("array"); - _.peekOverlay.CheckObjectArrayInOverlay([{}, {}, {}]); - _.peekOverlay.ResetHover(); + // widget property + _.peekOverlay.HoverCode("Table1.tableData"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("array"); + _.peekOverlay.CheckObjectArrayInOverlay([{}, {}, {}]); + _.peekOverlay.ResetHover(); }); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPaneCTA_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPaneCTA_spec.js index ea0356579b..ce855d8246 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPaneCTA_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPaneCTA_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../fixtures/TextTabledsl.json"); -describe("Property pane CTA to add an action", function() { +describe("Property pane CTA to add an action", function () { before(() => { cy.addDsl(dsl); }); - it("Check if CTA is shown when there is no action", function() { + it("Check if CTA is shown when there is no action", function () { cy.openPropertyPane("tablewidget"); cy.get(".t--propertypane-connect-cta") @@ -13,7 +13,7 @@ describe("Property pane CTA to add an action", function() { .should("be.visible"); }); - it("Check if CTA does not exist when there is an action", function() { + it("Check if CTA does not exist when there is an action", function () { cy.NavigateToAPI_Panel(); cy.CreateAPI("FirstAPI"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPaneJsEnabledVisible_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPaneJsEnabledVisible_spec.js index 94ca062476..fe86b71f8b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPaneJsEnabledVisible_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPaneJsEnabledVisible_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../fixtures/jsonFormDslWithSchema.json"); -describe("Property pane js enabled field", function() { +describe("Property pane js enabled field", function () { before(() => { cy.addDsl(dsl); }); - it("Ensure text is visible for js enabled field when a section is collapsed by default", function() { + it("Ensure text is visible for js enabled field when a section is collapsed by default", function () { cy.openPropertyPane("jsonformwidget"); cy.moveToStyleTab(); cy.wait(500); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPane_Connections_Error_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPane_Connections_Error_spec.js index 049d34a597..6ddb46ed7c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPane_Connections_Error_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPane_Connections_Error_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../fixtures/TextTabledsl.json"); -describe("Property pane connections error state", function() { +describe("Property pane connections error state", function () { before(() => { cy.addDsl(dsl); }); - it("Check if the connection shows an error state when a connection has an error", function() { + it("Check if the connection shows an error state when a connection has an error", function () { cy.openPropertyPane("tablewidget"); cy.testJsontext("tabledata", "{{error}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPane_Search_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPane_Search_spec.ts index 515c126dfb..baed5c7945 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPane_Search_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPane_Search_spec.ts @@ -4,14 +4,14 @@ const agHelper = ObjectsRegistry.AggregateHelper, ee = ObjectsRegistry.EntityExplorer, propPane = ObjectsRegistry.PropertyPane; -describe("Property Pane Search", function() { +describe("Property Pane Search", function () { before(() => { cy.fixture("swtchTableV2Dsl").then((val: any) => { agHelper.AddDsl(val); }); }); - it("1. Verify if the search Input is getting focused when a widget is selected", function() { + it("1. Verify if the search Input is getting focused when a widget is selected", function () { ee.SelectEntityByName("Table1", "Widgets"); // Initially the search input will only be soft focused @@ -38,7 +38,7 @@ describe("Property Pane Search", function() { agHelper.AssertElementFocus(propPane._propertyPaneSearchInputWrapper); }); - it("2. Search for Properties", function() { + it("2. Search for Properties", function () { // Search for a property inside content tab propPane.Search("visible"); propPane.AssertIfPropertyOrSectionExists("general", "CONTENT", "visible"); @@ -60,7 +60,7 @@ describe("Property Pane Search", function() { propPane.AssertIfPropertyOrSectionExists("sorting", "CONTENT", "onsort"); }); - it("3. Search for Sections", function() { + it("3. Search for Sections", function () { // Search for a section inside content tab propPane.Search("general"); propPane.AssertIfPropertyOrSectionExists("general", "CONTENT"); @@ -73,7 +73,7 @@ describe("Property Pane Search", function() { propPane.Search(""); }); - it("4. Search for Properties inside a panel", function() { + it("4. Search for Properties inside a panel", function () { propPane.OpenTableColumnSettings("name"); // Search for a property inside content tab @@ -85,7 +85,7 @@ describe("Property Pane Search", function() { propPane.AssertIfPropertyOrSectionExists("color", "STYLE", "textcolor"); }); - it("5. Search for Sections inside a panel", function() { + it("5. Search for Sections inside a panel", function () { // Search for a section inside content tab propPane.Search("DATA"); propPane.AssertIfPropertyOrSectionExists("data", "CONTENT"); @@ -95,7 +95,7 @@ describe("Property Pane Search", function() { propPane.AssertIfPropertyOrSectionExists("color", "STYLE"); }); - it("6. Search for gibberish and verify if empty results message is shown", function() { + it("6. Search for gibberish and verify if empty results message is shown", function () { // Searching Gibberish inside a panel propPane.Search("pigglywiggly"); agHelper.AssertElementExist(propPane._propertyPaneEmptySearchResult); @@ -106,7 +106,7 @@ describe("Property Pane Search", function() { agHelper.AssertElementExist(propPane._propertyPaneEmptySearchResult); }); - it("7. Verify behaviour with Dynamically hidden properties inside search results", function() { + it("7. Verify behaviour with Dynamically hidden properties inside search results", function () { // Search for a Section with Dynamically hidden properties propPane.Search("pagination"); propPane.AssertIfPropertyOrSectionExists("pagination", "CONTENT"); @@ -125,7 +125,7 @@ describe("Property Pane Search", function() { agHelper.AssertElementAbsence(".t--property-control-onpagechange"); }); - it("8. Verify the search works even if the section is collapsed initially", function() { + it("8. Verify the search works even if the section is collapsed initially", function () { ee.SelectEntityByName("Switch1", "Widgets"); // Collapse All the sections both in CONTENT and STYLE tabs propPane.ToggleSection("label"); @@ -153,7 +153,7 @@ describe("Property Pane Search", function() { ); }); - it("9. Verify the search input clears when another widget is selected", function() { + it("9. Verify the search input clears when another widget is selected", function () { propPane.Search("visible"); propPane.AssertSearchInputValue("visible"); @@ -162,7 +162,7 @@ describe("Property Pane Search", function() { }); // Ensuring a bug won't come back - it("10. Verify searching for properties inside the same section one after the other works", function() { + it("10. Verify searching for properties inside the same section one after the other works", function () { // Search for a property propPane.Search("onsort"); propPane.AssertIfPropertyOrSectionExists("sorting", "CONTENT", "onsort"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Refactoring/Refactoring_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Refactoring/Refactoring_spec.ts index dbe8201883..65f660fe45 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Refactoring/Refactoring_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Refactoring/Refactoring_spec.ts @@ -37,17 +37,20 @@ describe("Validate JS Object Refactoring does not affect the comments & variable }); it("1. Selecting paintings table from MySQL DS", () => { - cy.fixture("datasources").then((datasourceFormData : any) => { - //Initialize new JSObject with custom code - _.jsEditor.CreateJSObject(jsCode); - //Initialize new Query entity with custom query - _.entityExplorer.CreateNewDsQuery(dsName); - _.agHelper.RenameWithInPane(refactorInput.query.oldName); - _.agHelper.GetNClick(_.dataSources._templateMenu); - _.dataSources.EnterQuery(query); - //Initialize new API entity with custom header - _.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"], refactorInput.api.oldName); - _.apiPage.EnterHeader("key1", `{{\tJSObject1.myVar1}}`); + cy.fixture("datasources").then((datasourceFormData: any) => { + //Initialize new JSObject with custom code + _.jsEditor.CreateJSObject(jsCode); + //Initialize new Query entity with custom query + _.entityExplorer.CreateNewDsQuery(dsName); + _.agHelper.RenameWithInPane(refactorInput.query.oldName); + _.agHelper.GetNClick(_.dataSources._templateMenu); + _.dataSources.EnterQuery(query); + //Initialize new API entity with custom header + _.apiPage.CreateAndFillApi( + datasourceFormData["mockApiUrl"], + refactorInput.api.oldName, + ); + _.apiPage.EnterHeader("key1", `{{\tJSObject1.myVar1}}`); }); }); @@ -170,7 +173,8 @@ describe("Validate JS Object Refactoring does not affect the comments & variable _.entityExplorer.ActionContextMenuByEntityName( "JSObject1Renamed", "Delete", - "Are you sure?", true + "Are you sure?", + true, ); _.entityExplorer.ActionContextMenuByEntityName( "RefactorAPIRenamed", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/ForkTemplateToGitConnectedApp.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/ForkTemplateToGitConnectedApp.js index a7d67e1205..96a7b22941 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/ForkTemplateToGitConnectedApp.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/ForkTemplateToGitConnectedApp.js @@ -23,7 +23,7 @@ describe("Fork a template to the current app", () => { _.agHelper.Sleep(2000); }); - it("1.Bug #17002 Forking a template into an existing app which is connected to git makes the application go into a bad state ", function() { + it("1.Bug #17002 Forking a template into an existing app which is connected to git makes the application go into a bad state ", function () { cy.get(template.startFromTemplateCard).click(); cy.wait("@fetchTemplate", { timeout: 30000 }).should( "have.nested.property", @@ -60,7 +60,7 @@ describe("Fork a template to the current app", () => { cy.commitAndPush(); }); - it("2. Bug #17262 On forking template to a child branch of git connected app is throwing Page not found error ", function() { + it("2. Bug #17262 On forking template to a child branch of git connected app is throwing Page not found error ", function () { _.gitSync.CreateGitBranch(branchName, true); cy.get("@gitbranchName").then((branName) => { branchName = branName; @@ -69,14 +69,9 @@ describe("Fork a template to the current app", () => { cy.get(template.templateDialogBox).should("be.visible"); cy.xpath("//div[text()='Marketing Dashboard']").click(); cy.wait(10000); // for templates page to load fully - cy.xpath(template.selectAllPages) - .next() - .click(); + cy.xpath(template.selectAllPages).next().click(); cy.wait(1000); - cy.xpath("//span[text()='SEND MESSAGES']") - .parent() - .next() - .click(); + cy.xpath("//span[text()='SEND MESSAGES']").parent().next().click(); // [Bug]: On forking selected pages from a template, resource not found error is shown #17270 cy.get(template.templateViewForkButton).click(); cy.wait(5000); @@ -88,16 +83,10 @@ describe("Fork a template to the current app", () => { cy.CheckAndUnfoldEntityItem("Queries/JS"); cy.get(`.t--entity-name:contains(${jsObject})`).should("have.length", 1); cy.NavigateToHome(); - cy.get(homePage.searchInput) - .clear() - .type(newWorkspaceName); + cy.get(homePage.searchInput).clear().type(newWorkspaceName); cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appEditIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appEditIcon).first().click({ force: true }); cy.wait(5000); cy.switchGitBranch(branchName); cy.get(homePage.publishButton).click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_Existing_app_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_Existing_app_spec.js index 503bd12b06..c7e55ad571 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_Existing_app_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_Existing_app_spec.js @@ -62,13 +62,8 @@ describe("Fork a template to the current app from new page popover", () => { "response.body.responseMeta.status", 200, ); - cy.xpath(template.selectAllPages) - .next() - .click(); - cy.xpath("//span[text()='CALENDAR MOBILE']") - .parent() - .next() - .click(); + cy.xpath(template.selectAllPages).next().click(); + cy.xpath("//span[text()='CALENDAR MOBILE']").parent().next().click(); cy.get(template.templateViewForkButton).click(); cy.wait("@fetchTemplate").should( "have.nested.property", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_To_App_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_To_App_spec.js index 885f2b6ad3..dcfcb7cf5a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_To_App_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_To_App_spec.js @@ -87,14 +87,9 @@ describe("Fork a template to the current app", () => { "response.body.responseMeta.status", 200, ); - cy.xpath(template.selectAllPages) - .next() - .click(); + cy.xpath(template.selectAllPages).next().click(); cy.wait(1000); - cy.xpath("//span[text()='2 APPLICATION UPLOAD']") - .parent() - .next() - .click(); + cy.xpath("//span[text()='2 APPLICATION UPLOAD']").parent().next().click(); // [Bug]: On forking selected pages from a template, resource not found error is shown #17270 cy.get(template.templateViewForkButton).click(); cy.wait("@fetchTemplate").should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_spec.js index 936a537b91..b8f16dacd4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_spec.js @@ -27,9 +27,7 @@ describe("Fork a template to an workspace", () => { it("2. Update query param on opening fork modal in template detailed view", () => { cy.NavigateToHome(); cy.get(templateLocators.templatesTab).click(); - cy.get(templateLocators.templateCard) - .first() - .click(); + cy.get(templateLocators.templateCard).first().click(); AggregateHelper.CheckForErrorToast("INTERNAL_SERVER_ERROR"); cy.get(templateLocators.templateViewForkButton).click(); cy.location().should((location) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Basic_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Basic_spec.js index 48bd350156..da81c15caf 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Basic_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Basic_spec.js @@ -10,7 +10,7 @@ const ee = ObjectsRegistry.EntityExplorer, const containerShadowElement = `${widgetsPage.containerWidget} [data-testid^="container-wrapper-"]`; -describe("App Theming funtionality", function() { +describe("App Theming funtionality", function () { before(() => { cy.addDsl(dsl); }); @@ -27,15 +27,13 @@ describe("App Theming funtionality", function() { let themesDeletebtn = (sectionName, themeName) => themesSection(sectionName, themeName) + "/following-sibling::button"; - it("1. Checks if theme can be changed to one of the existing themes", function() { + it("1. Checks if theme can be changed to one of the existing themes", function () { appSettings.OpenAppSettings(); appSettings.GoToThemeSettings(); cy.get(commonlocators.changeThemeBtn).click({ force: true }); // select a theme - cy.get(commonlocators.themeCard) - .last() - .click({ force: true }); + cy.get(commonlocators.themeCard).last().click({ force: true }); // check for alert cy.get(`${commonlocators.themeCard}`) @@ -60,7 +58,7 @@ describe("App Theming funtionality", function() { }); }); - it("2. Checks if theme can be edited", function() { + it("2. Checks if theme can be edited", function () { cy.get(commonlocators.selectThemeBackBtn).click({ force: true }); appSettings.ClosePane(); @@ -69,9 +67,7 @@ describe("App Theming funtionality", function() { cy.dragAndDropToCanvas("buttonwidget", { x: 200, y: 200 }); cy.dragAndDropToCanvas("containerwidget", { x: 200, y: 50 }); cy.assertPageSave(); - cy.get("canvas") - .first(0) - .trigger("click", { force: true }); + cy.get("canvas").first(0).trigger("click", { force: true }); appSettings.OpenAppSettings(); appSettings.GoToThemeSettings(); @@ -85,9 +81,7 @@ describe("App Theming funtionality", function() { // .wait(500); // change app border radius - cy.get(commonlocators.themeAppBorderRadiusBtn) - .eq(1) - .click({ force: true }); + cy.get(commonlocators.themeAppBorderRadiusBtn).eq(1).click({ force: true }); // check if border radius is changed on button cy.get(commonlocators.themeAppBorderRadiusBtn) @@ -113,9 +107,7 @@ describe("App Theming funtionality", function() { //cy.contains("Color").click({ force: true }); //Change the primary color: - cy.get(widgetsPage.colorPickerV2Popover) - .click({ force: true }) - .click(); + cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); cy.get(widgetsPage.colorPickerV2Color) .eq(-3) .then(($elem) => { @@ -128,13 +120,9 @@ describe("App Theming funtionality", function() { }); //Change the background color: - cy.get(".border-2") - .last() - .click({ force: true }); + cy.get(".border-2").last().click({ force: true }); cy.wait(500); - cy.get(widgetsPage.colorPickerV2Popover) - .click({ force: true }) - .click(); + cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); cy.get(widgetsPage.colorPickerV2Color) .first() .then(($elem) => { @@ -147,9 +135,7 @@ describe("App Theming funtionality", function() { }); // Change the shadow - cy.get(commonlocators.themeAppBoxShadowBtn) - .eq(3) - .click({ force: true }); + cy.get(commonlocators.themeAppBoxShadowBtn).eq(3).click({ force: true }); cy.get(commonlocators.themeAppBoxShadowBtn) .eq(3) .invoke("css", "box-shadow") @@ -175,10 +161,7 @@ describe("App Theming funtionality", function() { cy.get(widgetsPage.widgetBtn).should( "have.css", "font-family", - $childElem - .children() - .last() - .text(), + $childElem.children().last().text(), ); }); }); @@ -218,9 +201,7 @@ describe("App Theming funtionality", function() { cy.get(explorer.widgetSwitchId).click(); cy.dragAndDropToCanvas("iconbuttonwidget", { x: 200, y: 300 }); cy.assertPageSave(); - cy.get("canvas") - .first(0) - .trigger("click", { force: true }); + cy.get("canvas").first(0).trigger("click", { force: true }); appSettings.OpenAppSettings(); appSettings.GoToThemeSettings(); @@ -239,18 +220,12 @@ describe("App Theming funtionality", function() { cy.get(widgetsPage.iconWidgetBtn).should( "have.css", "font-family", - $childElem - .children() - .last() - .text(), + $childElem.children().last().text(), ); cy.get(widgetsPage.widgetBtn).should( "have.css", "font-family", - $childElem - .children() - .last() - .text(), + $childElem.children().last().text(), ); }); }); @@ -262,9 +237,7 @@ describe("App Theming funtionality", function() { // cy.contains("Color") // .click({ force: true }) // .wait(200); - cy.get(widgetsPage.colorPickerV2Popover) - .click({ force: true }) - .click(); + cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); cy.get(widgetsPage.colorPickerV2Color) .eq(-15) .then(($elem) => { @@ -282,13 +255,9 @@ describe("App Theming funtionality", function() { }); //Change the background color: - cy.get(".border-2") - .last() - .click({ force: true }); + cy.get(".border-2").last().click({ force: true }); cy.wait(500); - cy.get(widgetsPage.colorPickerV2Popover) - .click({ force: true }) - .click(); + cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); cy.get(widgetsPage.colorPickerV2TailwindColor) .eq(23) .then(($elem) => { @@ -306,9 +275,7 @@ describe("App Theming funtionality", function() { // cy.contains("Border") // .click({ force: true }) // .wait(200); - cy.get(commonlocators.themeAppBorderRadiusBtn) - .eq(2) - .click({ force: true }); + cy.get(commonlocators.themeAppBorderRadiusBtn).eq(2).click({ force: true }); cy.get(`${commonlocators.themeAppBorderRadiusBtn}`) .eq(2) .invoke("css", "border-top-left-radius") @@ -328,9 +295,7 @@ describe("App Theming funtionality", function() { //#endregion //#region Change the shadow & verify widgets - cy.get(commonlocators.themeAppBoxShadowBtn) - .eq(3) - .click({ force: true }); + cy.get(commonlocators.themeAppBoxShadowBtn).eq(3).click({ force: true }); cy.get(commonlocators.themeAppBoxShadowBtn) .eq(3) .invoke("css", "box-shadow") @@ -385,9 +350,7 @@ describe("App Theming funtionality", function() { cy.get("input[placeholder='My theme']").type("testtheme"); cy.contains("Name must be unique"); - cy.get("input[placeholder='My theme']") - .clear() - .type("VioletYellowTheme"); + cy.get("input[placeholder='My theme']").clear().type("VioletYellowTheme"); //Click on save theme button cy.xpath("//span[text()='Save theme']/parent::a").click({ force: true }); @@ -781,9 +744,7 @@ describe("App Theming funtionality", function() { .closest("div") .should("have.css", "font-family", "Montserrat"); //Font - cy.get(publish.backToEditor) - .click({ force: true }) - .wait(3000); + cy.get(publish.backToEditor).click({ force: true }).wait(3000); }); it("9. Verify Adding new Individual widgets & it can change Color, Border radius, Shadow & can revert [Color/Border Radius] to already selected theme", () => { @@ -792,9 +753,7 @@ describe("App Theming funtionality", function() { cy.assertPageSave(); cy.moveToStyleTab(); //Change Color & verify - cy.get(widgetsPage.colorPickerV2Popover) - .click({ force: true }) - .click(); + cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); cy.get(widgetsPage.colorPickerV2TailwindColor) .eq(33) .then(($elem) => { @@ -914,9 +873,7 @@ describe("App Theming funtionality", function() { "none", ); - cy.get(publish.backToEditor) - .click({ force: true }) - .wait(1000); + cy.get(publish.backToEditor).click({ force: true }).wait(1000); //Resetting back to theme ee.NavigateToSwitcher("explorer"); @@ -1020,15 +977,11 @@ describe("App Theming funtionality", function() { .closest("div") .should("have.css", "font-family", "Montserrat"); //Font - cy.get(publish.backToEditor) - .click({ force: true }) - .wait(2000); + cy.get(publish.backToEditor).click({ force: true }).wait(2000); }); it("10. Verify Chainging theme should not affect Individual widgets with changed Color, Border radius, Shadow & can revert to newly selected theme", () => { - cy.get("canvas") - .first(0) - .trigger("click", { force: true }); + cy.get("canvas").first(0).trigger("click", { force: true }); appSettings.OpenAppSettings(); appSettings.GoToThemeSettings(); @@ -1047,9 +1000,7 @@ describe("App Theming funtionality", function() { cy.moveToStyleTab(); //Change Color & verify - cy.get(widgetsPage.colorPickerV2Popover) - .click({ force: true }) - .click(); + cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); cy.get(widgetsPage.colorPickerV2TailwindColor) .eq(13) .then(($elem) => { @@ -1074,9 +1025,7 @@ describe("App Theming funtionality", function() { //Change Border & verify - cy.get(".t--button-group-0\\.375rem") - .click() - .wait(500); + cy.get(".t--button-group-0\\.375rem").click().wait(500); cy.get(".t--button-group-0\\.375rem div") .eq(0) .invoke("css", "border-top-left-radius") @@ -1099,9 +1048,7 @@ describe("App Theming funtionality", function() { }); //Change Shadow & verify - cy.get(".t--button-group-0.1px") - .click() - .wait(500); + cy.get(".t--button-group-0.1px").click().wait(500); cy.get(".t--button-group-0.1px div") .invoke("css", "box-shadow") .then((boxshadow) => { @@ -1174,9 +1121,7 @@ describe("App Theming funtionality", function() { "rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px", ); - cy.get(publish.backToEditor) - .click({ force: true }) - .wait(1000); + cy.get(publish.backToEditor).click({ force: true }).wait(1000); //Resetting back to theme ee.NavigateToSwitcher("explorer"); @@ -1282,8 +1227,6 @@ describe("App Theming funtionality", function() { .closest("div") .should("have.css", "font-family", "Rubik"); //Font - cy.get(publish.backToEditor) - .click({ force: true }) - .wait(1000); + cy.get(publish.backToEditor).click({ force: true }).wait(1000); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/ThemeReset_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/ThemeReset_spec.js index dc5a8f3eac..21ac2ad34f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/ThemeReset_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/ThemeReset_spec.js @@ -5,8 +5,8 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const appSettings = ObjectsRegistry.AppSettings; -describe("Theme validation usecases", function() { - it("Drag and drop button widget, change value and check reset flow", function() { +describe("Theme validation usecases", function () { + it("Drag and drop button widget, change value and check reset flow", function () { // drop button widget cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas("buttonwidget", { x: 300, y: 300 }); @@ -16,10 +16,7 @@ describe("Theme validation usecases", function() { cy.openPropertyPane("buttonwidget"); cy.moveToStyleTab(); // change color to red - cy.get(widgetsPage.buttonColor) - .click({ force: true }) - .clear() - .type("red"); + cy.get(widgetsPage.buttonColor).click({ force: true }).clear().type("red"); // click on canvas to see the theming pane cy.get("#canvas-selection-0").click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_Default_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_Default_spec.js index 0e3fb0bb03..a35c352c51 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_Default_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_Default_spec.js @@ -10,15 +10,13 @@ const appSettings = ObjectsRegistry.AppSettings; let themeBackgroudColor; -describe("Theme validation for default data", function() { - it("Drag and drop form widget and validate Default color/font/shadow/border and list of font validation", function() { +describe("Theme validation for default data", function () { + it("Drag and drop form widget and validate Default color/font/shadow/border and list of font validation", function () { cy.log("Login Successful"); cy.reload(); // To remove the rename tooltip cy.get(explorer.addWidget).click(); cy.get(commonlocators.entityExplorersearch).should("be.visible"); - cy.get(commonlocators.entityExplorersearch) - .clear() - .type("form"); + cy.get(commonlocators.entityExplorersearch).clear().type("form"); cy.dragAndDropToCanvas("formwidget", { x: 300, y: 80 }); cy.wait("@updateLayout").should( "have.nested.property", @@ -70,7 +68,7 @@ describe("Theme validation for default data", function() { appSettings.ClosePane(); }); - it("Validate Default Theme change across application", function() { + it("Validate Default Theme change across application", function () { cy.get(formWidgetsPage.formD).click(); cy.widgetText( "FormTest", @@ -78,12 +76,8 @@ describe("Theme validation for default data", function() { widgetsPage.widgetNameSpan, ); cy.moveToStyleTab(); - cy.get(widgetsPage.backgroundcolorPickerNew) - .first() - .click({ force: true }); - cy.get("[style='background-color: rgb(21, 128, 61);']") - .last() - .click(); + cy.get(widgetsPage.backgroundcolorPickerNew).first().click({ force: true }); + cy.get("[style='background-color: rgb(21, 128, 61);']").last().click(); cy.wait(2000); cy.get(formWidgetsPage.formD) .should("have.css", "background-color") @@ -108,7 +102,7 @@ describe("Theme validation for default data", function() { }); }); - it("Publish the App and validate Default Theme across the app", function() { + it("Publish the App and validate Default Theme across the app", function () { cy.PublishtheApp(); cy.get(".bp3-button:contains('Submit')") .invoke("css", "background-color") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_FormWidget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_FormWidget_spec.js index 4fe1b5452d..f736c78c2e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_FormWidget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_FormWidget_spec.js @@ -11,15 +11,13 @@ const appSettings = ObjectsRegistry.AppSettings; let themeBackgroudColor; let themeFont; -describe("Theme validation usecases", function() { - it("1. Drag and drop form widget and validate Default font and list of font validation", function() { +describe("Theme validation usecases", function () { + it("1. Drag and drop form widget and validate Default font and list of font validation", function () { cy.log("Login Successful"); cy.reload(); // To remove the rename tooltip cy.get(explorer.addWidget).click(); cy.get(commonlocators.entityExplorersearch).should("be.visible"); - cy.get(commonlocators.entityExplorersearch) - .clear() - .type("form"); + cy.get(commonlocators.entityExplorersearch).clear().type("form"); cy.dragAndDropToCanvas("formwidget", { x: 300, y: 80 }); cy.wait("@updateLayout").should( "have.nested.property", @@ -38,9 +36,7 @@ describe("Theme validation usecases", function() { cy.borderMouseover(0, "none"); cy.borderMouseover(1, "M"); cy.borderMouseover(2, "L"); - cy.get(themelocator.border) - .eq(2) - .click({ force: true }); + cy.get(themelocator.border).eq(2).click({ force: true }); cy.wait("@updateTheme").should( "have.nested.property", "response.body.responseMeta.status", @@ -55,9 +51,7 @@ describe("Theme validation usecases", function() { cy.shadowMouseover(1, "S"); cy.shadowMouseover(2, "M"); cy.shadowMouseover(3, "L"); - cy.get(themelocator.shadow) - .eq(3) - .click({ force: true }); + cy.get(themelocator.shadow).eq(3).click({ force: true }); cy.wait("@updateTheme").should( "have.nested.property", "response.body.responseMeta.status", @@ -70,7 +64,7 @@ describe("Theme validation usecases", function() { cy.get("span[name='expand-more']").then(($elem) => { cy.get($elem).click({ force: true }); cy.wait(250); - cy.fixture("fontData").then(function(testdata) { + cy.fixture("fontData").then(function (testdata) { this.testdata = testdata; }); @@ -86,15 +80,9 @@ describe("Theme validation usecases", function() { cy.get(".t--draggable-buttonwidget button :contains('Sub')").should( "have.css", "font-family", - $childElem - .children() - .last() - .text(), + $childElem.children().last().text(), ); - themeFont = $childElem - .children() - .last() - .text(); + themeFont = $childElem.children().last().text(); }); }); cy.contains("Font").click({ force: true }); @@ -117,30 +105,22 @@ describe("Theme validation usecases", function() { cy.get(themelocator.inputColor).should("have.value", "red"); cy.wait(2000); - cy.get(themelocator.inputColor) - .eq(0) - .click({ force: true }); + cy.get(themelocator.inputColor).eq(0).click({ force: true }); cy.get(themelocator.inputColor).click({ force: true }); - cy.get('[data-testid="color-picker"]') - .first() - .click({ force: true }); - cy.get("[style='background-color: rgb(21, 128, 61);']") - .last() - .click(); + cy.get('[data-testid="color-picker"]').first().click({ force: true }); + cy.get("[style='background-color: rgb(21, 128, 61);']").last().click(); cy.wait(2000); cy.get(themelocator.inputColor).should("have.value", "#15803d"); cy.get(themelocator.inputColor).clear({ force: true }); cy.wait(2000); - cy.get(themelocator.inputColor) - .click() - .type("Black"); + cy.get(themelocator.inputColor).click().type("Black"); cy.get(themelocator.inputColor).should("have.value", "Black"); cy.wait(2000); cy.contains("Color").click({ force: true }); appSettings.ClosePane(); }); - it("2. Publish the App and validate Font across the app", function() { + it("2. Publish the App and validate Font across the app", function () { cy.PublishtheApp(); cy.get(".bp3-button:contains('Sub')").should( "have.css", @@ -164,7 +144,7 @@ describe("Theme validation usecases", function() { ); }); - it("3. Validate Default Theme change across application", function() { + it("3. Validate Default Theme change across application", function () { cy.goToEditFromPublish(); cy.get(formWidgetsPage.formD).click(); cy.widgetText( @@ -173,12 +153,8 @@ describe("Theme validation usecases", function() { widgetsPage.widgetNameSpan, ); cy.moveToStyleTab(); - cy.get(widgetsPage.backgroundcolorPickerNew) - .first() - .click({ force: true }); - cy.get("[style='background-color: rgb(21, 128, 61);']") - .last() - .click(); + cy.get(widgetsPage.backgroundcolorPickerNew).first().click({ force: true }); + cy.get("[style='background-color: rgb(21, 128, 61);']").last().click(); cy.wait(2000); cy.get(formWidgetsPage.formD) .should("have.css", "background-color") @@ -205,7 +181,7 @@ describe("Theme validation usecases", function() { }); }); - it("4. Publish the App and validate Default Theme across the app", function() { + it("4. Publish the App and validate Default Theme across the app", function () { cy.PublishtheApp(); /* Bug Form backgroud colour reset in Publish mode cy.get(formWidgetsPage.formD) @@ -225,7 +201,7 @@ describe("Theme validation usecases", function() { }); }); - it("5. Validate Theme change across application", function() { + it("5. Validate Theme change across application", function () { cy.goToEditFromPublish(); cy.get(formWidgetsPage.formD).click(); cy.widgetText( @@ -234,12 +210,8 @@ describe("Theme validation usecases", function() { widgetsPage.widgetNameSpan, ); cy.moveToStyleTab(); - cy.get(widgetsPage.backgroundcolorPickerNew) - .first() - .click({ force: true }); - cy.get("[style='background-color: rgb(21, 128, 61);']") - .last() - .click(); + cy.get(widgetsPage.backgroundcolorPickerNew).first().click({ force: true }); + cy.get("[style='background-color: rgb(21, 128, 61);']").last().click(); cy.wait(2000); cy.get(formWidgetsPage.formD) .should("have.css", "background-color") @@ -252,9 +224,7 @@ describe("Theme validation usecases", function() { //Change the Theme cy.get(commonlocators.changeThemeBtn).click({ force: true }); // select a theme - cy.get(commonlocators.themeCard) - .last() - .click({ force: true }); + cy.get(commonlocators.themeCard).last().click({ force: true }); // check for alert cy.get(`${commonlocators.themeCard}`) @@ -306,19 +276,15 @@ describe("Theme validation usecases", function() { widgetsPage.widgetNameSpan, ); cy.moveToStyleTab(); - cy.get(widgetsPage.backgroundcolorPickerNew) - .first() - .click({ force: true }); - cy.get("[style='background-color: rgb(126, 34, 206);']") - .first() - .click(); + cy.get(widgetsPage.backgroundcolorPickerNew).first().click({ force: true }); + cy.get("[style='background-color: rgb(126, 34, 206);']").first().click(); cy.wait(2000); cy.get(formWidgetsPage.formD) .should("have.css", "background-color") .and("eq", "rgb(126, 34, 206)"); }); - it("6. Publish the App and validate Theme across the app", function() { + it("6. Publish the App and validate Theme across the app", function () { cy.PublishtheApp(); //Bug Form backgroud colour reset in Publish mode cy.get(formWidgetsPage.formD) diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_MultiSelectWidget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_MultiSelectWidget_spec.js index 4e56d4bea8..8d24662d59 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_MultiSelectWidget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_MultiSelectWidget_spec.js @@ -10,8 +10,8 @@ let propPane = ObjectsRegistry.PropertyPane, ee = ObjectsRegistry.EntityExplorer, appSettings = ObjectsRegistry.AppSettings; -describe("Theme validation usecase for multi-select widget", function() { - it("1. Drag and drop multi-select widget and validate Default font and list of font validation + Bug 15007", function() { +describe("Theme validation usecase for multi-select widget", function () { + it("1. Drag and drop multi-select widget and validate Default font and list of font validation + Bug 15007", function () { //cy.reload(); // To remove the rename tooltip ee.DragDropWidgetNVerify("multiselectwidgetv2", 300, 80); cy.get(themelocator.canvas).click({ force: true }); @@ -25,9 +25,7 @@ describe("Theme validation usecase for multi-select widget", function() { cy.borderMouseover(0, "none"); cy.borderMouseover(1, "M"); cy.borderMouseover(2, "L"); - cy.get(themelocator.border) - .eq(1) - .click({ force: true }); + cy.get(themelocator.border).eq(1).click({ force: true }); cy.wait("@updateTheme").should( "have.nested.property", "response.body.responseMeta.status", @@ -43,9 +41,7 @@ describe("Theme validation usecase for multi-select widget", function() { cy.shadowMouseover(1, "S"); cy.shadowMouseover(2, "M"); cy.shadowMouseover(3, "L"); - cy.get(themelocator.shadow) - .eq(3) - .click({ force: true }); + cy.get(themelocator.shadow).eq(3).click({ force: true }); cy.wait("@updateTheme").should( "have.nested.property", "response.body.responseMeta.status", @@ -58,7 +54,7 @@ describe("Theme validation usecase for multi-select widget", function() { cy.get("span[name='expand-more']").then(($elem) => { cy.get($elem).click({ force: true }); cy.wait(250); - cy.fixture("fontData").then(function(testdata) { + cy.fixture("fontData").then(function (testdata) { this.testdata = testdata; }); @@ -74,15 +70,9 @@ describe("Theme validation usecase for multi-select widget", function() { cy.get(".t--draggable-multiselectwidgetv2:contains('more')").should( "have.css", "font-family", - $childElem - .children() - .last() - .text(), + $childElem.children().last().text(), ); - themeFont = $childElem - .children() - .last() - .text(); + themeFont = $childElem.children().last().text(); }); }); cy.contains("Font").click({ force: true }); @@ -100,7 +90,7 @@ describe("Theme validation usecase for multi-select widget", function() { appSettings.ClosePane(); }); - it.skip("2. Publish the App and validate Font across the app + Bug 15007", function() { + it.skip("2. Publish the App and validate Font across the app + Bug 15007", function () { //Skipping due to mentioned bug cy.PublishtheApp(); cy.get(".rc-select-selection-item > .rc-select-selection-item-content") @@ -122,7 +112,7 @@ describe("Theme validation usecase for multi-select widget", function() { cy.goToEditFromPublish(); }); - it("3. Validate current theme feature", function() { + it("3. Validate current theme feature", function () { cy.get("#canvas-selection-0").click({ force: true }); appSettings.OpenAppSettings(); appSettings.GoToThemeSettings(); @@ -145,7 +135,7 @@ describe("Theme validation usecase for multi-select widget", function() { }); }); - it("4. Publish the App and validate change of Theme across the app in publish mode", function() { + it("4. Publish the App and validate change of Theme across the app in publish mode", function () { cy.PublishtheApp(); cy.get(".rc-select-selection-item > .rc-select-selection-item-content") .first() diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/VisualTests/AppPageLayout_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/VisualTests/AppPageLayout_spec.js index 8c09243f10..bc10d3805c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/VisualTests/AppPageLayout_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/VisualTests/AppPageLayout_spec.js @@ -11,9 +11,7 @@ describe("Visual regression tests", () => { cy.visit("/applications"); cy.wait(3000); cy.get(".t--applications-container .createnew").should("be.visible"); - cy.get(".t--applications-container .createnew") - .first() - .click(); + cy.get(".t--applications-container .createnew").first().click(); cy.wait(3000); // taking screenshot of app home page in edit mode cy.get("#root").matchImageSnapshot("apppage"); @@ -54,16 +52,10 @@ describe("Visual regression tests", () => { cy.wait(500); // validating all the fields on login page cy.xpath("//h1").should("have.text", "Sign in"); - cy.get(".bp3-label") - .first() - .should("have.text", "Email "); - cy.get(".bp3-label") - .last() - .should("have.text", "Password "); + cy.get(".bp3-label").first().should("have.text", "Email "); + cy.get(".bp3-label").last().should("have.text", "Password "); cy.xpath('//span[text()="sign in"]').should("be.visible"); - cy.get(".bp3-label") - .first() - .click(); + cy.get(".bp3-label").first().click(); cy.matchImageSnapshot("loginpage"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/VisualTests/JSEditorIndent_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/VisualTests/JSEditorIndent_spec.js index de222f8c38..c611d0d31d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/VisualTests/JSEditorIndent_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/VisualTests/JSEditorIndent_spec.js @@ -319,9 +319,7 @@ myFun2: async () => { agHelper.GetNClick("[name='expand-more']", 1, true, 100); cy.get("div.CodeMirror").matchImageSnapshot("jsObjBeforePrettify4"); - cy.get("div.CodeMirror") - .type("{shift+cmd+p}") - .wait(1000); + cy.get("div.CodeMirror").type("{shift+cmd+p}").wait(1000); cy.get("div.CodeMirror").matchImageSnapshot("jsObjAfterPrettify4"); // taking a snap after clicking inside the editor to make sure prettify has not reverted diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Audio/AudioRecorder_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Audio/AudioRecorder_spec.js index 0c7d06fc20..5b4162a8fa 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Audio/AudioRecorder_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Audio/AudioRecorder_spec.js @@ -19,16 +19,12 @@ describe("AudioRecorder Widget", () => { // Check if isDirty is false for the first time cy.get(".t--widget-textwidget").should("contain", "false"); // Interact with UI - cy.get(`.t--widget-${widgetName} button`) - .first() - .click(); + cy.get(`.t--widget-${widgetName} button`).first().click(); cy.get(`.t--widget-${widgetName} .status`) .should("have.text", "Press to start recording") .should("exist"); // Start recording and recorder for 3 seconds - cy.get(`.t--widget-${widgetName} button`) - .first() - .click(); + cy.get(`.t--widget-${widgetName} button`).first().click(); cy.wait(3000); // Stop recording cy.get(`.t--widget-${widgetName} button span.bp3-icon-symbol-square`) diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Audio/audio_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Audio/audio_spec.js index 124b19b1ba..df7e3131d5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Audio/audio_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Audio/audio_spec.js @@ -3,12 +3,12 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/audioWidgetDsl.json"); const testdata = require("../../../../../fixtures/testdata.json"); -describe("Audio Widget Functionality", function() { +describe("Audio Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Audio Widget play functionality validation", function() { + it("Audio Widget play functionality validation", function () { cy.openPropertyPane("audiowidget"); cy.widgetText( "Audio1", @@ -26,7 +26,7 @@ describe("Audio Widget Functionality", function() { ); }); - it("Audio widget pause functionality validation", function() { + it("Audio widget pause functionality validation", function () { cy.get(commonlocators.onPause).click(); cy.selectShowMsg(); cy.addSuccessMessage("Pause success"); @@ -38,11 +38,9 @@ describe("Audio Widget Functionality", function() { ); }); - it("Update audio url and check play and pause functionality validation", function() { + it("Update audio url and check play and pause functionality validation", function () { cy.testCodeMirror(testdata.audioUrl); - cy.get(".CodeMirror textarea") - .first() - .blur(); + cy.get(".CodeMirror textarea").first().blur(); cy.get(widgetsPage.autoPlay).click({ force: true }); cy.wait("@updateLayout").should( "have.nested.property", @@ -57,7 +55,7 @@ describe("Audio Widget Functionality", function() { ); }); - it("Checks if audio widget is reset on button click", function() { + it("Checks if audio widget is reset on button click", function () { cy.dragAndDropToCanvas("buttonwidget", { x: 300, y: 300 }); cy.openPropertyPane("buttonwidget"); cy.widgetText( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js index 566a078274..b4db1aa33e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js @@ -1,6 +1,6 @@ const dsl = require("../../../../../fixtures/ButtonGroup_MenuButton_Width_dsl.json"); -describe("In a button group widget, menu button width", function() { +describe("In a button group widget, menu button width", function () { before(() => { cy.addDsl(dsl); }); @@ -88,9 +88,7 @@ describe("In a button group widget, menu button width", function() { const widgetId = "t5l24fccio"; cy.get(".t--property-pane-back-btn").click(); // Change the first button text - cy.get(".t--property-control-buttons input") - .first() - .type("increase width"); + cy.get(".t--property-control-buttons input").first().type("increase width"); cy.wait("@updateLayout").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_spec.js index ce45898c1d..f2c53755e6 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_spec.js @@ -5,7 +5,7 @@ const firstButton = ".t--buttongroup-widget > div > button > div"; const menuButton = ".t--buttongroup-widget .bp3-popover2-target > div > button > div"; -describe("Button Group Widget Functionality", function() { +describe("Button Group Widget Functionality", function () { before(() => { // no dsl required }); @@ -15,23 +15,17 @@ describe("Button Group Widget Functionality", function() { cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas("buttongroupwidget", { x: 300, y: 300 }); cy.get(".t--buttongroup-widget").should("exist"); - cy.get(".t--buttongroup-widget") - .children() - .should("have.length", 3); + cy.get(".t--buttongroup-widget").children().should("have.length", 3); }); - it("ButtonGroup Widget Functionality on undo after delete", function() { + it("ButtonGroup Widget Functionality on undo after delete", function () { // Delete the first Button - cy.get(".t--property-control-buttons .t--delete-column-btn") - .eq(0) - .click({ - force: true, - }); + cy.get(".t--property-control-buttons .t--delete-column-btn").eq(0).click({ + force: true, + }); // Check if the Button got deleted - cy.get(".t--buttongroup-widget") - .children() - .should("have.length", 2); + cy.get(".t--buttongroup-widget").children().should("have.length", 2); // Check the first button cy.get(firstButton).contains("Add"); @@ -40,19 +34,15 @@ describe("Button Group Widget Functionality", function() { cy.get("body").type(`{${modifierKey}+z}`); // Check if the button is back - cy.get(".t--buttongroup-widget") - .children() - .should("have.length", 3); + cy.get(".t--buttongroup-widget").children().should("have.length", 3); // Check the first button cy.get(firstButton).contains("Favorite"); // Navigate to the first button property pane - cy.get(".t--property-control-buttons .t--edit-column-btn") - .eq(0) - .click({ - force: true, - }); + cy.get(".t--property-control-buttons .t--edit-column-btn").eq(0).click({ + force: true, + }); cy.wait(1000); // check the title cy.get(".t--property-pane-title").contains("Favorite"); @@ -60,7 +50,7 @@ describe("Button Group Widget Functionality", function() { cy.get(".t--property-pane-back-btn").click(); }); - it("Verify buttons alignments", function() { + it("Verify buttons alignments", function () { // check first button placement cy.editColumn("groupButton2"); cy.moveToStyleTab(); @@ -73,7 +63,7 @@ describe("Button Group Widget Functionality", function() { cy.get(menuButton).should("have.css", "justify-content", "center"); }); - it("Update Placement and Verify buttons alignments", function() { + it("Update Placement and Verify buttons alignments", function () { // check first button placement cy.selectDropdownValue( ".t--property-control-placement .bp3-popover-target", @@ -88,23 +78,19 @@ describe("Button Group Widget Functionality", function() { ".t--property-control-placement .bp3-popover-target", "Start", ); - cy.get(firstButton) - .last() - .should("have.css", "justify-content", "start"); + cy.get(firstButton).last().should("have.css", "justify-content", "start"); // other button style stay same cy.get(menuButton).should("have.css", "justify-content", "center"); }); - it("Update icon alignment and Verify buttons alignments", function() { + it("Update icon alignment and Verify buttons alignments", function () { // align right cy.get(".t--property-control-position .t--button-group-left") .first() .click(); cy.wait(200); // 1st btn - cy.get(firstButton) - .eq(1) - .should("have.css", "flex-direction", "row"); + cy.get(firstButton).eq(1).should("have.css", "flex-direction", "row"); // align left cy.get(".t--property-control-position .t--button-group-right") .last() diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonLintErrorValidation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonLintErrorValidation_spec.js index efd12627be..5f50a823cb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonLintErrorValidation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonLintErrorValidation_spec.js @@ -1,11 +1,11 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/buttonLintErrorDsl.json"); -describe("Linting warning validation with button widget", function() { +describe("Linting warning validation with button widget", function () { before(() => { cy.addDsl(dsl); }); - it("Linting Error validation on mouseover and errorlog tab", function() { + it("Linting Error validation on mouseover and errorlog tab", function () { cy.openPropertyPane("buttonwidget"); /** * @param{Text} Random Text @@ -19,12 +19,8 @@ describe("Linting warning validation with button widget", function() { .wait(500); //lint mark validation - cy.get(commonlocators.lintError) - .first() - .should("be.visible"); - cy.get(commonlocators.lintError) - .last() - .should("be.visible"); + cy.get(commonlocators.lintError).first().should("be.visible"); + cy.get(commonlocators.lintError).last().should("be.visible"); cy.get(commonlocators.lintError) .first() @@ -44,13 +40,9 @@ describe("Linting warning validation with button widget", function() { .should("be.visible") .contains("'lintError' is not defined."); - cy.get(commonlocators.debugger) - .should("be.visible") - .click({ force: true }); + cy.get(commonlocators.debugger).should("be.visible").click({ force: true }); - cy.get(commonlocators.errorTab) - .should("be.visible") - .click({ force: true }); + cy.get(commonlocators.errorTab).should("be.visible").click({ force: true }); cy.get(commonlocators.debugErrorMsg).should("have.length", 3); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_onClickAction_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_onClickAction_spec.js index 74cd0a59bf..6511a0bd10 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_onClickAction_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_onClickAction_spec.js @@ -5,7 +5,7 @@ const modalWidgetPage = require("../../../../../locators/ModalWidget.json"); const datasource = require("../../../../../locators/DatasourcesEditor.json"); import * as _ from "../../../../../support/Objects/ObjectsCore"; -describe("Button Widget Functionality", function() { +describe("Button Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -14,7 +14,7 @@ describe("Button Widget Functionality", function() { cy.openPropertyPane("buttonwidget"); }); - it("1. Button-Modal Validation", function() { + it("1. Button-Modal Validation", function () { //creating the Modal and verify Modal name cy.createModal(this.data.ModalName); cy.PublishtheApp(); @@ -31,7 +31,7 @@ describe("Button Widget Functionality", function() { ); }); - it("2. Button-CallAnApi Validation", function() { + it("2. Button-CallAnApi Validation", function () { //creating an api and calling it from the onClickAction of the button widget. // Creating the api cy.NavigateToAPI_Panel(); @@ -69,7 +69,7 @@ describe("Button Widget Functionality", function() { cy.get(widgetsPage.apiCallToast).should("have.text", "Success"); }); - it("3. Button-Call-Query Validation", function() { + it("3. Button-Call-Query Validation", function () { //creating a query and calling it from the onClickAction of the button widget. // Creating a mock query // cy.CreateMockQuery("Query1"); @@ -117,7 +117,7 @@ describe("Button Widget Functionality", function() { cy.get(widgetsPage.apiCallToast).should("have.text", "Success"); }); - it("4. Toggle JS - Button-CallAnApi Validation", function() { + it("4. Toggle JS - Button-CallAnApi Validation", function () { //creating an api and calling it from the onClickAction of the button widget. // calling the existing api cy.get(widgetsPage.toggleOnClick).click({ force: true }); @@ -138,7 +138,7 @@ describe("Button Widget Functionality", function() { cy.get(widgetsPage.apiCallToast).should("have.text", "Success"); }); - it("5. Toggle JS - Button-Call-Query Validation", function() { + it("5. Toggle JS - Button-Call-Query Validation", function () { //creating a query and calling it from the onClickAction of the button widget. // Creating a mock query _.propPane.UpdatePropertyFieldValue( @@ -159,7 +159,7 @@ describe("Button Widget Functionality", function() { cy.get(widgetsPage.apiCallToast).should("have.text", "Success"); }); - it("6. Toggle JS - Button-Call-SetTimeout Validation", function() { + it("6. Toggle JS - Button-Call-SetTimeout Validation", function () { //creating a query and calling it from the onClickAction of the button widget. // Creating a mock query _.propPane.UpdatePropertyFieldValue( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_spec.js index f25869cb4d..0a17a79736 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_spec.js @@ -5,7 +5,7 @@ const publishPage = require("../../../../../locators/publishWidgetspage.json"); const iconAlignmentProperty = ".t--property-control-position"; -describe("Button Widget Functionality", function() { +describe("Button Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -22,20 +22,16 @@ describe("Button Widget Functionality", function() { force: true, }); - cy.get(".bp3-icon-add") - .first() - .click({ - force: true, - }); + cy.get(".bp3-icon-add").first().click({ + force: true, + }); // Assert if the icon exists cy.get(`${widgetsPage.buttonWidget} .bp3-icon-add`).should("exist"); // Change icon alignment to right - cy.get(`${iconAlignmentProperty} .t--button-group-right`) - .last() - .click({ - force: true, - }); + cy.get(`${iconAlignmentProperty} .t--button-group-right`).last().click({ + force: true, + }); cy.wait(200); // Assert if the icon appears on the right hand side of the button text cy.get(widgetsPage.buttonWidget) @@ -49,11 +45,9 @@ describe("Button Widget Functionality", function() { cy.get(".t--property-control-selecticon .bp3-icon-caret-down").click({ force: true, }); - cy.get(".bp3-icon-airplane") - .first() - .click({ - force: true, - }); + cy.get(".bp3-icon-airplane").first().click({ + force: true, + }); // Assert if the icon changes // Assert if the icon still exists on the right side of the text cy.get(`${widgetsPage.buttonWidget} .bp3-icon-airplane`) @@ -62,12 +56,12 @@ describe("Button Widget Functionality", function() { .should("have.text", "Submit"); }); - it("Button-Color Validation", function() { + it("Button-Color Validation", function () { // Change button color cy.changeButtonColor("rgb(255, 0, 0)"); }); - it("Button default variant validation", function() { + it("Button default variant validation", function () { // Checks whether the default variant is PRIMARY or not cy.get(widgetsPage.widgetBtn).should( "have.attr", @@ -76,7 +70,7 @@ describe("Button Widget Functionality", function() { ); }); - it("Button-Name validation", function() { + it("Button-Name validation", function () { //changing the Button Name cy.widgetText( this.data.ButtonName, @@ -102,7 +96,7 @@ describe("Button Widget Functionality", function() { ); }); - it("Button-Disable Validation", function() { + it("Button-Disable Validation", function () { //Check the disableed checkbox and Validate cy.CheckWidgetProperties(commonlocators.disableCheckbox); cy.validateDisableWidget( @@ -116,7 +110,7 @@ describe("Button Widget Functionality", function() { ); }); - it("Button-Enable Validation", function() { + it("Button-Enable Validation", function () { //Uncheck the disabled checkbox and validate cy.UncheckWidgetProperties(commonlocators.disableCheckbox); cy.validateEnableWidget( @@ -130,7 +124,7 @@ describe("Button Widget Functionality", function() { ); }); - it("Toggle JS - Button-Disable Validation", function() { + it("Toggle JS - Button-Disable Validation", function () { //Check the disabled checkbox by using JS widget and Validate cy.get(widgetsPage.toggleDisable).click({ force: true }); cy.testJsontext("disabled", "true"); @@ -145,7 +139,7 @@ describe("Button Widget Functionality", function() { ); }); - it("Toggle JS - Button-Enable Validation", function() { + it("Toggle JS - Button-Enable Validation", function () { //Uncheck the disabled checkbox and validate cy.testJsontext("disabled", "false"); cy.validateEnableWidget( @@ -159,21 +153,21 @@ describe("Button Widget Functionality", function() { ); }); - it("Button-Unckeck Visible field Validation", function() { + it("Button-Unckeck Visible field Validation", function () { //Uncheck the disabled checkbox and validate cy.UncheckWidgetProperties(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publishPage.buttonWidget).should("not.exist"); }); - it("Button-Check Visible field Validation", function() { + it("Button-Check Visible field Validation", function () { //Check the disableed checkbox and Validate cy.CheckWidgetProperties(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publishPage.buttonWidget).should("be.visible"); }); - it("Toggle JS - Button-Unckeck Visible field Validation", function() { + it("Toggle JS - Button-Unckeck Visible field Validation", function () { //Uncheck the disabled checkbox using JS and validate cy.get(widgetsPage.toggleVisible).click({ force: true }); cy.EnableAllCodeEditors(); @@ -182,7 +176,7 @@ describe("Button Widget Functionality", function() { cy.get(publishPage.buttonWidget).should("not.exist"); }); - it("Toggle JS - Button-Check Visible field Validation", function() { + it("Toggle JS - Button-Check Visible field Validation", function () { //Check the disabled checkbox using JS and Validate cy.EnableAllCodeEditors(); cy.testJsontext("visible", "true"); @@ -190,21 +184,21 @@ describe("Button Widget Functionality", function() { cy.get(publishPage.buttonWidget).should("be.visible"); }); - it("Button-Check recaptcha type can be selected", function() { + it("Button-Check recaptcha type can be selected", function () { cy.selectDropdownValue(commonlocators.recaptchaVersion, "reCAPTCHA v2"); cy.get(commonlocators.recaptchaVersion) .last() .should("have.text", "reCAPTCHA v2"); }); - it("Button-Copy Verification", function() { + it("Button-Copy Verification", function () { //Copy button and verify all properties cy.copyWidget("buttonwidget", widgetsPage.buttonWidget); // cy.PublishtheApp(); }); - it("Button-Delete Verification", function() { + it("Button-Delete Verification", function () { // Delete the button widget cy.deleteWidget(widgetsPage.buttonWidget); cy.PublishtheApp(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_tooltip_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_tooltip_spec.js index 368c1f8110..9f392d6cf0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_tooltip_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_tooltip_spec.js @@ -3,12 +3,12 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const commonlocators = require("../../../../../locators/commonlocators.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); -describe("Button Widget Functionality - Validate tooltip visibility", function() { +describe("Button Widget Functionality - Validate tooltip visibility", function () { before(() => { cy.addDsl(dsl); }); - it("Validate show/hide tooltip feature on normal button", function() { + it("Validate show/hide tooltip feature on normal button", function () { cy.openPropertyPane("buttonwidget"); // Add tooltip cy.testJsontext( @@ -32,7 +32,7 @@ describe("Button Widget Functionality - Validate tooltip visibility", function() .should("not.exist"); }); - it("Validate show/hide tooltip feature for a disabled button on deploy", function() { + it("Validate show/hide tooltip feature for a disabled button on deploy", function () { // Disable the button cy.get(".t--property-control-disabled .bp3-switch").click({ force: true }); cy.validateDisableWidget( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/ChartDataPoint_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/ChartDataPoint_Spec.ts index 8be1c6405d..4c0e97a18c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/ChartDataPoint_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/ChartDataPoint_Spec.ts @@ -1,48 +1,57 @@ -import { ObjectsRegistry } from "../../../../../support/Objects/Registry" +import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; let dataSet: any, dsl: any; let agHelper = ObjectsRegistry.AggregateHelper, - ee = ObjectsRegistry.EntityExplorer, - propPane = ObjectsRegistry.PropertyPane, - locator = ObjectsRegistry.CommonLocators, - deployMode = ObjectsRegistry.DeployMode; + ee = ObjectsRegistry.EntityExplorer, + propPane = ObjectsRegistry.PropertyPane, + locator = ObjectsRegistry.CommonLocators, + deployMode = ObjectsRegistry.DeployMode; describe("Input widget test with default value from chart datapoint", () => { - - //beforeEach - becasuse to enable re-attempt passing! - beforeEach(() => { - cy.fixture('ChartDsl').then((val: any) => { - agHelper.AddDsl(val) - dsl = val; - }); - cy.fixture("testdata").then(function (data: any) { - dataSet = data; - }); + //beforeEach - becasuse to enable re-attempt passing! + beforeEach(() => { + cy.fixture("ChartDsl").then((val: any) => { + agHelper.AddDsl(val); + dsl = val; }); - - it("1. Chart widget - Input widget test with default value from another Input widget", () => { - ee.SelectEntityByName("Input1", 'Widgets') - propPane.UpdatePropertyFieldValue("Default Value", dataSet.bindChartData + "}}"); - agHelper.ValidateNetworkStatus('@updateLayout') - ee.SelectEntityByName("Chart1") - propPane.SelectPropertiesDropDown("ondatapointclick", "Show message") - agHelper.EnterActionValue("Message", dataSet.bindingDataPoint) - ee.SelectEntityByName("Input2") - propPane.UpdatePropertyFieldValue("Default Value", dataSet.bindingSeriesTitle + "}}"); - deployMode.DeployApp() - agHelper.Sleep(1500)//waiting for chart to load! - agHelper.GetNClick("//*[local-name()='rect']", 13) - cy.get(locator._widgetInputSelector("inputwidgetv2")).first().invoke('val').then($value => { - let inputVal = ($value as string).replace(/\s/g, "")//removing space here - //cy.get(locator._toastMsg).invoke('text').then(toastTxt => expect(toastTxt.trim()).to.eq(inputVal)) - cy.get(locator._toastMsg).should('have.text', inputVal) - }) - cy.get(locator._widgetInputSelector("inputwidgetv2")).last().should("have.value", dsl.dsl.children[0].chartData[0].seriesName); + cy.fixture("testdata").then(function (data: any) { + dataSet = data; }); + }); - afterEach(() => { - //this is to enable re-attempt passing! - deployMode.NavigateBacktoEditor() - }) + it("1. Chart widget - Input widget test with default value from another Input widget", () => { + ee.SelectEntityByName("Input1", "Widgets"); + propPane.UpdatePropertyFieldValue( + "Default Value", + dataSet.bindChartData + "}}", + ); + agHelper.ValidateNetworkStatus("@updateLayout"); + ee.SelectEntityByName("Chart1"); + propPane.SelectPropertiesDropDown("ondatapointclick", "Show message"); + agHelper.EnterActionValue("Message", dataSet.bindingDataPoint); + ee.SelectEntityByName("Input2"); + propPane.UpdatePropertyFieldValue( + "Default Value", + dataSet.bindingSeriesTitle + "}}", + ); + deployMode.DeployApp(); + agHelper.Sleep(1500); //waiting for chart to load! + agHelper.GetNClick("//*[local-name()='rect']", 13); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .first() + .invoke("val") + .then(($value) => { + let inputVal = ($value as string).replace(/\s/g, ""); //removing space here + //cy.get(locator._toastMsg).invoke('text').then(toastTxt => expect(toastTxt.trim()).to.eq(inputVal)) + cy.get(locator._toastMsg).should("have.text", inputVal); + }); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .last() + .should("have.value", dsl.dsl.children[0].chartData[0].seriesName); + }); -}); \ No newline at end of file + afterEach(() => { + //this is to enable re-attempt passing! + deployMode.NavigateBacktoEditor(); + }); +}); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_Widget_Loading_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_Widget_Loading_spec.js index 4ee2319d02..f4a7ab69e6 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_Widget_Loading_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_Widget_Loading_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../../fixtures/ChartLoadingDsl.json"); const datasource = require("../../../../../locators/DatasourcesEditor.json"); const queryLocators = require("../../../../../locators/QueryEditor.json"); -describe("Chart Widget Skeleton Loading Functionality", function() { +describe("Chart Widget Skeleton Loading Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("1. Test case while reloading and on submission", function() { + it("1. Test case while reloading and on submission", function () { /** * Use case: * 1. Open Datasource editor @@ -47,9 +47,7 @@ describe("Chart Widget Skeleton Loading Functionality", function() { cy.get(queryLocators.queryNameField).type("Query1"); // switching off Use Prepared Statement toggle - cy.get(queryLocators.switch) - .last() - .click({ force: true }); + cy.get(queryLocators.switch).last().click({ force: true }); //Step 6.1: Click on Write query area cy.get(queryLocators.templateMenu).click(); @@ -74,9 +72,7 @@ describe("Chart Widget Skeleton Loading Functionality", function() { cy.wait(1000); //Step9: - cy.get(".bp3-button-text") - .first() - .click({ force: true }); + cy.get(".bp3-button-text").first().click({ force: true }); //Step10: cy.get(".t--widget-chartwidget div[class*='bp3-skeleton']").should("exist"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_spec.js index 6bcb22e588..94d4bd720e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_spec.js @@ -5,7 +5,7 @@ const dsl = require("../../../../../fixtures/chartUpdatedDsl.json"); const modalWidgetPage = require("../../../../../locators/ModalWidget.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("Chart Widget Functionality", function() { +describe("Chart Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -14,7 +14,7 @@ describe("Chart Widget Functionality", function() { cy.openPropertyPane("chartwidget"); }); - it("Fill the Chart Widget Properties.", function() { + it("Fill the Chart Widget Properties.", function () { //changing the Chart Name /** * @param{Text} Random Text @@ -66,7 +66,7 @@ describe("Chart Widget Functionality", function() { cy.PublishtheApp(); }); - it("Pie Chart Widget Functionality", function() { + it("Pie Chart Widget Functionality", function () { //changing the Chart type cy.UpdateChartType("Pie Chart"); @@ -84,7 +84,7 @@ describe("Chart Widget Functionality", function() { cy.PublishtheApp(); }); - it("Line Chart Widget Functionality", function() { + it("Line Chart Widget Functionality", function () { //changing the Chart type cy.UpdateChartType("Line Chart"); @@ -95,14 +95,12 @@ describe("Chart Widget Functionality", function() { cy.get(viewWidgetsPage.rectangleChart) .last() .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("Bar Chart Widget Functionality", function() { + it("Bar Chart Widget Functionality", function () { //changing the Chart type cy.UpdateChartType("Bar Chart"); @@ -113,14 +111,12 @@ describe("Chart Widget Functionality", function() { cy.get(viewWidgetsPage.rectangleChart) .eq(k) .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("Area Chart Widget Functionality", function() { + it("Area Chart Widget Functionality", function () { //changing the Chart type cy.UpdateChartType("Area Chart"); @@ -131,14 +127,12 @@ describe("Chart Widget Functionality", function() { cy.get(viewWidgetsPage.rectangleChart) .last() .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("Column Chart Widget Functionality", function() { + it("Column Chart Widget Functionality", function () { //changing the Chart type cy.UpdateChartType("Column Chart"); @@ -149,14 +143,12 @@ describe("Chart Widget Functionality", function() { cy.get(viewWidgetsPage.rectangleChart) .eq(k) .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("Toggle JS - Pie Chart Widget Functionality", function() { + it("Toggle JS - Pie Chart Widget Functionality", function () { //changing the Chart type cy.get(widgetsPage.toggleChartType).click({ force: true }); cy.testJsontext("charttype", "PIE_CHART"); @@ -175,7 +167,7 @@ describe("Chart Widget Functionality", function() { cy.PublishtheApp(); }); - it("Toggle JS - Line Chart Widget Functionality", function() { + it("Toggle JS - Line Chart Widget Functionality", function () { //changing the Chart type cy.testJsontext("charttype", "LINE_CHART"); @@ -186,14 +178,12 @@ describe("Chart Widget Functionality", function() { cy.get(viewWidgetsPage.rectangleChart) .last() .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("Toggle JS - Bar Chart Widget Functionality", function() { + it("Toggle JS - Bar Chart Widget Functionality", function () { //changing the Chart type cy.testJsontext("charttype", "BAR_CHART"); @@ -204,14 +194,12 @@ describe("Chart Widget Functionality", function() { cy.get(viewWidgetsPage.rectangleChart) .eq(k) .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("Toggle JS - Area Chart Widget Functionality", function() { + it("Toggle JS - Area Chart Widget Functionality", function () { //changing the Chart type cy.testJsontext("charttype", "AREA_CHART"); @@ -222,14 +210,12 @@ describe("Chart Widget Functionality", function() { cy.get(viewWidgetsPage.rectangleChart) .last() .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("Toggle JS - Column Chart Widget Functionality", function() { + it("Toggle JS - Column Chart Widget Functionality", function () { //changing the Chart type cy.testJsontext("charttype", "COLUMN_CHART"); @@ -240,42 +226,37 @@ describe("Chart Widget Functionality", function() { cy.get(viewWidgetsPage.rectangleChart) .eq(k) .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("Chart - Modal", function() { + it("Chart - Modal", function () { //creating the Modal and verify Modal name cy.createModal(this.data.ModalName); cy.PublishtheApp(); - cy.get(widgetsPage.chartPlotGroup) - .children() - .first() - .click(); + cy.get(widgetsPage.chartPlotGroup).children().first().click(); cy.get(modalWidgetPage.modelTextField).should( "have.text", this.data.ModalName, ); }); - it("Chart-Unckeck Visible field Validation", function() { + it("Chart-Unckeck Visible field Validation", function () { // Making the widget invisible cy.togglebarDisable(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publish.chartWidget).should("not.exist"); }); - it("Chart-Check Visible field Validation", function() { + it("Chart-Check Visible field Validation", function () { // Making the widget visible cy.togglebar(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publish.chartWidget).should("be.visible"); }); - it("Toggle JS - Chart-Unckeck Visible field Validation", function() { + it("Toggle JS - Chart-Unckeck Visible field Validation", function () { //Uncheck the disabled checkbox using JS and validate cy.get(widgetsPage.toggleVisible).click({ force: true }); cy.testJsontext("visible", "false"); @@ -283,28 +264,26 @@ describe("Chart Widget Functionality", function() { cy.get(publish.chartWidget).should("not.exist"); }); - it("Toggle JS - Chart-Check Visible field Validation", function() { + it("Toggle JS - Chart-Check Visible field Validation", function () { //Check the disabled checkbox using JS and Validate cy.testJsontext("visible", "true"); cy.PublishtheApp(); cy.get(publish.chartWidget).should("be.visible"); }); - it("Chart Widget Functionality To Uncheck Horizontal Scroll Visible", function() { + it("Chart Widget Functionality To Uncheck Horizontal Scroll Visible", function () { cy.togglebarDisable(commonlocators.allowScroll); cy.PublishtheApp(); cy.get(publish.horizontalTab).should("not.exist"); }); - it("Chart Widget Functionality To Check Horizontal Scroll Visible", function() { + it("Chart Widget Functionality To Check Horizontal Scroll Visible", function () { cy.togglebar(commonlocators.allowScroll); cy.PublishtheApp(); - cy.get(publish.horizontalTab) - .eq(1) - .should("exist"); + cy.get(publish.horizontalTab).eq(1).should("exist"); }); - it("Check Chart widget reskinning config", function() { + it("Check Chart widget reskinning config", function () { cy.get(widgetsPage.toggleChartType).click({ force: true }); cy.UpdateChartType("Column Chart"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Custom_Chart_Data_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Custom_Chart_Data_spec.js index faad199ccc..397dd72710 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Custom_Chart_Data_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Custom_Chart_Data_spec.js @@ -1,16 +1,16 @@ const dsl = require("../../../../../fixtures/chartCustomDataDsl.json"); -describe("Chart Widget Functionality around custom chart data", function() { +describe("Chart Widget Functionality around custom chart data", function () { before(() => { cy.addDsl(dsl); }); - it("1. change chart type to custom chart", function() { + it("1. change chart type to custom chart", function () { cy.openPropertyPane("chartwidget"); cy.UpdateChartType("Custom Chart"); }); - it("2. change chart value via input widget and validate", function() { + it("2. change chart value via input widget and validate", function () { const value1 = 40; enterAndTest("inputwidgetv2", value1, value1); cy.wait(400); @@ -28,9 +28,7 @@ describe("Chart Widget Functionality around custom chart data", function() { cy.get(`.t--widget-${widgetName} input`).clear(); cy.wait(300); if (text) { - cy.get(`.t--widget-${widgetName} input`) - .click() - .type(text); + cy.get(`.t--widget-${widgetName} input`).click().type(text); } cy.get(`.t--widget-${widgetName} input`).should("have.value", expected); } diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Custom_Chart_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Custom_Chart_spec.js index 898d50fd94..37c2e0d3eb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Custom_Chart_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Custom_Chart_spec.js @@ -4,7 +4,7 @@ const publish = require("../../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../../fixtures/chartUpdatedDsl.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("Chart Widget Functionality around custom chart feature", function() { +describe("Chart Widget Functionality around custom chart feature", function () { before(() => { cy.addDsl(dsl); }); @@ -13,7 +13,7 @@ describe("Chart Widget Functionality around custom chart feature", function() { cy.openPropertyPane("chartwidget"); }); - it("1. Fill the Chart Widget Properties.", function() { + it("1. Fill the Chart Widget Properties.", function () { //changing the Chart Name /** * @param{Text} Random Text @@ -65,7 +65,7 @@ describe("Chart Widget Functionality around custom chart feature", function() { cy.PublishtheApp(); }); - it("2. Custom Chart Widget Functionality", function() { + it("2. Custom Chart Widget Functionality", function () { //changing the Chart type //cy.get(widgetsPage.toggleChartType).click({ force: true }); cy.UpdateChartType("Custom Chart"); @@ -82,14 +82,12 @@ describe("Chart Widget Functionality around custom chart feature", function() { cy.get(viewWidgetsPage.rectangleChart) .eq(k) .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("3. Toggle JS - Custom Chart Widget Functionality", function() { + it("3. Toggle JS - Custom Chart Widget Functionality", function () { cy.get(widgetsPage.toggleChartType).click({ force: true }); //changing the Chart type cy.testJsontext("charttype", "CUSTOM_FUSION_CHART"); @@ -108,23 +106,21 @@ describe("Chart Widget Functionality around custom chart feature", function() { cy.get(viewWidgetsPage.rectangleChart) .eq(k) .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); //Close edit prop cy.PublishtheApp(false); }); - it("4. Chart-Copy Verification", function() { + it("4. Chart-Copy Verification", function () { //Copy Chart and verify all properties cy.wait(1000); cy.copyWidget("chartwidget", viewWidgetsPage.chartWidget); cy.PublishtheApp(); }); - it("5. Chart-Delete Verification", function() { + it("5. Chart-Delete Verification", function () { // Delete the Chart widget cy.deleteWidget(viewWidgetsPage.chartWidget); cy.PublishtheApp(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBoxLintErrorMultipleRowValidation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBoxLintErrorMultipleRowValidation_spec.js index 6bf0da46ba..47d76beb0d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBoxLintErrorMultipleRowValidation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBoxLintErrorMultipleRowValidation_spec.js @@ -1,11 +1,11 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/snippetDsl.json"); -describe("Linting warning validation with Checkbox widget", function() { +describe("Linting warning validation with Checkbox widget", function () { before(() => { cy.addDsl(dsl); }); - it("Linting warning validation", function() { + it("Linting warning validation", function () { cy.openPropertyPane("checkboxwidget"); /** * @param{Text} Random Text @@ -19,12 +19,8 @@ describe("Linting warning validation with Checkbox widget", function() { .wait(500); //lint mark validation - cy.get(commonlocators.lintError) - .first() - .should("be.visible"); - cy.get(commonlocators.lintError) - .last() - .should("be.visible"); + cy.get(commonlocators.lintError).first().should("be.visible"); + cy.get(commonlocators.lintError).last().should("be.visible"); cy.get(commonlocators.lintError) .last() diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBoxMultipleLintError_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBoxMultipleLintError_spec.js index 0c5ebc4d82..bd84ffed0e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBoxMultipleLintError_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBoxMultipleLintError_spec.js @@ -1,11 +1,11 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/snippetErrordsl.json"); -describe("Linting warning validation with Checkbox widget", function() { +describe("Linting warning validation with Checkbox widget", function () { before(() => { cy.addDsl(dsl); }); - it("Linting warning validation", function() { + it("Linting warning validation", function () { cy.openPropertyPane("checkboxwidget"); /** * @param{Text} Random Text @@ -19,12 +19,8 @@ describe("Linting warning validation with Checkbox widget", function() { .wait(500); //lint mark validation - cy.get(commonlocators.lintError) - .first() - .should("be.visible"); - cy.get(commonlocators.lintError) - .last() - .should("be.visible"); + cy.get(commonlocators.lintError).first().should("be.visible"); + cy.get(commonlocators.lintError).last().should("be.visible"); cy.get(commonlocators.lintError) .last() diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBox_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBox_spec.js index 4f3136a9af..0fe4617b39 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBox_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBox_spec.js @@ -4,11 +4,11 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../../fixtures/newFormDsl.json"); -describe("Checkbox Widget Functionality", function() { +describe("Checkbox Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Checkbox Widget Functionality", function() { + it("Checkbox Widget Functionality", function () { cy.openPropertyPane("checkboxwidget"); /** * @param{Text} Random Text @@ -35,35 +35,35 @@ describe("Checkbox Widget Functionality", function() { cy.getAlert(commonlocators.optionchangetextCheckbox); cy.PublishtheApp(); }); - it("Checkbox Functionality To Check Label", function() { + it("Checkbox Functionality To Check Label", function () { cy.get(publish.checkboxWidget + " " + "label").should( "have.text", this.data.checkbocInputName, ); cy.get(publish.backToEditor).click(); }); - it("Checkbox Functionality To Check Disabled Widget", function() { + it("Checkbox Functionality To Check Disabled Widget", function () { cy.openPropertyPane("checkboxwidget"); cy.togglebar(commonlocators.Disablejs + " " + "input"); cy.PublishtheApp(); cy.get(publish.checkboxWidget + " " + "input").should("be.disabled"); cy.get(publish.backToEditor).click(); }); - it("Checkbox Functionality To Check Enabled Widget", function() { + it("Checkbox Functionality To Check Enabled Widget", function () { cy.openPropertyPane("checkboxwidget"); cy.togglebarDisable(commonlocators.Disablejs + " " + "input"); cy.PublishtheApp(); cy.get(publish.checkboxWidget + " " + "input").should("be.enabled"); cy.get(publish.backToEditor).click(); }); - it("Checkbox Functionality To Unchecked Visible Widget", function() { + it("Checkbox Functionality To Unchecked Visible Widget", function () { cy.openPropertyPane("checkboxwidget"); cy.togglebarDisable(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publish.checkboxWidget + " " + "input").should("not.exist"); cy.get(publish.backToEditor).click(); }); - it("Checkbox Functionality To Check Visible Widget", function() { + it("Checkbox Functionality To Check Visible Widget", function () { cy.openPropertyPane("checkboxwidget"); cy.togglebar(commonlocators.visibleCheckbox); cy.PublishtheApp(); @@ -71,22 +71,18 @@ describe("Checkbox Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("Check isDirty meta property", function() { + it("Check isDirty meta property", function () { cy.openPropertyPane("textwidget"); cy.updateCodeInput(".t--property-control-text", `{{checker.isDirty}}`); // Check if initial value of isDirty is false cy.get(".t--widget-textwidget").should("contain", "false"); // Interact with UI - cy.get(`${formWidgetsPage.checkboxWidget} label`) - .first() - .click(); + cy.get(`${formWidgetsPage.checkboxWidget} label`).first().click(); // Check if isDirty is set to true cy.get(".t--widget-textwidget").should("contain", "true"); // Change defaultCheckedState property cy.openPropertyPane("checkboxwidget"); - cy.get(".t--property-control-defaultstate label") - .last() - .click(); + cy.get(".t--property-control-defaultstate label").last().click(); // Check if isDirty is reset to false cy.get(".t--widget-textwidget").should("contain", "false"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup1_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup1_spec.js index 2af63e064c..0922c4764d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup1_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup1_spec.js @@ -1,7 +1,7 @@ const dsl = require("../../../../../fixtures/emptyDSL.json"); const explorer = require("../../../../../locators/explorerlocators.json"); -describe("checkboxgroupwidget Widget Functionality", function() { +describe("checkboxgroupwidget Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup2_spec.js index f9c525f128..2e93c5aa5d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup2_spec.js @@ -5,12 +5,12 @@ const explorer = require("../../../../../locators/explorerlocators.json"); const dsl = require("../../../../../fixtures/checkboxgroupDsl.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("Checkbox Group Widget Functionality", function() { +describe("Checkbox Group Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("1. Checkbox Group Widget Functionality", function() { + it("1. Checkbox Group Widget Functionality", function () { cy.openPropertyPane("checkboxgroupwidget"); /** * @param{Text} Random Text @@ -39,17 +39,13 @@ describe("Checkbox Group Widget Functionality", function() { cy.radioInput(3, "2"); cy.get(formWidgetsPage.radioAddButton).click({ force: true }); cy.radioInput(4, this.data.radio4); - cy.get(formWidgetsPage.deleteradiovalue) - .eq(2) - .click({ force: true }); + cy.get(formWidgetsPage.deleteradiovalue).eq(2).click({ force: true }); cy.wait(200); cy.get(formWidgetsPage.labelCheckboxGroup).should( "not.have.value", "test4", ); - cy.get(formWidgetsPage.deleteradiovalue) - .eq(2) - .click({ force: true }); + cy.get(formWidgetsPage.deleteradiovalue).eq(2).click({ force: true }); cy.wait(200); /** * @param{Show Alert} Css for InputChange @@ -62,7 +58,7 @@ describe("Checkbox Group Widget Functionality", function() { cy.PublishtheApp(); }); - it("2. Checkbox Group Functionality To Unchecked Visible Widget", function() { + it("2. Checkbox Group Functionality To Unchecked Visible Widget", function () { cy.get(publish.backToEditor).click(); cy.openPropertyPane("checkboxgroupwidget"); cy.togglebarDisable(commonlocators.visibleCheckbox); @@ -71,7 +67,7 @@ describe("Checkbox Group Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("3. Checkbox Group Functionality To Check Visible Widget", function() { + it("3. Checkbox Group Functionality To Check Visible Widget", function () { cy.openPropertyPane("checkboxgroupwidget"); cy.togglebar(commonlocators.visibleCheckbox); cy.PublishtheApp(); @@ -81,14 +77,14 @@ describe("Checkbox Group Widget Functionality", function() { .should("exist"); }); - it("4. Checkbox Group Functionality To Button Text", function() { + it("4. Checkbox Group Functionality To Button Text", function () { cy.get(publish.checkboxGroupWidget + " " + "label") .eq(2) .should("have.text", "test2"); cy.get(publish.backToEditor).click(); }); - it("handleSelectAllChange: unchecked", function() { + it("handleSelectAllChange: unchecked", function () { const selectAllSelector = formWidgetsPage.selectAllCheckboxControl; const uncheckedOptionInputs = `${formWidgetsPage.checkboxGroupOptionInputs} input:not(:checked)`; // Deselect all @@ -97,7 +93,7 @@ describe("Checkbox Group Widget Functionality", function() { cy.get(uncheckedOptionInputs).should("have.length", 2); }); - it("handleSelectAllChange: checked", function() { + it("handleSelectAllChange: checked", function () { const selectAllSelector = formWidgetsPage.selectAllCheckboxControl; const checkedOptionInputs = `${formWidgetsPage.checkboxGroupOptionInputs} input:checked`; // Select all @@ -106,7 +102,7 @@ describe("Checkbox Group Widget Functionality", function() { cy.get(checkedOptionInputs).should("have.length", 2); }); - it("Checkbox Group Functionality To alignment options", function() { + it("Checkbox Group Functionality To alignment options", function () { cy.openPropertyPane("checkboxgroupwidget"); cy.moveToStyleTab(); // check default value @@ -125,16 +121,14 @@ describe("Checkbox Group Widget Functionality", function() { force: true, }); cy.wait(200); - cy.get(".t--dropdown-option") - .contains("Start") - .click({ force: true }); + cy.get(".t--dropdown-option").contains("Start").click({ force: true }); cy.wait(400); cy.get( ".t--draggable-checkboxgroupwidget div[data-cy^='checkbox-group-container']", ).should("have.css", "justify-content", "flex-start"); }); - it("Check isDirty meta property", function() { + it("Check isDirty meta property", function () { cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas("textwidget", { x: 300, y: 500 }); cy.openPropertyPane("textwidget"); @@ -149,9 +143,7 @@ describe("Checkbox Group Widget Functionality", function() { // Check if isDirty is reset to false cy.get(".t--widget-textwidget").should("contain", "false"); // Interact with UI - cy.get(formWidgetsPage.labelCheckboxGroup) - .first() - .click(); + cy.get(formWidgetsPage.labelCheckboxGroup).first().click(); // Check if isDirty is set to true cy.get(".t--widget-textwidget").should("contain", "true"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup_withQuery_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup_withQuery_spec.js index 56f02a90b1..e40c305e39 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup_withQuery_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup_withQuery_spec.js @@ -2,7 +2,7 @@ const publish = require("../../../../../locators/publishWidgetspage.json"); const explorer = require("../../../../../locators/explorerlocators.json"); import * as _ from "../../../../../support/Objects/ObjectsCore"; -describe("Checkbox Group Widget Functionality", function() { +describe("Checkbox Group Widget Functionality", function () { let dsName; before(() => { _.dataSources.CreateDataSource("Postgres"); @@ -11,7 +11,7 @@ describe("Checkbox Group Widget Functionality", function() { }); }); - it("1. Check checkbox group with dynamic query", function() { + it("1. Check checkbox group with dynamic query", function () { let query1 = `SELECT * FROM public."country" LIMIT 10;`; let query2 = `SELECT * FROM public."country" LIMIT 2;`; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Container_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Container_spec.js index b0012d4380..91065ec0b3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Container_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Container_spec.js @@ -3,12 +3,12 @@ const publish = require("../../../../locators/publishWidgetspage.json"); const widgetsPage = require("../../../../locators/Widgets.json"); const dsl = require("../../../../fixtures/containerdsl.json"); -describe("Container Widget Functionality", function() { +describe("Container Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Container Widget Functionality", function() { + it("Container Widget Functionality", function () { cy.openPropertyPane("containerwidget"); /** * @param{Text} Random Text @@ -59,7 +59,7 @@ describe("Container Widget Functionality", function() { .should("be.visible"); cy.PublishtheApp(); }); - it("Container Widget Functionality To Verify The Colour", function() { + it("Container Widget Functionality To Verify The Colour", function () { cy.get(widgetsPage.containerD) .eq(0) .should("have.css", "background") @@ -69,7 +69,7 @@ describe("Container Widget Functionality", function() { ); }); - it("Test border width and verity", function() { + it("Test border width and verity", function () { cy.get(publish.backToEditor).click(); cy.openPropertyPane("containerwidget"); cy.moveToStyleTab(); @@ -81,7 +81,7 @@ describe("Container Widget Functionality", function() { .and("eq", "10px"); }); - it("Test border radius and verity", function() { + it("Test border radius and verity", function () { // check if border radius is changed on button cy.get(`.t--property-control-borderradius button > div`) @@ -98,7 +98,7 @@ describe("Container Widget Functionality", function() { }); }); - it("Test Box shadow and verity", function() { + it("Test Box shadow and verity", function () { cy.get(`.t--property-control-boxshadow button > div`) .eq(0) .click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInputDynamicCurrencyCode_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInputDynamicCurrencyCode_spec.js index f86257875b..8b0e6802cb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInputDynamicCurrencyCode_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInputDynamicCurrencyCode_spec.js @@ -16,9 +16,7 @@ describe("Currency input widget - ", () => { .last() .click({ force: true }); // Click on the currency change option - cy.get(".t--input-currency-change") - .first() - .click(); + cy.get(".t--input-currency-change").first().click(); // Search with a typo cy.get(".t--search-input input").type("gdp"); cy.wait(500); @@ -27,9 +25,7 @@ describe("Currency input widget - ", () => { cy.PublishtheApp(); // Click on the currency change option - cy.get(".t--input-currency-change") - .first() - .click(); + cy.get(".t--input-currency-change").first().click(); // Search with a typo cy.get(".t--search-input input").type("gdp"); cy.wait(500); @@ -45,29 +41,21 @@ describe("Currency input widget - ", () => { "contain", "{{appsmith.store.test}}", ); - cy.get(".t--input-currency-change") - .first() - .click(); + cy.get(".t--input-currency-change").first().click(); cy.get(".t--search-input input").type("gbp"); cy.wait(500); - cy.get(".t--dropdown-option") - .last() - .click(); + cy.get(".t--dropdown-option").last().click(); cy.get(".t--property-control-currency .CodeMirror-code").should( "contain", "{{appsmith.store.test}}", ); cy.PublishtheApp(); cy.get(".bp3-button.select-button").click({ force: true }); - cy.get(".menu-item-text") - .first() - .click({ force: true }); + cy.get(".menu-item-text").first().click({ force: true }); cy.get(".t--widget-textwidget").should("contain", "USD:AS:USD"); cy.get(".t--input-currency-change").should("contain", "$"); cy.get(".bp3-button.select-button").click({ force: true }); - cy.get(".menu-item-text") - .last() - .click({ force: true }); + cy.get(".menu-item-text").last().click({ force: true }); cy.get(".t--widget-textwidget").should("contain", "INR:IN:INR"); cy.get(".t--input-currency-change").should("contain", "₹"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js index 80dac3fe6c..51398ca676 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js @@ -2,7 +2,7 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const widgetName = "currencyinputwidget"; -describe("Currency Widget showStepArrows Functionality - ", function() { +describe("Currency Widget showStepArrows Functionality - ", function () { it("1. Validate that For new currency input widgets being dragged, the value for showStepArrows should be set to false", () => { cy.dragAndDropToCanvas(widgetName, { x: 300, y: 400 }); cy.openPropertyPane(widgetName); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInput_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInput_spec.js index 2c8c22a2a6..47bf39b98e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInput_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInput_spec.js @@ -81,14 +81,10 @@ describe("Currency widget - ", () => { cy.get(".t--property-control-allowcurrencychange label") .last() .click({ force: true }); - cy.get(".t--input-currency-change") - .first() - .click(); + cy.get(".t--input-currency-change").first().click(); cy.get(".t--search-input input").type("gbp"); cy.wait(500); - cy.get(".t--dropdown-option") - .last() - .click(); + cy.get(".t--dropdown-option").last().click(); enterAndTest("100.22", "100.22:100.22:true:string:number:GB:GBP"); cy.get(".t--input-currency-change").should("contain", "£"); }); @@ -253,7 +249,7 @@ describe("Currency widget - ", () => { }); }); - it("Check isDirty meta property", function() { + it("Check isDirty meta property", function () { cy.openPropertyPane("textwidget"); cy.updateCodeInput( ".t--property-control-text", @@ -277,14 +273,14 @@ describe("Currency widget - ", () => { cy.get(".t--widget-textwidget").should("contain", "false"); }); - it("Should check that widget input is not showing any errors on input", function() { + it("Should check that widget input is not showing any errors on input", function () { cy.get(widgetInput).type("123456789"); cy.focused().then(() => { cy.get(themelocators.popover).should("not.exist"); }); }); - it("Currency change dropdown should not close unexpectedly", function() { + it("Currency change dropdown should not close unexpectedly", function () { cy.openPropertyPane(widgetName); // Select the Currency dropdown option from property pane diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker1_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker1_spec.js index fea937fee5..cf6c108279 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker1_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker1_spec.js @@ -1,12 +1,12 @@ const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); const dsl = require("../../../../../fixtures/datePicker2dsl.json"); -describe("DatePicker Widget Property pane tests with js bindings", function() { +describe("DatePicker Widget Property pane tests with js bindings", function () { before(() => { cy.addDsl(dsl); }); - it("1. Datepicker default date validation with js binding and default date", function() { + it("1. Datepicker default date validation with js binding and default date", function () { cy.openPropertyPane("datepickerwidget2"); cy.get(".t--property-control-defaultdate .bp3-input").clear(); cy.get(formWidgetsPage.toggleJsDefaultDate).click(); @@ -17,7 +17,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { ); }); - it("2. Datepicker default time picker validation by Time precision", function() { + it("2. Datepicker default time picker validation by Time precision", function () { // default value in property pane cy.openPropertyPane("datepickerwidget2"); cy.get(".t--property-control-timeprecision span[type='p1']").should( @@ -37,16 +37,13 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.closePropertyPane(); }); - it("3. Hide Time picker from Datepicker", function() { + it("3. Hide Time picker from Datepicker", function () { // default value in property pane cy.openPropertyPane("datepickerwidget2"); cy.get(".t--property-control-timeprecision .bp3-popover-target") .last() .click(); - cy.get(".t--dropdown-option") - .children() - .contains("None") - .click(); + cy.get(".t--dropdown-option").children().contains("None").click(); cy.wait("@updateLayout"); // default in date picker @@ -61,17 +58,14 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.closePropertyPane(); }); - it("4. set second field in time picker for Datepicker", function() { + it("4. set second field in time picker for Datepicker", function () { // default value in property pane cy.openPropertyPane("datepickerwidget2"); cy.get(".t--property-control-timeprecision .bp3-popover-target") .last() .click(); - cy.get(".t--dropdown-option") - .children() - .contains("Second") - .click(); + cy.get(".t--dropdown-option").children().contains("Second").click(); cy.wait("@updateLayout"); // default in date picker @@ -86,7 +80,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.closePropertyPane(); }); - it("5. Text widgets binding with datepicker", function() { + it("5. Text widgets binding with datepicker", function () { cy.SearchEntityandOpen("Text1"); cy.EnableAllCodeEditors(); cy.testJsontext("text", "{{DatePicker1.formattedDate}}"); @@ -97,7 +91,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.closePropertyPane(); }); - it("6. Text widgets binding with datepicker", function() { + it("6. Text widgets binding with datepicker", function () { cy.openPropertyPane("datepickerwidget2"); cy.selectDateFormat("DD/MM/YYYY"); cy.assertDateFormat(); @@ -105,13 +99,11 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.assertDateFormat(); }); - it("7. Datepicker default date validation with js binding and default date with moment object", function() { + it("7. Datepicker default date validation with js binding and default date with moment object", function () { cy.openPropertyPane("datepickerwidget2"); //cy.testJsontext("defaultdate", ""); cy.clearPropertyValue(0); - cy.get(formWidgetsPage.toggleJsDefaultDate) - .click() - .wait(1000); //disable + cy.get(formWidgetsPage.toggleJsDefaultDate).click().wait(1000); //disable cy.get(formWidgetsPage.toggleJsDefaultDate).click(); //enable cy.EnableAllCodeEditors(); cy.testJsontext("defaultdate", `{{moment("1/1/2012")}}`); @@ -121,7 +113,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { ); }); - it("8. Datepicker clear date, validation with js binding and default date with moment object", function() { + it("8. Datepicker clear date, validation with js binding and default date with moment object", function () { // clear data and check datepicker textbox is clear cy.clearPropertyValue(0); cy.get(".t--widget-datepickerwidget2 .bp3-input").should( @@ -137,7 +129,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { ); }); - it("9. Datepicker default date validation with js binding", function() { + it("9. Datepicker default date validation with js binding", function () { cy.PublishtheApp(); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(10000); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker2_spec.js index 628a8c57e8..b9f4924089 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker2_spec.js @@ -5,7 +5,7 @@ const publishPage = require("../../../../../locators/publishWidgetspage.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); const dayjs = require("dayjs"); -describe("DatePicker Widget Functionality", function() { +describe("DatePicker Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -14,7 +14,7 @@ describe("DatePicker Widget Functionality", function() { cy.openPropertyPane("datepickerwidget"); }); - it("DatePicker-Date Name validation", function() { + it("DatePicker-Date Name validation", function () { // changing the date to today cy.get(formWidgetsPage.defaultDate).click(); cy.SetDateToToday(); @@ -35,9 +35,7 @@ describe("DatePicker Widget Functionality", function() { * @param2 --> user date formate */ cy.setDate(1, "ddd MMM DD YYYY"); - const nextDay = dayjs() - .add(1, "days") - .format("DD/MM/YYYY"); + const nextDay = dayjs().add(1, "days").format("DD/MM/YYYY"); cy.log(nextDay); cy.get(formWidgetsPage.datepickerWidget + " .bp3-input").should( "contain.value", @@ -51,10 +49,8 @@ describe("DatePicker Widget Functionality", function() { ); }); - it("Datepicker-Clear date validation", function() { - const today = dayjs() - .add(0, "days") - .format("DD/MM/YYYY"); + it("Datepicker-Clear date validation", function () { + const today = dayjs().add(0, "days").format("DD/MM/YYYY"); cy.get(formWidgetsPage.defaultDate).click(); cy.ClearDate(); cy.PublishtheApp(); @@ -145,21 +141,21 @@ describe("DatePicker Widget Functionality", function() { // ); // }); - it("DatePicker-check Visible field validation", function() { + it("DatePicker-check Visible field validation", function () { // Check the visible checkbox cy.UncheckWidgetProperties(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publishPage.datepickerWidget).should("not.exist"); }); - it("DatePicker-uncheck Visible field validation", function() { + it("DatePicker-uncheck Visible field validation", function () { // Check the visible checkbox cy.CheckWidgetProperties(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publishPage.datepickerWidget).should("be.visible"); }); - it("DatePicker-Disable field validation", function() { + it("DatePicker-Disable field validation", function () { //Check the Disabled checkbox cy.CheckWidgetProperties(commonlocators.disableCheckbox); cy.validateDisableWidget( @@ -173,7 +169,7 @@ describe("DatePicker Widget Functionality", function() { ); }); - it("DatePicker-Enable field validation", function() { + it("DatePicker-Enable field validation", function () { //UnCheck the Disabled checkbox cy.UncheckWidgetProperties(commonlocators.disableCheckbox); cy.validateEnableWidget( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePickerV2Updated_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePickerV2Updated_spec.js index a62f029cf9..053f00de3f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePickerV2Updated_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePickerV2Updated_spec.js @@ -4,7 +4,7 @@ import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; let agHelper = ObjectsRegistry.AggregateHelper; -describe("DatePicker Widget Property pane tests with js bindings", function() { +describe("DatePicker Widget Property pane tests with js bindings", function () { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); @@ -31,9 +31,7 @@ describe("DatePicker Widget required property test", () => { cy.openPropertyPane("datepickerwidget2"); cy.wait(1000); //set the required condition to true in the property pane - cy.get(".t--property-control-required label") - .last() - .click({ force: true }); + cy.get(".t--property-control-required label").last().click({ force: true }); //preview changes cy.PublishtheApp(); cy.wait(1000); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePickerV2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePickerV2_spec.js index e43f104242..0939f80a56 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePickerV2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePickerV2_spec.js @@ -8,7 +8,7 @@ import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; let agHelper = ObjectsRegistry.AggregateHelper; -describe("DatePicker Widget Property pane tests with js bindings", function() { +describe("DatePicker Widget Property pane tests with js bindings", function () { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); @@ -21,7 +21,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.addDsl(dsl); }); - it("1. Datepicker default date validation with js binding", function() { + it("1. Datepicker default date validation with js binding", function () { cy.wait(7000); cy.openPropertyPane("datepickerwidget2"); cy.get(".t--property-control-defaultdate .bp3-input").clear(); @@ -47,7 +47,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { */ }); - it("2. Text widgets binding with datepicker", function() { + it("2. Text widgets binding with datepicker", function () { cy.openPropertyPane("textwidget"); cy.testJsontext("text", "{{DatePicker1.formattedDate}}"); cy.closePropertyPane(); @@ -57,7 +57,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.closePropertyPane(); }); - it("3. Text widgets binding with datepicker", function() { + it("3. Text widgets binding with datepicker", function () { cy.openPropertyPane("datepickerwidget2"); cy.selectDateFormat("YYYY-MM-DD"); cy.assertDateFormat(); @@ -72,7 +72,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.assertDateFormat(); }); - it("4. Datepicker default date validation message", function() { + it("4. Datepicker default date validation message", function () { cy.openPropertyPane("datepickerwidget2"); cy.testJsontext("defaultdate", "24-12-2021"); cy.evaluateErrorMessage("Value does not match: ISO 8601 date string"); @@ -109,7 +109,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { ); }); - it("6. Datepicker default date validation with strings", function() { + it("6. Datepicker default date validation with strings", function () { cy.addDsl(datedsl); cy.openPropertyPane("datepickerwidget2"); cy.get(formWidgetsPage.toggleJsDefaultDate).click(); @@ -124,7 +124,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.closePropertyPane(); }); - it("7. Datepicker input value changes to work with selected date formats", function() { + it("7. Datepicker input value changes to work with selected date formats", function () { cy.openPropertyPane("datepickerwidget2"); cy.get(".t--property-control-mindate .bp3-input") .clear() @@ -155,7 +155,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { .should("contain.text", "May 4, 2021 6:25 AM"); }); - it("8. Check isDirty meta property", function() { + it("8. Check isDirty meta property", function () { cy.addDsl(datedsl); cy.openPropertyPane("textwidget"); cy.updateCodeInput(".t--property-control-text", `{{DatePicker1.isDirty}}`); @@ -171,9 +171,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { ); cy.closePropertyPane(); // Check if initial value of isDirty is false - cy.get(".t--widget-textwidget") - .first() - .should("contain", "false"); + cy.get(".t--widget-textwidget").first().should("contain", "false"); // Interact with UI cy.get(".t--draggable-datepickerwidget2 .bp3-input") .clear({ @@ -182,9 +180,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { .type("04/05/2021 06:25"); cy.wait("@updateLayout"); // Check if isDirty is set to true - cy.get(".t--widget-textwidget") - .first() - .should("contain", "true"); + cy.get(".t--widget-textwidget").first().should("contain", "true"); // Change defaultDate cy.openPropertyPane("datepickerwidget2"); cy.testJsontext("defaultdate", ""); @@ -196,12 +192,10 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { '{{moment("07/05/2021 05:25", "DD/MM/YYYY HH:mm").toISOString()}}', ); // Check if isDirty is reset to false - cy.get(".t--widget-textwidget") - .first() - .should("contain", "false"); + cy.get(".t--widget-textwidget").first().should("contain", "false"); }); - it("9. Datepicker default date validation with js binding", function() { + it("9. Datepicker default date validation with js binding", function () { cy.PublishtheApp(); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(10000); @@ -209,7 +203,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { }); }); -describe("DatePicker Widget Property tests onFocus and onBlur", function() { +describe("DatePicker Widget Property tests onFocus and onBlur", function () { it("onBlur and onFocus should be triggered from the datePicker widget", () => { cy.Createpage("New Page"); cy.dragAndDropToCanvas("datepickerwidget2", { x: 300, y: 600 }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker_Toggle_js_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker_Toggle_js_spec.js index 9fcfc1176f..5cfdd24163 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker_Toggle_js_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker_Toggle_js_spec.js @@ -2,7 +2,7 @@ const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); const dsl = require("../../../../../fixtures/newFormDsl.json"); const publishPage = require("../../../../../locators/publishWidgetspage.json"); -describe("DatePicker Widget Property pane tests with js bindings", function() { +describe("DatePicker Widget Property pane tests with js bindings", function () { before(() => { cy.addDsl(dsl); }); @@ -11,7 +11,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.openPropertyPane("datepickerwidget"); }); - it("Datepicker default date validation with js binding", function() { + it("Datepicker default date validation with js binding", function () { cy.get(".t--property-control-defaultdate .bp3-input").clear(); cy.get(formWidgetsPage.toggleJsDefaultDate).click(); cy.testJsontext( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker_With_Switch_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker_With_Switch_spec.js index 9d510578b1..139c8b4674 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker_With_Switch_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker_With_Switch_spec.js @@ -4,11 +4,11 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/datepicker_switchDsl.json"); const dayjs = require("dayjs"); -describe("Switch Widget within Form widget Functionality", function() { +describe("Switch Widget within Form widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Switch Widget Functionality check with success message", function() { + it("Switch Widget Functionality check with success message", function () { cy.openPropertyPane("switchwidget"); cy.widgetText( "Toggler", @@ -22,7 +22,7 @@ describe("Switch Widget within Form widget Functionality", function() { cy.closePropertyPane(); }); - it("Date Widget with Reset widget being switch widget", function() { + it("Date Widget with Reset widget being switch widget", function () { cy.SearchEntityandOpen("DatePicker1"); cy.get(formWidgetsPage.defaultDate).click(); cy.SetDateToToday(); @@ -37,10 +37,7 @@ describe("Switch Widget within Form widget Functionality", function() { .contains("Reset widget") .click(); cy.get(widgetsPage.selectWidget).click({ force: true }); - cy.get(commonlocators.chooseAction) - .children() - .contains("Toggler") - .click(); + cy.get(commonlocators.chooseAction).children().contains("Toggler").click(); cy.closePropertyPane(); cy.get(widgetsPage.switchWidget).click(); cy.get(widgetsPage.toastMsg) @@ -54,7 +51,7 @@ describe("Switch Widget within Form widget Functionality", function() { cy.get(widgetsPage.switchWidgetInactive).should("be.visible"); }); - it("DatePicker-Date change and validate switch widget status", function() { + it("DatePicker-Date change and validate switch widget status", function () { cy.get(widgetsPage.datepickerInput).click({ force: true }); cy.SetDateToToday(); cy.get(widgetsPage.switchWidgetActive).should("be.visible"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Disabled_Widgets_drag_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Disabled_Widgets_drag_validation_spec.js index b99ccf714f..c947eaf888 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Disabled_Widgets_drag_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Disabled_Widgets_drag_validation_spec.js @@ -1,20 +1,18 @@ const dsl = require("../../../../fixtures/disabledWidgetsDsl.json"); const explorer = require("../../../../locators/explorerlocators.json"); -describe("Disabled Widgets drag Functionality", function() { +describe("Disabled Widgets drag Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Should be able to drag disabled button", function() { + it("Should be able to drag disabled button", function () { const selector = ".t--draggable-buttonwidget button"; cy.wait(1000); cy.get(selector).then((button) => { cy.wrap(button[0].getBoundingClientRect()).as("initialPosition"); }); - cy.get(selector) - .realHover() - .trigger("dragstart", { force: true }); + cy.get(selector).realHover().trigger("dragstart", { force: true }); cy.get(explorer.dropHere) .trigger("mousemove", 200, 300, { eventConstructor: "MouseEvent" }) .trigger("mouseup", 200, 300, { eventConstructor: "MouseEvent" }); @@ -29,15 +27,13 @@ describe("Disabled Widgets drag Functionality", function() { ); }); - it("Should be able to drag disabled menu button", function() { + it("Should be able to drag disabled menu button", function () { const selector = ".t--draggable-menubuttonwidget button"; cy.wait(1000); cy.get(selector).then((button) => { cy.wrap(button[0].getBoundingClientRect()).as("initialPosition"); }); - cy.get(selector) - .realHover() - .trigger("dragstart", { force: true }); + cy.get(selector).realHover().trigger("dragstart", { force: true }); cy.get(explorer.dropHere) .trigger("mousemove", 600, 300, { eventConstructor: "MouseEvent" }) .trigger("mouseup", 600, 300, { eventConstructor: "MouseEvent" }); @@ -52,15 +48,13 @@ describe("Disabled Widgets drag Functionality", function() { ); }); - it("Should be able to drag disabled icon button", function() { + it("Should be able to drag disabled icon button", function () { const selector = ".t--draggable-iconbuttonwidget button"; cy.wait(1000); cy.get(selector).then((button) => { cy.wrap(button[0].getBoundingClientRect()).as("initialPosition"); }); - cy.get(selector) - .realHover() - .trigger("dragstart", { force: true }); + cy.get(selector).realHover().trigger("dragstart", { force: true }); cy.get(explorer.dropHere) .trigger("mousemove", 200, 200, { eventConstructor: "MouseEvent" }) .trigger("mouseup", 200, 200, { eventConstructor: "MouseEvent" }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/DocumentViewer/DocumentViewer_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/DocumentViewer/DocumentViewer_spec.ts index cddd7a81bd..1e70104675 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/DocumentViewer/DocumentViewer_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/DocumentViewer/DocumentViewer_spec.ts @@ -1,5 +1,8 @@ import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; -import { encodedWordDoc, encodedXlsxDoc } from "../../../../../fixtures/exampleEncodedDocs"; +import { + encodedWordDoc, + encodedXlsxDoc, +} from "../../../../../fixtures/exampleEncodedDocs"; const ee = ObjectsRegistry.EntityExplorer, locator = ObjectsRegistry.CommonLocators, deployMode = ObjectsRegistry.DeployMode, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/DropDownWidget_value_reset_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/DropDownWidget_value_reset_spec.js index 7a902269f2..6d809bd98c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/DropDownWidget_value_reset_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/DropDownWidget_value_reset_spec.js @@ -1,18 +1,16 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/dropDownWidget_reset_check_dsl.json"); -describe("Dropdown Widget Check value does not reset on navigation", function() { +describe("Dropdown Widget Check value does not reset on navigation", function () { before(() => { cy.addDsl(dsl); }); - it("check if the dropdown value does not change on navigation", function() { + it("check if the dropdown value does not change on navigation", function () { //Change the value of drop down; cy.wait(4000); //settling time for dsl into layout - cy.get(commonlocators.selectButton) - .last() - .click(); + cy.get(commonlocators.selectButton).last().click(); cy.selectWidgetOnClickOption("Red"); cy.wait(200); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/Dropdown_onOptionChange_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/Dropdown_onOptionChange_spec.js index d8c0f5f131..82ab57a99b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/Dropdown_onOptionChange_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/Dropdown_onOptionChange_spec.js @@ -6,13 +6,13 @@ const dsl = require("../../../../../fixtures/newFormDsl.json"); const data = require("../../../../../fixtures/example.json"); const datasource = require("../../../../../locators/DatasourcesEditor.json"); -describe("Dropdown Widget Functionality", function() { +describe("Dropdown Widget Functionality", function () { before(() => { cy.addDsl(dsl); cy.wait(3000); }); - it("1. Dropdown-Modal Validation", function() { + it("1. Dropdown-Modal Validation", function () { cy.CheckAndUnfoldWidgets(); cy.SearchEntityandOpen("Dropdown1"); cy.EnableAllCodeEditors(); @@ -34,7 +34,7 @@ describe("Dropdown Widget Functionality", function() { // ); }); - it("2. Dropdown-Call-Api Validation", function() { + it("2. Dropdown-Call-Api Validation", function () { //creating an api and calling it from the onOptionChangeAction of the Dropdown widget. // Creating the api cy.NavigateToAPI_Panel(); @@ -68,7 +68,7 @@ describe("Dropdown Widget Functionality", function() { cy.get(formWidgetsPage.apiCallToast).should("have.text", "Success"); }); - it("3. Dropdown-Call-Query Validation", function() { + it("3. Dropdown-Call-Query Validation", function () { //creating a query and calling it from the onOptionChangeAction of the Dropdown widget. // Creating a mock query // cy.CreateMockQuery("Query1"); @@ -120,7 +120,7 @@ describe("Dropdown Widget Functionality", function() { cy.get(formWidgetsPage.apiCallToast).should("have.text", "Success"); }); - it("4. Toggle JS - Dropdown-Call-Query Validation", function() { + it("4. Toggle JS - Dropdown-Call-Query Validation", function () { //creating an api and calling it from the onOptionChangeAction of the button widget. // calling the existing api cy.SearchEntityandOpen("Dropdown1"); @@ -142,7 +142,7 @@ describe("Dropdown Widget Functionality", function() { cy.get(formWidgetsPage.apiCallToast).should("have.text", "Success"); }); - it("5. Toggle JS - Dropdown-CallAnApi Validation", function() { + it("5. Toggle JS - Dropdown-CallAnApi Validation", function () { //creating an api and calling it from the onOptionChangeAction of the button widget. // calling the existing api cy.SearchEntityandOpen("Dropdown1"); @@ -164,16 +164,14 @@ describe("Dropdown Widget Functionality", function() { cy.openPropertyPane("selectwidget"); // Click on onOptionChange JS button cy.get(formWidgetsPage.toggleOnOptionChange).click({ force: true }); - cy.get(commonlocators.dropdownSelectButton) - .eq(0) - .click(); + cy.get(commonlocators.dropdownSelectButton).eq(0).click(); cy.get(commonlocators.chooseAction) .children() .contains("No action") .click(); }); - it("6. Dropdown Widget Functionality to Verify On Option Change Action", function() { + it("6. Dropdown Widget Functionality to Verify On Option Change Action", function () { // Open property pane cy.SearchEntityandOpen("Dropdown1"); // Dropdown On Option Change diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/Dropdown_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/Dropdown_spec.js index b2ad330911..4d40130539 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/Dropdown_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/Dropdown_spec.js @@ -4,7 +4,7 @@ const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); const commonlocators = require("../../../../../locators/commonlocators.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); -describe("Dropdown Widget Functionality", function() { +describe("Dropdown Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -140,7 +140,7 @@ describe("Dropdown Widget Functionality", function() { ).should("exist"); }); - it("Dropdown Functionality To Check disabled Widget", function() { + it("Dropdown Functionality To Check disabled Widget", function () { cy.openPropertyPane("selectwidget"); // Disable the visible JS cy.togglebarDisable(commonlocators.visibleCheckbox); @@ -150,7 +150,7 @@ describe("Dropdown Widget Functionality", function() { cy.goToEditFromPublish(); }); - it("Dropdown Functionality To UnCheck disabled Widget", function() { + it("Dropdown Functionality To UnCheck disabled Widget", function () { cy.openPropertyPane("selectwidget"); // Check the visible JS cy.togglebar(commonlocators.visibleCheckbox); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePicker2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePicker2_spec.js index 4e665f5bff..a7e2b9969a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePicker2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePicker2_spec.js @@ -3,7 +3,7 @@ const dsl = require("../../../../../fixtures/newFormDsl.json"); import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("FilePicker Widget Functionality", function() { +describe("FilePicker Widget Functionality", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -13,7 +13,7 @@ describe("FilePicker Widget Functionality", function() { cy.addDsl(dsl); }); - it("1. Create API to be used in Filepicker", function() { + it("1. Create API to be used in Filepicker", function () { cy.log("Login Successful"); cy.NavigateToAPI_Panel(); cy.log("Navigation to API Panel screen successful"); @@ -26,7 +26,7 @@ describe("FilePicker Widget Functionality", function() { cy.SaveAndRunAPI(); }); - it("2. FilePicker Widget Functionality", function() { + it("2. FilePicker Widget Functionality", function () { cy.SearchEntityandOpen("FilePicker1"); //eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); @@ -34,14 +34,12 @@ describe("FilePicker Widget Functionality", function() { cy.testCodeMirror("Upload Files"); }); - it("3. It checks the loading state of filepicker on call the action", function() { + it("3. It checks the loading state of filepicker on call the action", function () { cy.SearchEntityandOpen("FilePicker1"); const fixturePath = "testFile.mov"; cy.addAPIFromLightningMenu("FirstAPI"); cy.get(commonlocators.filePickerButton).click(); - cy.get(commonlocators.filePickerInput) - .first() - .attachFile(fixturePath); + cy.get(commonlocators.filePickerInput).first().attachFile(fixturePath); cy.get(commonlocators.filePickerUploadButton).click(); cy.get(".bp3-spinner").should("have.length", 1); //eslint-disable-next-line cypress/no-unnecessary-waiting @@ -49,11 +47,9 @@ describe("FilePicker Widget Functionality", function() { cy.get("button").contains("1 files selected"); }); - it("4. It checks the deletion of filepicker works as expected", function() { + it("4. It checks the deletion of filepicker works as expected", function () { cy.get(commonlocators.filePickerButton).click(); - cy.get(commonlocators.filePickerInput) - .first() - .attachFile("testFile.mov"); + cy.get(commonlocators.filePickerInput).first().attachFile("testFile.mov"); cy.get(commonlocators.filePickerUploadButton).click(); //eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); @@ -63,9 +59,7 @@ describe("FilePicker Widget Functionality", function() { cy.wait(200); cy.get("button.uppy-Dashboard-Item-action--remove").click(); cy.get("button.uppy-Dashboard-browse").click(); - cy.get(commonlocators.filePickerInput) - .first() - .attachFile("testFile2.mov"); + cy.get(commonlocators.filePickerInput).first().attachFile("testFile2.mov"); cy.get(commonlocators.filePickerUploadButton).click(); //eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_CSV_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_CSV_spec.js index 308e443729..7991415e7a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_CSV_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_CSV_spec.js @@ -27,9 +27,7 @@ describe("File picker widget v2", () => { cy.get( `.t--property-control-dataformat ${commonlocators.helperText}`, ).contains(ARRAY_CSV_HELPER_TEXT); - cy.get(commonlocators.filePickerInput) - .first() - .attachFile("Test_csv.csv"); + cy.get(commonlocators.filePickerInput).first().attachFile("Test_csv.csv"); cy.wait(3000); cy.readTableV2dataPublish("1", "1").then((tabData) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_Widget_Reskinning_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_Widget_Reskinning_spec.js index b4294bbd8f..a23c17b8bc 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_Widget_Reskinning_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_Widget_Reskinning_spec.js @@ -6,7 +6,7 @@ const dsl = require("../../../../../fixtures/filePickerV2WidgetReskinDsl.json"); const appSettings = ObjectsRegistry.AppSettings; -describe("Checkbox Widget Functionality", function() { +describe("Checkbox Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -17,9 +17,7 @@ describe("Checkbox Widget Functionality", function() { appSettings.OpenAppSettings(); appSettings.GoToThemeSettings(); - cy.get(commonlocators.themeAppBorderRadiusBtn) - .last() - .click(); + cy.get(commonlocators.themeAppBorderRadiusBtn).last().click(); appSettings.ClosePane(); cy.get(commonlocators.filepickerv2).click(); @@ -40,9 +38,7 @@ describe("Checkbox Widget Functionality", function() { // Check the border radius of close button top right cy.get(".uppy-Dashboard-close").should("have.css", "border-radius", "24px"); - cy.get(commonlocators.filePickerInput) - .first() - .attachFile("testFile.mov"); + cy.get(commonlocators.filePickerInput).first().attachFile("testFile.mov"); cy.get(".uppy-StatusBar-actionBtn--upload").should( "have.css", "border-radius", @@ -63,9 +59,7 @@ describe("Checkbox Widget Functionality", function() { cy.get(commonlocators.canvas).click({ force: true }); appSettings.OpenAppSettings(); appSettings.GoToThemeSettings(); - cy.get(commonlocators.themeAppBorderRadiusBtn) - .eq(1) - .click(); + cy.get(commonlocators.themeAppBorderRadiusBtn).eq(1).click(); appSettings.ClosePane(); cy.get(commonlocators.filepickerv2).click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_Widget_reset_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_Widget_reset_spec.js index fa82cdd7e9..312facdfd4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_Widget_reset_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_Widget_reset_spec.js @@ -3,7 +3,7 @@ const dsl = require("../../../../../fixtures/filePickerV2_reset_check_dsl.json") const Layoutpage = require("../../../../../locators/Layout.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("File Picker Widget V2 Functionality", function() { +describe("File Picker Widget V2 Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -11,23 +11,17 @@ describe("File Picker Widget V2 Functionality", function() { it("Check if the uploaded data does not reset when tab switch in the TabsWidget", () => { cy.get(widgetsPage.filepickerwidgetv2).should("contain", "Select Files"); cy.get(widgetsPage.filepickerwidgetv2).click(); - cy.get(commonlocators.filePickerInput) - .first() - .attachFile("testFile.mov"); + cy.get(commonlocators.filePickerInput).first().attachFile("testFile.mov"); cy.get(commonlocators.filePickerUploadButton).click(); cy.get(widgetsPage.filepickerwidgetv2).should( "contain", "1 files selected", ); - cy.get(Layoutpage.tabWidget) - .contains("Tab 2") - .click({ force: true }); + cy.get(Layoutpage.tabWidget).contains("Tab 2").click({ force: true }); cy.get(Layoutpage.tabWidget) .contains("Tab 2") .should("have.class", "is-selected"); - cy.get(Layoutpage.tabWidget) - .contains("Tab 1") - .click({ force: true }); + cy.get(Layoutpage.tabWidget).contains("Tab 1").click({ force: true }); cy.get(Layoutpage.tabWidget) .contains("Tab 1") .should("have.class", "is-selected"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_spec.js index e878feea8a..324f1f0b6e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_spec.js @@ -17,14 +17,12 @@ describe("File picker widget v2", () => { cy.updateCodeInput(".t--property-control-text", `{{FilePicker1.isDirty}}`); }); - it("2. Check isDirty meta property", function() { + it("2. Check isDirty meta property", function () { // Check if initial value of isDirty is false cy.get(".t--widget-textwidget").should("contain", "false"); // Upload a new file cy.get(widgetsPage.filepickerwidgetv2).click(); - cy.get(commonlocators.filePickerInput) - .first() - .attachFile("testFile.mov"); + cy.get(commonlocators.filePickerInput).first().attachFile("testFile.mov"); cy.get(commonlocators.filePickerUploadButton).click(); //eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); @@ -47,9 +45,7 @@ describe("File picker widget v2", () => { cy.wait(1000); cy.validateEvaluatedValue("testFile.mov"); - cy.get(".t--more-action-menu") - .first() - .click({ force: true }); + cy.get(".t--more-action-menu").first().click({ force: true }); // Go back to widgets page cy.get(explorer.widgetSwitchId).click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePicker_with_fileTypes_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePicker_with_fileTypes_spec.js index 8bf42be8db..dad20dd5dc 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePicker_with_fileTypes_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePicker_with_fileTypes_spec.js @@ -1,18 +1,16 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/filepickerDsl.json"); -describe("FilePicker Widget Functionality with different file types", function() { +describe("FilePicker Widget Functionality with different file types", function () { before(() => { cy.addDsl(dsl); }); - it("Check file upload of type jpeg", function() { + it("Check file upload of type jpeg", function () { cy.SearchEntityandOpen("FilePicker1"); const fixturePath = "AAAFlowerVase.jpeg"; cy.get(commonlocators.filepickerv2).click(); - cy.get(commonlocators.filePickerInput) - .first() - .attachFile(fixturePath); + cy.get(commonlocators.filePickerInput).first().attachFile(fixturePath); cy.get(commonlocators.filePickerUploadButton).click(); cy.get(commonlocators.dashboardItemName).contains("AAAFlowerVase.jpeg"); //eslint-disable-next-line cypress/no-unnecessary-waiting @@ -20,7 +18,7 @@ describe("FilePicker Widget Functionality with different file types", function() cy.get("button").contains("Upload 1 file"); }); - it("Replace an existing file type with another file type", function() { + it("Replace an existing file type with another file type", function () { cy.get(commonlocators.filepickerv2).click(); cy.get("button.uppy-Dashboard-Item-action--remove").click(); cy.get("button.uppy-Dashboard-browse").should("be.visible"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/Filepicker1_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/Filepicker1_spec.js index 96da7cafbf..32e9ed837f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/Filepicker1_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/Filepicker1_spec.js @@ -1,11 +1,9 @@ const explorer = require("../../../../../locators/explorerlocators.json"); -describe("FilePicker Widget Functionality", function() { +describe("FilePicker Widget Functionality", function () { before(() => { cy.visit("/applications"); - cy.get(".t--new-button") - .first() - .click(); + cy.get(".t--new-button").first().click(); cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas("filepickerwidgetv2", { x: 200, y: 600 }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormData_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormData_spec.js index 8537a0a905..0dea703cb9 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormData_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormData_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../../fixtures/formDataDsl.json"); -describe("Form data", function() { +describe("Form data", function () { before(() => { cy.addDsl(dsl); }); - it("CheckboxGroupWidget, MultiSelectTreeWidget, MultiSelectWidgetV2, SelectWidget, SingleSelectTreeWidget, SwitchGroupWidget, PhoneInputWidget, InputWidgetV2 and CurrencyInputWidget should have value props of which values are not null or undefined to be included as a form data", function() { + it("CheckboxGroupWidget, MultiSelectTreeWidget, MultiSelectWidgetV2, SelectWidget, SingleSelectTreeWidget, SwitchGroupWidget, PhoneInputWidget, InputWidgetV2 and CurrencyInputWidget should have value props of which values are not null or undefined to be included as a form data", function () { cy.wait("@updateLayout").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormReset_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormReset_spec.js index 9aa0124fdc..5ed40d2bab 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormReset_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormReset_spec.js @@ -1,17 +1,14 @@ const dsl = require("../../../../../fixtures/formResetDsl.json"); import widgets from "../../../../../locators/Widgets.json"; -describe("Form reset functionality", function() { +describe("Form reset functionality", function () { before(() => { cy.addDsl(dsl); }); it("Resets the form", () => { // Select a row and verify - cy.get(".tr") - .eq(2) - .click() - .should("have.class", "selected-row"); + cy.get(".tr").eq(2).click().should("have.class", "selected-row"); cy.wait(2000); cy.get(".rc-select-selection-overflow").click({ force: true }); cy.dropdownMultiSelectDynamic("Option 1"); @@ -27,9 +24,7 @@ describe("Form reset functionality", function() { // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); // verify table should not have selected row - cy.get(".tr") - .eq(2) - .should("not.have.class", "selected-row"); + cy.get(".tr").eq(2).should("not.have.class", "selected-row"); // Verify dropdown does not have selected values cy.get(`${widgets.selectWidget} .bp3-tag-input-values .bp3-tag`).should( ($span) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_Nested_HasChanges_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_Nested_HasChanges_spec.js index 740884bba8..03fb7df4a5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_Nested_HasChanges_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_Nested_HasChanges_spec.js @@ -9,9 +9,7 @@ describe("Form Widget", () => { // Check if isDirty is false for the first time cy.contains(".t--widget-textwidget", "false").should("exist"); // Interact with UI - cy.get(`.t--widget-checkboxwidget label`) - .first() - .click(); + cy.get(`.t--widget-checkboxwidget label`).first().click(); // Check if isDirty is set to true cy.contains(".t--widget-textwidget", "false").should("not.exist"); cy.contains(".t--widget-textwidget", "true").should("exist"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_Select_TreeSelect_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_Select_TreeSelect_spec.js index 664b179d84..db30e6954a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_Select_TreeSelect_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_Select_TreeSelect_spec.js @@ -2,20 +2,16 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/formSelectTreeselectDsl.json"); const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); -describe("Form Widget Functionality", function() { +describe("Form Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Validate Select and TreeSelect Widget", function() { + it("Validate Select and TreeSelect Widget", function () { cy.get(widgetsPage.formButtonWidget) .contains("Submit") .should("have.attr", "disabled"); - cy.get(formWidgetsPage.treeSelectInput) - .last() - .click({ force: true }); - cy.get(formWidgetsPage.treeSelectFilterInput) - .click() - .type("Blue"); + cy.get(formWidgetsPage.treeSelectInput).last().click({ force: true }); + cy.get(formWidgetsPage.treeSelectFilterInput).click().type("Blue"); cy.treeSelectDropdown("Blue"); cy.get(formWidgetsPage.dropdownWidget) @@ -24,9 +20,7 @@ describe("Form Widget Functionality", function() { force: true, }); cy.wait(2000); - cy.get(".select-popover-wrapper") - .contains("Blue") - .click({ force: true }); + cy.get(".select-popover-wrapper").contains("Blue").click({ force: true }); cy.wait(2000); cy.get(widgetsPage.formButtonWidget) .contains("Submit") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_With_Input_Number.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_With_Input_Number.js index 42dad29205..22b65111b6 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_With_Input_Number.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_With_Input_Number.js @@ -1,12 +1,12 @@ const dsl = require("../../../../../fixtures/formWidgetWithInputValCheckDsl.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("Form Widget with Input Functionality", function() { +describe("Form Widget with Input Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Check if the default value of text input is 0", function() { + it("Check if the default value of text input is 0", function () { //Check if the Input widget is visible cy.get(widgetsPage.inputWidget).should("be.visible"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_With_RichTextEditor_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_With_RichTextEditor_spec.js index 44d1b88ca1..8cdc43798f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_With_RichTextEditor_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_With_RichTextEditor_spec.js @@ -3,7 +3,7 @@ const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); const dsl = require("../../../../../fixtures/formWithRTEDsl.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("RichTextEditor Widget Functionality in Form", function() { +describe("RichTextEditor Widget Functionality in Form", function () { before(() => { cy.addDsl(dsl); }); @@ -13,7 +13,7 @@ describe("RichTextEditor Widget Functionality in Form", function() { cy.openPropertyPane("richtexteditorwidget"); }); - it("RichTextEditor required functionality", function() { + it("RichTextEditor required functionality", function () { //changing the Text Name cy.widgetText( this.data.RichTextEditorName, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_spec.js index 824c215fb2..f1f0823fe3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_spec.js @@ -5,11 +5,11 @@ const dsl = require("../../../../../fixtures/formdsl.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); const explorer = require("../../../../../locators/explorerlocators.json"); -describe("Form Widget Functionality", function() { +describe("Form Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Default Form text, Reset and Close button Validation", function() { + it("Default Form text, Reset and Close button Validation", function () { cy.get(widgetsPage.textWidget).should("be.visible"); cy.get(widgetsPage.formButtonWidget) .contains("Submit") @@ -20,7 +20,7 @@ describe("Form Widget Functionality", function() { .scrollIntoView() .should("be.visible"); }); - it("Add Multiple widgets in Form", function() { + it("Add Multiple widgets in Form", function () { cy.get(explorer.addWidget).click(); cy.get(commonlocators.entityExplorersearch).should("be.visible"); cy.dragAndDropToWidget("multiselectwidgetv2", "formwidget", { @@ -34,7 +34,7 @@ describe("Form Widget Functionality", function() { cy.get(widgetsPage.inputWidget).should("be.visible"); cy.PublishtheApp(); }); - it("Form_Widget Minimize and maximize General Validation", function() { + it("Form_Widget Minimize and maximize General Validation", function () { cy.openPropertyPane("formwidget"); cy.get(commonlocators.generalChevran).click({ force: true }); cy.get(commonlocators.generalSection).should("not.be.visible"); @@ -42,7 +42,7 @@ describe("Form Widget Functionality", function() { cy.get(commonlocators.generalSection).should("be.visible"); cy.PublishtheApp(); }); - it("Rename Form widget from Entity Explorer", function() { + it("Rename Form widget from Entity Explorer", function () { cy.GlobalSearchEntity("Form1"); cy.RenameEntity("Form"); cy.wait(1000); @@ -86,13 +86,13 @@ describe("Form Widget Functionality", function() { // cy.get(commonlocators.editPropCrossButton).click({ force: true }); //}); - it("Form Widget Functionality To Verify The Colour", function() { + it("Form Widget Functionality To Verify The Colour", function () { cy.PublishtheApp(); cy.get(formWidgetsPage.formD) .should("have.css", "background-color") .and("eq", "rgb(128, 128, 128)"); }); - it("Form Widget Functionality To Unchecked Visible Widget", function() { + it("Form Widget Functionality To Unchecked Visible Widget", function () { cy.openPropertyPane("formwidget"); // Uncheck the visble JS cy.togglebarDisable(commonlocators.visibleCheckbox); @@ -101,7 +101,7 @@ describe("Form Widget Functionality", function() { cy.get(publish.formWidget).should("not.exist"); cy.get(publish.backToEditor).click(); }); - it("Form Widget Functionality To Check Visible Widget", function() { + it("Form Widget Functionality To Check Visible Widget", function () { // Open property pone cy.openPropertyPane("formwidget"); // Check the visible JS @@ -111,7 +111,7 @@ describe("Form Widget Functionality", function() { cy.get(publish.formWidget).should("be.visible"); cy.get(publish.backToEditor).click(); }); - it("Toggle JS - Form-Unckeck Visible field Validation", function() { + it("Toggle JS - Form-Unckeck Visible field Validation", function () { cy.openPropertyPane("formwidget"); //Uncheck the disabled checkbox using JS and validate cy.get(widgetsPage.toggleVisible).click({ force: true }); @@ -121,14 +121,14 @@ describe("Form Widget Functionality", function() { cy.get(publish.formWidget).should("not.exist"); }); - it("Toggle JS - Form-Check Visible field Validation", function() { + it("Toggle JS - Form-Check Visible field Validation", function () { cy.openPropertyPane("formwidget"); //Check the disabled checkbox using JS and Validate cy.testJsontext("visible", "true"); cy.PublishtheApp(); cy.get(publish.formWidget).should("be.visible"); }); - it("Form-Copy Verification", function() { + it("Form-Copy Verification", function () { cy.openPropertyPane("formwidget"); const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; //Copy Form and verify all properties diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWithSwitch_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWithSwitch_spec.js index bb8022aab4..d325241675 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWithSwitch_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWithSwitch_spec.js @@ -3,11 +3,11 @@ const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/formSwitchDsl.json"); -describe("Switch Widget within Form widget Functionality", function() { +describe("Switch Widget within Form widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Switch Widget Functionality check with success message", function() { + it("Switch Widget Functionality check with success message", function () { //Open switch widget cy.openPropertyPane("switchwidget"); // Change name of switch widget @@ -27,7 +27,7 @@ describe("Switch Widget within Form widget Functionality", function() { cy.closePropertyPane(); }); - it("Form reset button valdiation with switch widget", function() { + it("Form reset button valdiation with switch widget", function () { // Open form button cy.SearchEntityandOpen("FormButton2"); // Click on reset widget action @@ -38,10 +38,7 @@ describe("Switch Widget within Form widget Functionality", function() { .click(); // click on toggler from actions cy.get(widgetsPage.selectWidget).click({ force: true }); - cy.get(commonlocators.chooseAction) - .children() - .contains("Toggler") - .click(); + cy.get(commonlocators.chooseAction).children().contains("Toggler").click(); cy.closePropertyPane(); // Uncheck the switch cy.get(widgetsPage.switchWidget).click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/Form_With_CheckBox_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/Form_With_CheckBox_spec.js index 71bb6fb6d8..3f6ceb45af 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/Form_With_CheckBox_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/Form_With_CheckBox_spec.js @@ -3,12 +3,12 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../../fixtures/formWidgetdsl.json"); -describe("Checkbox Widget Functionality", function() { +describe("Checkbox Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("1. Checkbox Functionality To Check required toggle for form", function() { + it("1. Checkbox Functionality To Check required toggle for form", function () { cy.openPropertyPane("checkboxwidget"); cy.togglebar(commonlocators.requiredjs + " " + "input"); cy.PublishtheApp(); @@ -27,7 +27,7 @@ describe("Checkbox Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("2. Checkbox Functionality To swap label alignment of checkbox", function() { + it("2. Checkbox Functionality To swap label alignment of checkbox", function () { cy.openPropertyPane("checkboxwidget"); cy.get(publish.checkboxWidget + " " + ".t--checkbox-widget-label").should( "have.css", @@ -54,16 +54,14 @@ describe("Checkbox Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("3. Checkbox Functionality To swap label position of checkbox", function() { + it("3. Checkbox Functionality To swap label position of checkbox", function () { cy.openPropertyPane("checkboxwidget"); cy.get(publish.checkboxWidget + " " + ".bp3-align-right").should( "not.exist", ); cy.get(publish.checkboxWidget + " " + ".bp3-align-left").should("exist"); - cy.get(commonlocators.optionposition) - .last() - .click({ force: true }); + cy.get(commonlocators.optionposition).last().click({ force: true }); cy.wait(200); cy.get(".t--button-group-Left").click({ force: true }); cy.wait(200); @@ -77,7 +75,7 @@ describe("Checkbox Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("4. Checkbox Functionality To change label color of checkbox", function() { + it("4. Checkbox Functionality To change label color of checkbox", function () { cy.openPropertyPane("checkboxwidget"); cy.moveToStyleTab(); cy.get(".t--property-control-fontcolor .bp3-input").type("red"); @@ -91,12 +89,10 @@ describe("Checkbox Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("5. Checkbox Functionality To change label size of checkbox", function() { + it("5. Checkbox Functionality To change label size of checkbox", function () { cy.openPropertyPane("checkboxwidget"); cy.moveToStyleTab(); - cy.get(widgetsPage.textSizeNew) - .last() - .click({ force: true }); + cy.get(widgetsPage.textSizeNew).last().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.selectTxtSize("XL"); @@ -109,7 +105,7 @@ describe("Checkbox Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("6. Checkbox Functionality To change label style of checkbox", function() { + it("6. Checkbox Functionality To change label style of checkbox", function () { cy.openPropertyPane("checkboxwidget"); cy.moveToStyleTab(); cy.get(".t--property-control-emphasis .t--button-group-BOLD").click({ diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Iframe/Iframe_onSrcDocChange_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Iframe/Iframe_onSrcDocChange_spec.js index 19fc750743..f2d305f81b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Iframe/Iframe_onSrcDocChange_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Iframe/Iframe_onSrcDocChange_spec.js @@ -4,20 +4,20 @@ const homePage = ObjectsRegistry.HomePage; const agHelper = ObjectsRegistry.AggregateHelper; const page1 = "Page1"; -describe("Iframe Widget functionality", function() { - before(function() { +describe("Iframe Widget functionality", function () { + before(function () { agHelper.ClearLocalStorageCache(); }); - beforeEach(function() { + beforeEach(function () { agHelper.RestoreLocalStorageCache(); }); - afterEach(function() { + afterEach(function () { agHelper.SaveLocalStorageCache(); }); - it("1.Import application json", function() { + it("1.Import application json", function () { cy.visit("/applications"); homePage.ImportApp("IframeOnSrcDocChange.json"); cy.wait("@importNewApplication").then((interception) => { @@ -37,20 +37,12 @@ describe("Iframe Widget functionality", function() { it("2.Check the OnSrcDocChange event call on first render", () => { cy.reload(); cy.wait(2000); - cy.get(`.t--entity .page`) - .first() - .should("have.class", "activePage"); + cy.get(`.t--entity .page`).first().should("have.class", "activePage"); cy.openPropertyPane("iframewidget"); cy.testJsontext("srcdoc", "