From c19df98dc788204b791cd69fe3d2f31cf783be71 Mon Sep 17 00:00:00 2001 From: Aishwarya-U-R <91450662+Aishwarya-U-R@users.noreply.github.com> Date: Sat, 25 Feb 2023 00:35:19 +0530 Subject: [PATCH] test: Cypress tests - Grouping logical it blocks - Part 1 (#20305) ## Description - This PR includes the grouping of logical & extremely small it blocks into one hence reducing the number of existing test scripts. ## Type of change - Script update ## How Has This Been Tested? - Cypress CI runs ## Checklist: ### QA activity: - [X] Test plan has been peer reviewed by QA - [X] Cypress test cases have been added and approved by either SDET or manual QA - [X] Added Test Plan Approved label after reveiwing all Cypress test --------- Co-authored-by: Apple Co-authored-by: Parthvi Goswami --- .../Application/CurrencyInputIssue_Spec.js | 17 +--------- .../Application/EchoApiCMS_spec.js | 4 +-- .../ImportExportForkApplication_spec.js | 6 ++-- .../Application/PromisesApp_spec.js | 8 ++--- .../Application/ReconnectDatasource_spec.js | 2 +- .../ActionExecution/Error_handling_spec.js | 17 +++++----- .../ActionExecution/setInterval_spec.js | 25 ++++++-------- .../AdminSettings/Admin_settings_spec.js | 20 +++++------ .../AuditLogs/Audit_logs_spec.js | 2 +- .../Autocomplete/Autocomplete_JS_spec.ts | 2 +- .../PropertyPaneSuggestion_spec.ts | 6 ++-- .../Autocomplete/autocomplete_spec.js | 4 +-- .../ClientSideTests/Branding/Branding_spec.js | 20 +++-------- .../PropertyPaneCodeComment_spec.ts | 4 +-- .../DynamicHeight/DynamicHeight_Tab_spec.js | 8 ++--- .../Generate_Crud_New_Page_spec.ts | 6 ++-- .../Git/GitSync/Connection_spec.js | 28 ++------------- .../Git/GitSync/Deploy_spec.js | 17 ---------- .../Git/GitSync/RegenerateSSHKey_spec.js | 21 ++---------- .../Git/GitSync/SwitchBranches_spec.js | 21 ++++-------- .../FirstTimeUserOnboarding_spec.js | 30 +++++----------- .../Button/Button_onClickAction_spec.js | 4 +-- ...ble_Derived_Column_Data_validation_spec.js | 12 ++----- .../TableV1/Table_EmptyRow_Color_spec.js | 3 +- .../TableV1/Table_FilteredTableData_spec.js | 10 ++---- .../TableV1/Table_MultiRowSelect_spec.js | 11 ++---- ...dget_Derived_Column_Computed_value_spec.js | 4 +-- .../Widgets/TableV2/TableV2_misc.js | 10 +++--- .../CreateAppWithSameNameInWorkspace_spec.js | 2 +- .../CreateSameAppInDiffWorkspace_spec.js | 9 ++--- .../Workspace/LeaveWorkspaceTest_spec.js | 16 ++------- .../Workspace/LoginFromUIApp_spec.js | 8 ++--- .../Workspace/ShareAppTests_spec.js | 14 +------- .../Workspace/UpdateWorkspaceTests_spec.js | 32 ++++++++--------- .../WorkspaceSettings_validation_spec.js | 34 ------------------- .../Workspace/WorkspaceUserIconTest_spec.js | 30 ---------------- ...n_spec.js => Workspace_validation_spec.js} | 24 ++++++++++--- 37 files changed, 138 insertions(+), 353 deletions(-) delete mode 100644 app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/WorkspaceSettings_validation_spec.js delete mode 100644 app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/WorkspaceUserIconTest_spec.js rename app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/{Workspacename_validation_spec.js => Workspace_validation_spec.js} (63%) 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 1de920a025..58337671f3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/CurrencyInputIssue_Spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/CurrencyInputIssue_Spec.js @@ -12,19 +12,7 @@ const wiggetClass = `.t--widget-${widgetName}`; const widgetInput = `${wiggetClass} input`; describe("Currency Input Issue", function() { - before(function() { - agHelper.ClearLocalStorageCache(); - }); - - beforeEach(function() { - agHelper.RestoreLocalStorageCache(); - }); - - afterEach(function() { - agHelper.SaveLocalStorageCache(); - }); - - it("1. Import application json", 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) => { @@ -39,9 +27,6 @@ describe("Currency Input Issue", function() { homePage.AssertImportToast(); } }); - }); - - it("2. should check that the widget input is not showing any error", function() { cy.get(widgetInput).type("123456789"); cy.focused().then(() => { cy.get(themelocators.popover).should("not.exist"); 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 1ede5dad28..8758432268 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/EchoApiCMS_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/EchoApiCMS_spec.js @@ -7,9 +7,6 @@ describe("Content Management System App", function() { before(() => { cy.addDsl(dsl); }); - beforeEach(() => { - cy.startRoutesForDatasource(); - }); it("1.Create Get echo Api call", function() { cy.NavigateToAPI_Panel(); @@ -126,6 +123,7 @@ describe("Content Management System App", function() { cy.ResponseCheck("Dan.Wyman@hotmail.com"); cy.ResponseCheck("Recusan"); }); + /*it("6. Connect app to git, verify data binding in edit and deploy mode", ()=>{ cy.get(`.t--entity-name:contains("Page1")`) .should("be.visible") 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 0ef5c185a7..17a5409e02 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/ImportExportForkApplication_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/ImportExportForkApplication_spec.js @@ -5,7 +5,7 @@ describe("Import, Export and Fork application and validate data binding", functi let workspaceId; let newWorkspaceName; let appName; - it("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) @@ -59,7 +59,7 @@ describe("Import, Export and Fork application and validate data binding", functi }); }); - it("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}`); @@ -81,7 +81,7 @@ describe("Import, Export and Fork application and validate data binding", functi cy.xpath("//span[text()='due']").should("be.visible"); }); - it("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() 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 ca6415c1b5..b5de5c9338 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/PromisesApp_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/PromisesApp_spec.js @@ -2,17 +2,13 @@ import * as _ from "../../../support/Objects/ObjectsCore"; const homePage = require("../../../locators/HomePage"); const dsl = require("../../../fixtures/promisesStoreValueDsl.json"); const commonlocators = require("../../../locators/commonlocators.json"); -const jsEditorLocators = require("../../../locators/JSEditor.json"); describe("JSEditor tests", function() { before(() => { cy.addDsl(dsl); }); - beforeEach(() => { - cy.startServerAndRoutes(); - }); - it("Testing promises with resetWidget, storeValue action and API call", () => { + it("1. Testing promises with resetWidget, storeValue action and API call", () => { _.apiPage.CreateAndFillApi(_.agHelper.mockApiUrl, "TC1api"); _.apiPage.RunAPI(); _.jsEditor.CreateJSObject( @@ -118,7 +114,7 @@ describe("JSEditor tests", function() { }); //Skipping reason? to add - it.skip("Testing dynamic widgets display using consecutive storeValue calls", () => { + it.skip("2. Testing dynamic widgets display using consecutive storeValue calls", () => { _.ee.SelectEntityByName("JSObject1", "Queries/JS"); _.jsEditor.SelectFunctionDropdown("clearStore"); _.jsEditor.RunJSObj(); 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 ddd18c9d4a..71989b80ff 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/ReconnectDatasource_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/ReconnectDatasource_spec.js @@ -7,7 +7,7 @@ describe("Reconnect Datasource Modal validation while importing application", fu let appid; let newWorkspaceName; let appName; - it("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/Error_handling_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/Error_handling_spec.js index d219542211..e2e987402d 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 @@ -2,18 +2,19 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const dsl = require("../../../../fixtures/buttonApiDsl.json"); const widgetsPage = require("../../../../locators/Widgets.json"); const publishPage = require("../../../../locators/publishWidgetspage.json"); +let dataSet; describe("Test Create Api and Bind to Button widget", function() { - before(() => { + before("Test_Add users api and execute api", () => { cy.addDsl(dsl); + cy.fixture("example").then(function(data) { + dataSet = data; + cy.createAndFillApi(dataSet.userApi, "/random"); + cy.RunAPI(); + }); }); - it("Test_Add users api and execute api", function() { - cy.createAndFillApi(this.data.userApi, "/random"); - cy.RunAPI(); - }); - - it("Call the api without error handling", () => { + it("1. Call the api without error handling", () => { cy.SearchEntityandOpen("Button1"); cy.get(widgetsPage.toggleOnClick) .invoke("attr", "class") @@ -48,7 +49,7 @@ describe("Test Create Api and Bind to Button widget", function() { cy.get(publishPage.backToEditor).click({ force: true }); }); - it("Call the api with error handling", () => { + it("2. Call the api with error handling", () => { cy.SearchEntityandOpen("Button1"); cy.get(".t--property-control-onclick").then(($el) => { 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 dba44d2c14..0c0eaba17e 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 @@ -4,16 +4,18 @@ const widgetsPage = require("../../../../locators/Widgets.json"); const publishPage = require("../../../../locators/publishWidgetspage.json"); describe("Test Create Api and Bind to Button widget", function() { - before(() => { + let dataSet; + before("Test_Add users api and execute api", () => { cy.addDsl(dsl); + + cy.fixture("example").then(function(data) { + dataSet = data; + cy.createAndFillApi(dataSet.userApi, "/users"); + cy.RunAPI(); + }); }); - it("Test_Add users api and execute api", function() { - cy.createAndFillApi(this.data.userApi, "/users"); - cy.RunAPI(); - }); - - it("selects set interval function", () => { + it("1. Selects set interval function, Fill setInterval action creator and test code generated ", () => { cy.SearchEntityandOpen("Button1"); cy.get(widgetsPage.buttonOnClick) .last() @@ -22,9 +24,7 @@ describe("Test Create Api and Bind to Button widget", function() { .children() .contains("Set interval") .click(); - }); - it("Fill setInterval action creator and test code generated", () => { cy.get(widgetsPage.toggleOnClick) .invoke("attr", "class") .then((classes) => { @@ -60,7 +60,7 @@ describe("Test Create Api and Bind to Button widget", function() { cy.get(widgetsPage.toggleOnClick).click(); }); - it("works in the published version", () => { + it("2. Works in the published version", () => { cy.PublishtheApp(); cy.wait(3000); cy.get("span:contains('Submit')") @@ -81,7 +81,7 @@ describe("Test Create Api and Bind to Button widget", function() { cy.get(publishPage.backToEditor).click({ force: true }); }); - it("selects clear interval function", () => { + it("3. Selects clear interval function, Fill clearInterval action creator and test code generated", () => { cy.SearchEntityandOpen("Button1"); cy.get(widgetsPage.buttonOnClick) .last() @@ -90,9 +90,6 @@ describe("Test Create Api and Bind to Button widget", function() { .children() .contains("Clear interval") .click(); - }); - - it("Fill clearInterval action creator and test code generated", () => { cy.get("label") .contains("Id") .parent() 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 b01b076c98..23f8360282 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 @@ -15,7 +15,7 @@ describe("Admin settings page", function() { }).as("postEnvVariables"); }); - it("should test that settings page is accessible to super user", () => { + it("1. Should test that settings page is accessible to super user", () => { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); @@ -26,7 +26,7 @@ describe("Admin settings page", function() { cy.LogOut(); }); - it("should test that settings page is not accessible to normal users", () => { + it("2. Should test that settings page is not accessible to normal users", () => { cy.wait(2000); cy.LoginFromAPI(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1")); cy.visit("/applications"); @@ -37,7 +37,7 @@ describe("Admin settings page", function() { cy.LogOut(); }); - it("should test that settings page is redirected to default tab", () => { + it("3. Should test that settings page is redirected to default tab", () => { cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); cy.wait(3000); @@ -45,7 +45,7 @@ describe("Admin settings page", function() { cy.url().should("contain", "/settings/general"); }); - it("should test that settings page tab redirects", () => { + it("4. Should test that settings page tab redirects", () => { cy.visit("/applications"); cy.wait(3000); cy.get(".admin-settings-menu-option").click(); @@ -63,7 +63,7 @@ describe("Admin settings page", function() { cy.url().should("contain", "/settings/version"); }); - it("should test that authentication page redirects", () => { + it("5. Should test that authentication page redirects", () => { cy.visit("/settings/general"); cy.get(adminsSettings.authenticationTab).click(); cy.url().should("contain", "/settings/authentication"); @@ -79,7 +79,7 @@ describe("Admin settings page", function() { cy.url().should("contain", "/settings/authentication/form-login"); }); - it("should test that configure link redirects to google signup setup doc", () => { + it("6. Should test that configure link redirects to google signup setup doc", () => { cy.visit("/settings/general"); cy.get(adminsSettings.authenticationTab).click(); cy.url().should("contain", "/settings/authentication"); @@ -94,7 +94,7 @@ describe("Admin settings page", function() { }); }); - it("should test that configure link redirects to github signup setup doc", () => { + it("7. Should test that configure link redirects to github signup setup doc", () => { cy.visit("/settings/general"); cy.get(adminsSettings.authenticationTab).click(); cy.url().should("contain", "/settings/authentication"); @@ -109,7 +109,7 @@ describe("Admin settings page", function() { }); }); - it("should test save and clear buttons disabled state", () => { + it("8. Should test save and clear buttons disabled state", () => { cy.visit("/settings/general"); const assertVisibilityAndDisabledState = () => { cy.get(adminsSettings.saveButton).should("be.visible"); @@ -130,7 +130,7 @@ describe("Admin settings page", function() { assertVisibilityAndDisabledState(); }); - it("should test saving a setting value", () => { + it("9. Should test saving a setting value", () => { cy.visit("/settings/general"); cy.get(adminsSettings.restartNotice).should("not.exist"); cy.get(adminsSettings.instanceName).should("be.visible"); @@ -158,7 +158,7 @@ describe("Admin settings page", function() { cy.wait(3000); }); - it("should test saving settings value from different tabs", () => { + it("10.Should test saving settings value from different tabs", () => { cy.visit("/settings/general"); cy.get(adminsSettings.restartNotice).should("not.exist"); cy.get(adminsSettings.instanceName).should("be.visible"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/AuditLogs/Audit_logs_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/AuditLogs/Audit_logs_spec.js index 1d3dd5273c..49b3923564 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/AuditLogs/Audit_logs_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/AuditLogs/Audit_logs_spec.js @@ -26,7 +26,7 @@ const UpgradePage = { const locators = { ...Access, ...UpgradePage }; describe("Audit logs", () => { - it("super user can access audit logs page", () => { + it("1. Super user can access audit logs page", () => { if (Cypress.env("Edition") === 0) { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/Autocomplete_JS_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/Autocomplete_JS_spec.ts index e19733065c..44161e4277 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/Autocomplete_JS_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/Autocomplete_JS_spec.ts @@ -333,7 +333,7 @@ describe("Autocomplete tests", () => { ); }); - it("9. Bug #10115 Autocomplete needs to show async await keywords instead of showing 'no suggestions'", () => { + it("10. Bug #10115 Autocomplete needs to show async await keywords instead of showing 'no suggestions'", () => { // create js object jsEditor.CreateJSObject(jsObjectBody, { paste: true, 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 85bee13666..d56a47c99a 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 @@ -14,7 +14,7 @@ describe("Property Pane Suggestions", () => { }); }); - it("1. Should show Property Pane Suggestions on / command", () => { + it("1. Should show Property Pane Suggestions on / command & when typing {{}}", () => { EntityExplorer.SelectEntityByName("Button1", "Widgets"); PropertyPane.TypeTextIntoField("Label", "/"); AggregateHelper.GetNAssertElementText(CommonLocators._hints, "Bind Data"); @@ -25,11 +25,9 @@ describe("Property Pane Suggestions", () => { 1, ); AggregateHelper.GetNClickByContains(CommonLocators._hints, "New Binding"); - PropertyPane.ValidatePropertyFieldValue("Label", "{{}}"); - }); - it("2. Should show Property Pane Suggestions on typing {{}}", () => { + //typing {{}} EntityExplorer.SelectEntityByName("Button1", "Widgets"); PropertyPane.TypeTextIntoField("Label", "{{"); AggregateHelper.GetNAssertElementText(CommonLocators._hints, "appsmith"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/autocomplete_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/autocomplete_spec.js index df80ffa5a9..12e6450ec0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/autocomplete_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/autocomplete_spec.js @@ -6,7 +6,7 @@ describe("Dynamic input autocomplete", () => { before(() => { cy.addDsl(dsl); }); - it("opens autocomplete for bindings", () => { + it("1. Opens autocomplete for bindings", () => { cy.selectEntityByName("TestModal"); cy.wait(3000); cy.selectEntityByName("Aditya"); @@ -62,7 +62,7 @@ describe("Dynamic input autocomplete", () => { cy.evaluateErrorMessage("garbage is not defined"); }); - it("test if action inside non event field throws error", () => { + it("2. Test if action inside non event field throws error & open current value popup", () => { cy.get(dynamicInputLocators.input) .first() .click({ force: true }) 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 37fc2c8236..d5eaef79a1 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 @@ -25,19 +25,7 @@ const locators = { }; describe("Branding", () => { - let logo; - let favicon; - let shades = {}; - - it("check if localStorage is populated with tenantConfig values", () => { - if (Cypress.env("Edition") === 0) { - const tenantConfig = localStorage.getItem("tenantConfig"); - - expect(tenantConfig).to.be.null; - } - }); - - it("super user can access branding page", () => { + it("1. Super user can access branding page", () => { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); @@ -49,7 +37,7 @@ describe("Branding", () => { cy.wait(2000); }); - it("should test that changing logo,favicon and color changes the preview", () => { + it("2. Should test that changing logo,favicon and color changes the preview", () => { // branding color cy.get(locators.AdminSettingsColorInput) .focus() @@ -101,8 +89,10 @@ describe("Branding", () => { ); }); - it("checks if the form can be submitted", () => { + it("3. Check if localStorage is populated with tenantConfig values & form cannot be submitted", () => { if (Cypress.env("Edition") === 0) { + const tenantConfig = localStorage.getItem("tenantConfig"); + expect(tenantConfig).to.be.null; cy.get(locators.submitButton).should("be.disabled"); } }); 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 e5c1d5013f..a95f952f64 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 @@ -15,13 +15,13 @@ describe("Property Pane Code Commenting", () => { PropertyPane.ToggleCommentInTextField("Label"); PropertyPane.ValidatePropertyFieldValue("Label", "{{// appsmith}}"); - }); - it("2. Should uncomment code in Property Pane", () => { + //Uncomment EntityExplorer.SelectEntityByName("Button1", "Widgets"); PropertyPane.TypeTextIntoField("Label", "{{// appsmith}}"); PropertyPane.ToggleCommentInTextField("Label"); PropertyPane.ValidatePropertyFieldValue("Label", "{{appsmith}}"); }); + }); 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 ac52f8a294..7a3a3aff75 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 @@ -57,9 +57,7 @@ describe("Dynamic Height Width validation for Tab widget", function() { expect(theight).to.not.equal(tnewheight); }); }); - }); - - it("Tab widget validation of height with preview mode", function() { + // it("Tab widget validation of height with preview mode", function() { _.agHelper.AssertElementVisible(_.locators._previewModeToggle("preview")); _.agHelper.GetNClick(_.locators._previewModeToggle("preview")); cy.wait(3000); @@ -92,9 +90,7 @@ describe("Dynamic Height Width validation for Tab widget", function() { }); }); }); - }); - - it("Tab widget validation of height with reload", function() { + //it("Tab widget validation of height with reload", function() { cy.wait(3000); cy.openPropertyPane("tabswidget"); cy.get(commonlocators.generalSectionHeight).should("be.visible"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/GenerateCRUD/Generate_Crud_New_Page_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/GenerateCRUD/Generate_Crud_New_Page_spec.ts index 4c27533b57..d94e065a87 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/GenerateCRUD/Generate_Crud_New_Page_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/GenerateCRUD/Generate_Crud_New_Page_spec.ts @@ -2,10 +2,10 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const { ApiPage, DataSources, EntityExplorer } = ObjectsRegistry; describe("Validate generate CRUD operation by creating a datasource from generate CRUD form", () => { - it("Generated CRUD app should work when there are no entities in the page", () => { + it("Generated CRUD app should work when there are no entities in the page & when there are entities in the current page", () => { DataSources.GeneratePageWithMockDB(); - }); - it("Generated CRUD app should work when there are entities in the current page", () => { + + //when there are entities in the current page EntityExplorer.AddNewPage("add-page"); ApiPage.CreateApi(); DataSources.GeneratePageWithMockDB(); 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 1e386bf9b2..0337555bb2 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 @@ -31,18 +31,6 @@ describe("Git sync modal: connect tab", function() { }); }); - beforeEach(() => { - // cy.intercept( - // { - // url: "api/v1/git/connect/app/*", - // hostname: window.location.host, - // }, - // (req) => { - // req.headers["origin"] = "Cypress"; - // }, - // ); - }); - it("1. validates repo URL", function() { // open gitSync modal cy.get(homePage.deployPopupOptionTrigger).click({ force: true }); @@ -102,7 +90,7 @@ describe("Git sync modal: connect tab", function() { cy.xpath(gitSyncLocators.learnMoreDeployKey).click({ force: true }); }); - it("2. validates copy key", 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) @@ -110,16 +98,6 @@ describe("Git sync modal: connect tab", function() { }); cy.get(gitSyncLocators.copySshKey).click(); - - // To Check - // cy.get("@copyToClipboardPrompt").should("be.called"); - // cy.get("@copyToClipboardPrompt").should((prompt) => { - // expect(prompt.args[0][1]).to.equal(generatedKey); - // generatedKey = generatedKey.slice(0, generatedKey.length - 1); - // }); - }); - - it("3. validates repo url input after key generation", function() { cy.get(gitSyncLocators.gitRepoInput).type(`{selectAll}${httpsRepoURL}`); cy.contains(Cypress.env("MESSAGES").PASTE_SSH_URL_INFO()); cy.get(gitSyncLocators.connectSubmitBtn).should("be.disabled"); @@ -137,7 +115,7 @@ describe("Git sync modal: connect tab", function() { cy.get(gitSyncLocators.connectSubmitBtn).should("not.be.disabled"); }); - it("4. validates git user config", function() { + it("3. validates git user config", function() { cy.get(gitSyncLocators.useGlobalGitConfig).click(); // name empty invalid @@ -205,7 +183,7 @@ describe("Git sync modal: connect tab", function() { }); }); - it("5. validates submit errors", function() { + it("4. validates submit errors", function() { cy.get(gitSyncLocators.useGlobalGitConfig).click(); cy.get(gitSyncLocators.gitConfigNameInput) .scrollIntoView() 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 f42ad7de9a..05c4480956 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 @@ -22,29 +22,12 @@ describe("Git sync modal: deploy tab", function() { // last deployed preview // The deploy preview Link should be displayed only after the first commit done cy.get(gitSyncLocators.bottomBarCommitButton).click(); - // cy.get(gitSyncLocators.deployPreview).should("not.exist"); // comment text input should not empty cy.get(gitSyncLocators.commitCommentInput) .invoke("val") .should("not.be.empty"); - // cy.get(gitSyncLocators.commitCommentInput).clear(); cy.get(gitSyncLocators.commitButton).should("be.disabled"); - /* cy.get(gitSyncLocators.commitCommentInput).type("Initial Commit"); - - cy.get(gitSyncLocators.commitButton).click(); - // check for commit success - cy.wait("@commit").should( - "have.nested.property", - "response.body.responseMeta.status", - 201, - ); */ - - // last deployed preview - // it should be updated with the each commit and push - // cy.get(gitSyncLocators.deployPreview).should("exist"); - //cy.get(gitSyncLocators.deployPreview).contains("ago"); - cy.get(gitSyncLocators.closeGitSyncModal).click(); }); 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 9333436a05..ad04d5733e 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 @@ -2,16 +2,7 @@ import gitSyncLocators from "../../../../../locators/gitSyncLocators"; import * as _ from "../../../../../support/Objects/ObjectsCore"; describe("Git regenerate SSH key flow", function() { - let repoName, newWorkspaceName; - - before(() => { - cy.NavigateToHome(); - cy.createWorkspace(); - cy.wait("@createWorkspace").then((interception) => { - newWorkspaceName = interception.response.body.data.name; - cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName); - }); - }); + let repoName; it("1. Verify SSH key regeneration flow ", () => { _.gitSync.CreateNConnectToGit(repoName); @@ -23,7 +14,7 @@ describe("Git regenerate SSH key flow", function() { cy.wait(2000); }); - it("2. Verify error meesage is displayed when ssh key is not added to github", () => { + it("2. Verify error meesage is displayed when ssh key is not added to github and verify RSA SSH key regeneration flow", () => { cy.wait(2000); cy.get(gitSyncLocators.bottomBarCommitButton).click(); cy.get("[data-cy=t--tab-GIT_CONNECTION]").click(); @@ -41,16 +32,8 @@ describe("Git regenerate SSH key flow", function() { "response.body.responseMeta.status", 400, ); - }); - - it("3. Verify RSA SSH key regeneration flow ", () => { cy.regenerateSSHKey(repoName, true, "RSA"); cy.get("body").click(0, 0); cy.wait(2000); }); - - after(() => { - //clean up - _.gitSync.DeleteTestGithubRepo(repoName); - }); }); 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 76b161c94d..eeb8adeb2e 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 @@ -25,13 +25,7 @@ describe("Git sync:", function() { cy.get("@gitRepoName").then((repName) => { repoName = repName; }); - cy.wait(3000); - // cy.generateUUID().then((uid) => { - // repoName = uid; - // cy.createTestGithubRepo(repoName); - // cy.connectToGitRepo(repoName); - // }); }); it("1. create branch input", function() { @@ -62,16 +56,13 @@ describe("Git sync:", function() { cy.get(gitSyncLocators.closeBranchList).click(); }); - it("2. creates a new branch", 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); cy.get("@gitbranchName").then((branName) => { parentBranchKey = branName; }); - }); - - it("3. creates branch specific resources", function() { cy.Createpage("ParentPage1"); cy.get(pages.addEntityAPI) .last() @@ -130,7 +121,7 @@ describe("Git sync:", function() { }); // rename entities - it("4. makes branch specific resource updates", function() { + it("3. makes branch specific resource updates", function() { cy.switchGitBranch(childBranchKey); cy.CheckAndUnfoldEntityItem("Queries/JS"); cy.CheckAndUnfoldEntityItem("Pages"); @@ -152,7 +143,7 @@ describe("Git sync:", function() { // ); }); - it("5. enables switching branch from the URL", () => { + it("4. enables switching branch from the URL", () => { cy.url().then((url) => { cy.GlobalSearchEntity("ParentPage1"); cy.contains("ParentPage1").click(); @@ -204,7 +195,7 @@ describe("Git sync:", function() { }); //Rename - hence skipping for Gitea - it.skip("6. test sync and prune branches", () => { + it.skip("5. test sync and prune branches", () => { // uncomment once prune branch flow is complete let tempBranch = "featureA"; const tempBranchRenamed = "newFeatureA"; @@ -244,7 +235,7 @@ describe("Git sync:", function() { }); // Validate the error faced when user switches between the branches - it("7. 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); @@ -264,7 +255,7 @@ describe("Git sync:", function() { cy.reload(); }); - it("8. 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/Onboarding/FirstTimeUserOnboarding_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/FirstTimeUserOnboarding_spec.js index bc7073837b..9995c27142 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 @@ -8,31 +8,17 @@ describe("FirstTimeUserOnboarding", function() { }); }); - it("onboarding flow - should check page entitiy 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"); cy.get(".t--entity-name:contains(Page1)") .trigger("mouseover") .click({ force: true }); cy.get(OnboardingLocator.dropTarget).should("be.visible"); }); - it("onboarding flow - should check check the redirection post signup", function() { - cy.get(OnboardingLocator.introModal).should("be.visible"); - }); - - it("onboarding flow - should check function of introduction modal build button", function() { - cy.get(OnboardingLocator.introModal).should("be.visible"); - cy.get(OnboardingLocator.introModalBuild).click(); - cy.get(OnboardingLocator.introModal).should("not.exist"); - }); - - it("onboarding flow - should check function of introduction modal guided tour button", function() { - cy.get(OnboardingLocator.introModalWelcomeTourBtn).should("be.visible"); - cy.get(OnboardingLocator.introModalWelcomeTourBtn).click(); - cy.get(OnboardingLocator.welcomeTourBtn).should("be.visible"); - }); - - it("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(); @@ -94,7 +80,7 @@ describe("FirstTimeUserOnboarding", function() { }); }); - it("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"); @@ -136,7 +122,7 @@ describe("FirstTimeUserOnboarding", function() { cy.get(OnboardingLocator.taskWidgetBtn).should("not.exist"); }); - it("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"); @@ -147,7 +133,7 @@ describe("FirstTimeUserOnboarding", function() { cy.get(OnboardingLocator.textWidgetName).should("be.visible"); }); - it("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"); @@ -167,7 +153,7 @@ describe("FirstTimeUserOnboarding", function() { cy.get(OnboardingLocator.textWidgetName).should("be.visible"); }); - it("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(); 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 b9fbc37f56..ef431b12cf 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 @@ -146,7 +146,7 @@ describe("Button Widget Functionality", function() { cy.get("body").then(($ele) => { if ($ele.find(widgetsPage.apiCallToast).length <= 0) { cy.get(publishPage.buttonWidget).click(); - cy.wait(3000) + cy.wait(3000); } }); cy.get(widgetsPage.apiCallToast).should("have.text", "Success"); @@ -166,7 +166,7 @@ describe("Button Widget Functionality", function() { cy.get(publishPage.buttonWidget).click(); cy.wait(3000); cy.get("body").then(($ele) => { - if ($ele.find(widgetsPage.apiCallToast).length<=0) { + if ($ele.find(widgetsPage.apiCallToast).length <= 0) { cy.get(publishPage.buttonWidget).click(); cy.wait(3000); } diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Derived_Column_Data_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Derived_Column_Data_validation_spec.js index 2fbe3fd864..fd117fee17 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Derived_Column_Data_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Derived_Column_Data_validation_spec.js @@ -12,9 +12,7 @@ describe("Test Create Api and Bind to Table widget", function() { // Create and execute an API and bind with table cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam); cy.RunAPI(); - }); - - it("Validate Table with API data and then add a column", function() { + //Test: Validate Table with API data and then add a column // Open property pane cy.SearchEntityandOpen("Table1"); // Clear Table data and enter Apil data into table data @@ -36,9 +34,7 @@ describe("Test Create Api and Bind to Table widget", function() { cy.ValidateTableData("1"); // add new column cy.addColumn("CustomColumn"); - }); - - it("Table widget toggle test for background color", function() { + //Test:Table widget toggle test for background color // Open id property pane cy.editColumn("id"); // eslint-disable-next-line cypress/no-unnecessary-waiting @@ -71,9 +67,7 @@ describe("Test Create Api and Bind to Table widget", function() { }); }); cy.closePropertyPane(); - }); - - it("Update table json data and check the column names updated", function() { + //Test: Update table json data and check the column names updated // Open table propert pane cy.SearchEntityandOpen("Table1"); cy.backFromPropertyPanel(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_EmptyRow_Color_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_EmptyRow_Color_spec.js index c8aa418e2c..0b4c7c958f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_EmptyRow_Color_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_EmptyRow_Color_spec.js @@ -37,8 +37,7 @@ describe("Table Widget empty row color validation", function() { "background-color", "rgb(30, 58, 138)", ); - }); - it("2. Validate empty row background", function() { + //Test 2. Validate empty row background // first cell of first row should be transparent cy.get( ".t--widget-tablewidget .tbody div[data-cy='empty-row-0-cell-0']", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_FilteredTableData_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_FilteredTableData_spec.js index 6c5e410aca..e1e156e514 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_FilteredTableData_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_FilteredTableData_spec.js @@ -7,13 +7,10 @@ describe("Table Widget Filtered Table Data in autocomplete", function() { before(() => { cy.addDsl(dsl); }); - - it("Table Widget Functionality", function() { + + it("Table Widget Functionality To Filter and search data", function() { cy.openPropertyPane("tablewidget"); cy.wait("@updateLayout"); - }); - - it("Table Widget Functionality To Filter and search data", function() { cy.get(publish.searchInput) .first() .type("query"); @@ -40,9 +37,8 @@ describe("Table Widget Filtered Table Data in autocomplete", function() { const tableData = tabData; cy.get(commonlocators.labelTextStyle).should("have.text", tableData); }); - }); - it("Table Widget Functionality to validate filtered table data with actual table data", function() { + //Table Widget Functionality to validate filtered table data with actual table data cy.readTabledata("0", "1").then((tabData) => { const tableData = JSON.parse(dsl.dsl.children[0].tableData); cy.get(commonlocators.labelTextStyle).should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_MultiRowSelect_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_MultiRowSelect_spec.js index a965ac2463..96f7aa902e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_MultiRowSelect_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_MultiRowSelect_spec.js @@ -15,23 +15,18 @@ describe("Table Widget row multi select validation", function() { cy.get(".t--table-multiselect-header") .first() .should("be.visible"); - cy.get(".t--table-multiselect") .first() .should("be.visible"); - }); - - it("Test click on header cell selects all row", function() { + //Test click on header cell selects all row // click on header check cell cy.get(".t--table-multiselect-header") .first() .click({ force: true }); // check if rows selected cy.get(".tr").should("have.class", "selected-row"); - }); - - it("Test click on single row cell changes header select cell state", function() { - // un select all rows + //Test click on single row cell changes header select cell state + // un-select all rows cy.get(".t--table-multiselect-header") .first() .click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Derived_Column_Computed_value_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Derived_Column_Computed_value_spec.js index 4aefb60f1d..db9d295923 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Derived_Column_Computed_value_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Derived_Column_Computed_value_spec.js @@ -18,9 +18,7 @@ describe("Table Widget property pane feature validation", function() { cy.hideColumn("orderAmount"); // Validating the newly added column cy.get(".draggable-header:contains('CustomColumn')").should("be.visible"); - }); - - it("Edit column name and validate test for computed value", function() { + //Test: Edit column name and validate test for computed value // Open column detail by draggable id of the column cy.editColumn("customColumn1"); // Validating single cell value diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_misc.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_misc.js index 683c03581b..628a4c2683 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_misc.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_misc.js @@ -6,7 +6,7 @@ describe("tests bug 20663 TypeError: Cannot read properties of undefined", funct cy.addDsl(dsl); }); - it("when the column label value is a valid string should show the evaluated string", function() { + it("1. when the column label value is a valid string should show the evaluated string", function() { cy.openPropertyPane("tablewidgetv2"); cy.get( ".tablewidgetv2-primarycolumn-list div[data-rbd-draggable-id='id'] input[type=text]", @@ -22,7 +22,7 @@ describe("tests bug 20663 TypeError: Cannot read properties of undefined", funct ); }); - it("when the column label value is a boolean replace column name with default column name", function() { + it("2. when the column label value is a boolean replace column name with default column name", function() { cy.openPropertyPane("tablewidgetv2"); cy.get( ".tablewidgetv2-primarycolumn-list div[data-rbd-draggable-id='id'] input[type=text]", @@ -37,7 +37,7 @@ describe("tests bug 20663 TypeError: Cannot read properties of undefined", funct ); }); - it("when the column label value is a number replace column name with default column name", function() { + it("3. when the column label value is a number replace column name with default column name", function() { cy.openPropertyPane("tablewidgetv2"); cy.get( ".tablewidgetv2-primarycolumn-list div[data-rbd-draggable-id='id'] input[type=text]", @@ -64,7 +64,7 @@ describe("tests bug 20663 TypeError: Cannot read properties of undefined", funct ); }); - it("when the column label value is an object replace column name with default column name", function() { + it("4. when the column label value is an object replace column name with default column name", function() { cy.openPropertyPane("tablewidgetv2"); cy.get( ".tablewidgetv2-primarycolumn-list div[data-rbd-draggable-id='id'] input[type=text]", @@ -79,7 +79,7 @@ describe("tests bug 20663 TypeError: Cannot read properties of undefined", funct ); }); - it("when the column label value is undefined replace column name with default column name", function() { + it("5. when the column label value is undefined replace column name with default column name", function() { cy.openPropertyPane("tablewidgetv2"); cy.get( ".tablewidgetv2-primarycolumn-list div[data-rbd-draggable-id='id'] input[type=text]", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/CreateAppWithSameNameInWorkspace_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/CreateAppWithSameNameInWorkspace_spec.js index c990a29404..9b42f2a062 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/CreateAppWithSameNameInWorkspace_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/CreateAppWithSameNameInWorkspace_spec.js @@ -5,7 +5,7 @@ describe("Create workspace and a new app / delete and recreate app", function() let appid; let newWorkspaceName; - it("create app within an workspace and delete and re-create another app with same name", function() { + it("1. Create app within an workspace and delete and re-create another app with same name", function() { cy.NavigateToHome(); cy.generateUUID().then((uid) => { workspaceId = uid; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/CreateSameAppInDiffWorkspace_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/CreateSameAppInDiffWorkspace_spec.js index 74ea1120fd..c74df42fa7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/CreateSameAppInDiffWorkspace_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/CreateSameAppInDiffWorkspace_spec.js @@ -4,16 +4,14 @@ describe("Create app same name in different workspace", function() { let workspaceId; let appid; let newWorkspaceName; - - it("create app within a new workspace", function() { + before(() => { + //create app within a new workspace cy.NavigateToHome(); cy.generateUUID().then((uid) => { workspaceId = uid; appid = uid; localStorage.setItem("WorkspaceName", workspaceId); cy.createWorkspace(); - // stub the response and - // find app name cy.wait("@createWorkspace").then((interception) => { newWorkspaceName = interception.response.body.data.name; cy.renameWorkspace(newWorkspaceName, workspaceId); @@ -23,8 +21,7 @@ describe("Create app same name in different workspace", function() { }); }); }); - - it("create app with same name in a different workspace", function() { + it("1. create app with same name in a different workspace", function() { cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); cy.wait("@applications").should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/LeaveWorkspaceTest_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/LeaveWorkspaceTest_spec.js index 91d183a338..358ece13d1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/LeaveWorkspaceTest_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/LeaveWorkspaceTest_spec.js @@ -5,24 +5,14 @@ let HomePage = ObjectsRegistry.HomePage; describe("Leave workspace test spec", function() { let newWorkspaceName; - it("1. Leave workspace menu is visible validation", function() { - cy.visit("/applications"); - cy.createWorkspace(); - cy.wait("@createWorkspace").then((interception) => { - newWorkspaceName = interception.response.body.data.name; - cy.visit("/applications"); - cy.openWorkspaceOptionsPopup(newWorkspaceName); - cy.contains("Leave Workspace"); - }); - }); - - it("2. Only admin user can not leave workspace validation", function() { + it("1. Only admin user can not leave workspace validation", function() { cy.visit("/applications"); cy.createWorkspace(); cy.wait("@createWorkspace").then((interception) => { newWorkspaceName = interception.response.body.data.name; cy.visit("/applications"); cy.openWorkspaceOptionsPopup(newWorkspaceName); + // verify leave workspace is visible cy.contains("Leave Workspace").click(); cy.contains("Are you sure").click(); cy.wait("@leaveWorkspaceApiCall").then((httpResponse) => { @@ -32,7 +22,7 @@ describe("Leave workspace test spec", function() { }); }); - it("3. Bug 17235 & 17987 - Non admin users can only access leave workspace popup menu validation", function() { + it("2. Bug 17235 & 17987 - Non admin users can only access leave workspace popup menu validation", function() { cy.visit("/applications"); cy.createWorkspace(); cy.wait("@createWorkspace").then((interception) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/LoginFromUIApp_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/LoginFromUIApp_spec.js index dba86f9545..4ecd69c8e1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/LoginFromUIApp_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/LoginFromUIApp_spec.js @@ -9,7 +9,7 @@ describe("Login from UI and check the functionality", function() { cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.SearchApp(appname); cy.get("#loading").should("not.exist"); - cy.wait(30000); + cy.wait(5000); cy.generateUUID().then((uid) => { pageid = uid; cy.Createpage(pageid); @@ -30,13 +30,9 @@ describe("Login from UI and check the functionality", function() { cy.DeleteApp(appname); cy.wait("@deleteApplication"); cy.get("@deleteApplication").should("have.property", "status", 200); - }); - - it("Login/Logout click Appsmith logo should route to login page", function() { + // login/Logout click Appsmith logo should route to login page cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.get(homePage.profileMenu).click(); cy.get(homePage.signOutIcon).click(); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(500); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/ShareAppTests_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/ShareAppTests_spec.js index 5ca7fb31a0..cc0a5f4374 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/ShareAppTests_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/ShareAppTests_spec.js @@ -135,7 +135,7 @@ describe("Create new workspace and share with a user", function() { cy.LogOut(); }); - it("6. login as uninvited user and then validate public access disable feature", function() { + it("6. login as uninvited user, validate public access disable feature ", function() { cy.LoginFromAPI(Cypress.env("TESTUSERNAME2"), Cypress.env("TESTPASSWORD2")); cy.visit(currentUrl); cy.wait("@getPagesForViewApp").should( @@ -156,16 +156,4 @@ describe("Create new workspace and share with a user", function() { cy.wait(2000); cy.contains("Sign in to your account").should("be.visible"); }); - - it("8. login as owner and delete App ", function() { - cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); - cy.visit("/applications"); - cy.wait("@applications").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - cy.SearchApp(appid); - cy.get("#loading").should("not.exist"); - }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/UpdateWorkspaceTests_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/UpdateWorkspaceTests_spec.js index ec859428b9..f1cc99ef5c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/UpdateWorkspaceTests_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/UpdateWorkspaceTests_spec.js @@ -4,7 +4,7 @@ describe("Update Workspace", function() { let workspaceId; let newWorkspaceName; - it("Open the workspace general settings and update workspace name. The update should reflect in the workspace. It should also reflect in the workspace names on the left side and the workspace dropdown. ", function() { + it("1. Open the workspace general settings and update workspace name. The update should reflect in the workspace. It should also reflect in the workspace names on the left side and the workspace dropdown. ", function() { cy.NavigateToHome(); cy.generateUUID().then((uid) => { workspaceId = uid; @@ -37,7 +37,7 @@ describe("Update Workspace", function() { }); }); - it("Open the workspace general settings and update workspace email. The update should reflect in the workspace.", function() { + it("2. Open the workspace general settings and update workspace email. The update should reflect in the workspace.", function() { cy.createWorkspace(); cy.wait("@createWorkspace").then((interception) => { newWorkspaceName = interception.response.body.data.name; @@ -55,9 +55,21 @@ describe("Update Workspace", function() { "have.value", Cypress.env("TESTUSERNAME2"), ); + // update workspace website + cy.get(homePage.workspaceWebsiteInput).clear(); + cy.get(homePage.workspaceWebsiteInput).type("demowebsite.com"); + cy.wait("@updateWorkspace").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + cy.get(homePage.workspaceWebsiteInput).should( + "have.value", + "demowebsite.com", + ); }); - it("Upload logo / delete logo and validate", function() { + it("3. Upload logo / delete logo and validate", function() { const fixturePath = "appsmithlogo.png"; cy.xpath(homePage.uploadLogo).attachFile(fixturePath); cy.wait("@updateLogo").should( @@ -77,18 +89,4 @@ describe("Update Workspace", function() { 200, ); }); - - it("Open the workspace general settings and update workspace website. The update should reflect in the workspace.", function() { - cy.get(homePage.workspaceWebsiteInput).clear(); - cy.get(homePage.workspaceWebsiteInput).type("demowebsite.com"); - cy.wait("@updateWorkspace").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - cy.get(homePage.workspaceWebsiteInput).should( - "have.value", - "demowebsite.com", - ); - }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/WorkspaceSettings_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/WorkspaceSettings_validation_spec.js deleted file mode 100644 index 4793b2de51..0000000000 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/WorkspaceSettings_validation_spec.js +++ /dev/null @@ -1,34 +0,0 @@ -/// - -import homePage from "../../../../locators/HomePage"; - -describe("Workspace Settings validation spec", function() { - let workspaceId; - let newWorkspaceName; - - it("1. Create workspace with long name should use ellipsis validation", function() { - cy.NavigateToHome(); - cy.generateUUID().then((uid) => { - workspaceId = - "kadjhfkjadsjkfakjdscajdsnckjadsnckadsjcnanakdjsnckjdscnakjdscnnadjkncakjdsnckjadsnckajsdfkjadshfkjsdhfjkasdhfkjasdhfjkasdhjfasdjkfhjhdsfjhdsfjhadasdfasdfadsasdf" + - uid; - localStorage.setItem("WorkspaceName", workspaceId); - // create workspace with long name - cy.createWorkspace(); - // stub the response and - // find app name - cy.wait("@createWorkspace").then((interception) => { - newWorkspaceName = interception.response.body.data.name; - cy.renameWorkspace(newWorkspaceName, workspaceId); - cy.navigateToWorkspaceSettings(workspaceId); - // checking parent's() since the child() inherits css from it - cy.get(homePage.workspaceHeaderName).should( - "have.css", - "text-overflow", - "ellipsis", - ); - }); - }); - cy.LogOut(); - }); -}); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/WorkspaceUserIconTest_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/WorkspaceUserIconTest_spec.js deleted file mode 100644 index 9f3af76059..0000000000 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/WorkspaceUserIconTest_spec.js +++ /dev/null @@ -1,30 +0,0 @@ -/// - -import homePage from "../../../../locators/HomePage"; - -describe("Check if workspace has user icons on homepage", function() { - let workspaceId; - let newWorkspaceName; - - it("create workspace and check if user icons exists in that workspace on homepage", function() { - cy.NavigateToHome(); - cy.generateUUID().then((uid) => { - workspaceId = uid; - localStorage.setItem("WorkspaceName", workspaceId); - cy.createWorkspace(); - cy.wait("@createWorkspace").then((interception) => { - newWorkspaceName = interception.response.body.data.name; - cy.renameWorkspace(newWorkspaceName, workspaceId); - cy.get(homePage.workspaceList.concat(workspaceId).concat(")")) - .scrollIntoView() - .should("be.visible") - .within(() => { - cy.get(homePage.shareUserIcons) - .first() - .should("be.visible"); - }); - }); - }); - cy.LogOut(); - }); -}); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/Workspacename_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/Workspace_validation_spec.js similarity index 63% rename from app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/Workspacename_validation_spec.js rename to app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/Workspace_validation_spec.js index 64b00c163a..112f1e9d8b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/Workspacename_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/Workspace_validation_spec.js @@ -5,7 +5,7 @@ import homePage from "../../../../locators/HomePage"; describe("Workspace name validation spec", function() { let workspaceId; let newWorkspaceName; - it("create workspace with leading space validation", function() { + it("1. create workspace with leading space validation", function() { cy.NavigateToHome(); cy.createWorkspace(); cy.wait("@createWorkspace").then((interception) => { @@ -23,7 +23,7 @@ describe("Workspace name validation spec", function() { cy.get(".error-message").should("be.visible"); }); }); - it("creates workspace and checks that workspace name is editable", function() { + it("2. creates workspace and checks that workspace name is editable and create workspace with special characters validation", function() { cy.createWorkspace(); cy.generateUUID().then((uid) => { workspaceId = @@ -34,10 +34,26 @@ describe("Workspace name validation spec", function() { cy.wait("@createWorkspace").then((interception) => { newWorkspaceName = interception.response.body.data.name; cy.renameWorkspace(newWorkspaceName, workspaceId); + // check if user icons exists in that workspace on homepage + cy.get(homePage.workspaceList.concat(workspaceId).concat(")")) + .scrollIntoView() + .should("be.visible") + .within(() => { + cy.get(homePage.shareUserIcons) + .first() + .should("be.visible"); + }); + cy.navigateToWorkspaceSettings(workspaceId); + // checking parent's() since the child() inherits css from it + cy.get(homePage.workspaceHeaderName).should( + "have.css", + "text-overflow", + "ellipsis", + ); }); }); - }); - it("create workspace with special characters validation", function() { + cy.NavigateToHome(); + // create workspace with special character cy.createWorkspace(); cy.wait("@createWorkspace").then((interception) => { newWorkspaceName = interception.response.body.data.name;