diff --git a/.github/workflows/integration-tests-command.yml b/.github/workflows/integration-tests-command.yml index c5069fa6cd..4e82a761ad 100644 --- a/.github/workflows/integration-tests-command.yml +++ b/.github/workflows/integration-tests-command.yml @@ -362,7 +362,7 @@ jobs: install: false parallel: true config-file: cypress_ci.json - group: "Electrons on Github Action" + group: "Electrons on Github Action Fat Container" spec: ${{ env.failed_spec_env }} working-directory: app/client # tag will be either "push" or "pull_request" diff --git a/.github/workflows/test-build-docker-image.yml b/.github/workflows/test-build-docker-image.yml index 8b3a12e456..8c8b1d499c 100644 --- a/.github/workflows/test-build-docker-image.yml +++ b/.github/workflows/test-build-docker-image.yml @@ -725,7 +725,7 @@ jobs: install: false parallel: true config-file: cypress_ci.json - group: "Electrons on Github Action" + group: "Electrons on Github Action Fat Container" spec: ${{ env.failed_spec_env }} working-directory: app/client # tag will be either "push" or "pull_request" 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 429a938699..9d59872385 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 @@ -78,190 +78,190 @@ describe("Git import flow ", function() { // cy.connectToGitRepo(repoName); }); }); - cy.wait(5000); // for git connection to settle! }); + cy.wait(5000); // for git connection to settle! +}); - it("2. Import the previous app connected to Git and reconnect Postgres, MySQL and Mongo db ", () => { - cy.NavigateToHome(); - cy.createWorkspace(); - cy.wait("@createWorkspace").then((interception) => { - const newWorkspaceName = interception.response.body.data.name; - cy.CreateAppForWorkspace(newWorkspaceName, "gitImport"); - }); - cy.get(homePage.homeIcon).click(); - cy.get(homePage.optionsIcon) - .first() - .click(); - cy.get(homePage.workspaceImportAppOption).click({ force: true }); - cy.get(".t--import-json-card") - .next() - .click(); - cy.importAppFromGit(repoName); - cy.wait(5000); - cy.get(reconnectDatasourceModal.Modal).should("be.visible"); - cy.ReconnectDatasource("TEDPostgres"); - cy.wait(500); - cy.fillPostgresDatasourceForm(); - cy.get(datasourceEditor.sectionAuthentication).click(); - cy.testDatasource(true); - cy.get(".t--save-datasource").click({ force: true }); - cy.wait(500); - cy.ReconnectDatasource("TEDMySQL"); - cy.wait(500); - cy.fillMySQLDatasourceForm(); - cy.get(datasourceEditor.sectionAuthentication).click(); - cy.testDatasource(true); - cy.get(".t--save-datasource").click({ force: true }); - cy.wait(500); - cy.ReconnectDatasource("TEDMongo"); - cy.wait(500); - cy.fillMongoDatasourceForm(); - cy.get(datasourceEditor.sectionAuthentication).click(); - cy.testDatasource(true); - cy.get(".t--save-datasource").click({ force: true }); - cy.wait(2000); - cy.get(reconnectDatasourceModal.ImportSuccessModal).should("be.visible"); - cy.get(reconnectDatasourceModal.ImportSuccessModalCloseBtn).click({ - force: true, - }); - cy.wait(4000); //for git connection to settle - /* cy.get(homePage.toastMessage).should( +it("2. Import the previous app connected to Git and reconnect Postgres, MySQL and Mongo db ", () => { + cy.NavigateToHome(); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.CreateAppForWorkspace(newWorkspaceName, "gitImport"); + }); + cy.get(homePage.homeIcon).click(); + cy.get(homePage.optionsIcon) + .first() + .click(); + cy.get(homePage.workspaceImportAppOption).click({ force: true }); + cy.get(".t--import-json-card") + .next() + .click(); + cy.importAppFromGit(repoName); + cy.wait(5000); + cy.get(reconnectDatasourceModal.Modal).should("be.visible"); + cy.ReconnectDatasource("TEDPostgres"); + cy.wait(500); + cy.fillPostgresDatasourceForm(); + cy.get(datasourceEditor.sectionAuthentication).click(); + cy.testDatasource(true); + cy.get(".t--save-datasource").click({ force: true }); + cy.wait(500); + cy.ReconnectDatasource("TEDMySQL"); + cy.wait(500); + cy.fillMySQLDatasourceForm(); + cy.get(datasourceEditor.sectionAuthentication).click(); + cy.testDatasource(true); + cy.get(".t--save-datasource").click({ force: true }); + cy.wait(500); + cy.ReconnectDatasource("TEDMongo"); + cy.wait(500); + cy.fillMongoDatasourceForm(); + cy.get(datasourceEditor.sectionAuthentication).click(); + cy.testDatasource(true); + cy.get(".t--save-datasource").click({ force: true }); + cy.wait(2000); + cy.get(reconnectDatasourceModal.ImportSuccessModal).should("be.visible"); + cy.get(reconnectDatasourceModal.ImportSuccessModalCloseBtn).click({ + force: true, + }); + cy.wait(4000); //for git connection to settle + /* cy.get(homePage.toastMessage).should( "contain", "Application imported successfully", ); */ - cy.wait("@gitStatus").then((interception) => { - cy.log(interception.response.body.data); - cy.wait(1000); - }); - }); - - 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"); - //verify MySQL data binded to table - 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 - cy.xpath("//input[@value='Success']").should("be.visible"); - }); - - // skipping this due to open bug #18776 - it.skip("4. Create a new branch, clone page and validate data on that branch in view and edit mode", () => { - cy.createGitBranch(newBranch); - 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"); - // verify api response binded to input widget - cy.xpath("//input[@value='this is a test']"); - // verify js object binded to input widget - cy.xpath("//input[@value='Success']"); - cy.CheckAndUnfoldEntityItem("Pages"); - // clone the page1 and validate data binding - cy.get(".t--entity-name:contains(Page1)") - .trigger("mouseover") - .click({ force: true }); - cy.xpath(apiwidget.popover) - .first() - .should("be.hidden") - .invoke("show") - .click({ force: true }); - cy.get(pages.clonePage).click({ force: true }); - cy.wait("@clonePage").should( - "have.nested.property", - "response.body.responseMeta.status", - 201, - ); - cy.CheckAndUnfoldEntityItem("Queries/JS"); - // verify jsObject is not duplicated - cy.get(`.t--entity-name:contains(${jsObject})`).should("have.length", 1); - cy.xpath("//input[@class='bp3-input' and @value='Success']").should( - "be.visible", - ); - // deploy the app and validate data binding - cy.wait(2000); - cy.get(homePage.publishButton).click(); - cy.get(gitSyncLocators.commitCommentInput).type("Initial Commit"); - cy.get(gitSyncLocators.commitButton).click(); - cy.intercept("POST", "api/v1/git/commit/app/*").as("commit"); - cy.wait(10000); - cy.get(gitSyncLocators.closeGitSyncModal).click(); - cy.wait(2000); - cy.merge(mainBranch); - cy.get(gitSyncLocators.closeGitSyncModal).click(); - cy.wait(2000); - cy.latestDeployPreview(); - cy.get(".tbody") - .first() - .should("contain.text", "Test user 7"); - // verify api response binded to input widget - cy.xpath("//input[@value='this is a test']"); - // 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(".tbody") - .first() - .should("contain.text", "Test user 7"); - // verify api response binded to input widget - cy.xpath("//input[@value='this is a test']"); - // verify js object binded to input widget - cy.xpath("//input[@value='Success']"); - cy.get(commonlocators.backToEditor).click(); - cy.wait(2000); - }); - - // skipping this due to open bug #18776 - it.skip("5. Switch to master and verify data in edit and view mode", () => { - cy.switchGitBranch("master"); - cy.wait(2000); - // validate data binding in edit and deploy mode - cy.latestDeployPreview(); - 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.xpath("//input[@value='this is a test']"); - cy.xpath("//input[@value='Success']"); - cy.get(commonlocators.backToEditor).click(); - cy.wait(2000); - }); - - // skipping this due to open bug #18776 - it.skip("6. Add widget to master, merge then checkout to child branch and verify data", () => { - cy.get(explorer.widgetSwitchId).click(); - cy.wait(2000); // wait for transition - cy.dragAndDropToCanvas("buttonwidget", { x: 300, y: 600 }); - cy.wait(3000); - cy.commitAndPush(); - cy.merge(newBranch); - cy.get(gitSyncLocators.closeGitSyncModal).click(); - cy.wait(2000); - cy.switchGitBranch(newBranch); - cy.wait(4000); - // verify button widget is visible on child branch - cy.get(".t--widget-buttonwidget").should("be.visible"); - }); - - after(() => { - //cy.deleteTestGithubRepo(repoName); + cy.wait("@gitStatus").then((interception) => { + cy.log(interception.response.body.data); + cy.wait(1000); }); }); + +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"); + //verify MySQL data binded to table + 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 + cy.xpath("//input[@value='Success']").should("be.visible"); +}); + +// skipping this due to open bug #18776 +it.skip("4. Create a new branch, clone page and validate data on that branch in view and edit mode", () => { + cy.createGitBranch(newBranch); + 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"); + // verify api response binded to input widget + cy.xpath("//input[@value='this is a test']"); + // verify js object binded to input widget + cy.xpath("//input[@value='Success']"); + cy.CheckAndUnfoldEntityItem("Pages"); + // clone the page1 and validate data binding + cy.get(".t--entity-name:contains(Page1)") + .trigger("mouseover") + .click({ force: true }); + cy.xpath(apiwidget.popover) + .first() + .should("be.hidden") + .invoke("show") + .click({ force: true }); + cy.get(pages.clonePage).click({ force: true }); + cy.wait("@clonePage").should( + "have.nested.property", + "response.body.responseMeta.status", + 201, + ); + cy.CheckAndUnfoldEntityItem("Queries/JS"); + // verify jsObject is not duplicated + cy.get(`.t--entity-name:contains(${jsObject})`).should("have.length", 1); + cy.xpath("//input[@class='bp3-input' and @value='Success']").should( + "be.visible", + ); + // deploy the app and validate data binding + cy.wait(2000); + cy.get(homePage.publishButton).click(); + cy.get(gitSyncLocators.commitCommentInput).type("Initial Commit"); + cy.get(gitSyncLocators.commitButton).click(); + cy.intercept("POST", "api/v1/git/commit/app/*").as("commit"); + cy.wait(10000); + cy.get(gitSyncLocators.closeGitSyncModal).click(); + cy.wait(2000); + cy.merge(mainBranch); + cy.get(gitSyncLocators.closeGitSyncModal).click(); + cy.wait(2000); + cy.latestDeployPreview(); + cy.get(".tbody") + .first() + .should("contain.text", "Test user 7"); + // verify api response binded to input widget + cy.xpath("//input[@value='this is a test']"); + // 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(".tbody") + .first() + .should("contain.text", "Test user 7"); + // verify api response binded to input widget + cy.xpath("//input[@value='this is a test']"); + // verify js object binded to input widget + cy.xpath("//input[@value='Success']"); + cy.get(commonlocators.backToEditor).click(); + cy.wait(2000); +}); + +// skipping this due to open bug #18776 +it.skip("5. Switch to master and verify data in edit and view mode", () => { + cy.switchGitBranch("master"); + cy.wait(2000); + // validate data binding in edit and deploy mode + cy.latestDeployPreview(); + 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.xpath("//input[@value='this is a test']"); + cy.xpath("//input[@value='Success']"); + cy.get(commonlocators.backToEditor).click(); + cy.wait(2000); +}); + +// skipping this due to open bug #18776 +it.skip("6. Add widget to master, merge then checkout to child branch and verify data", () => { + cy.get(explorer.widgetSwitchId).click(); + cy.wait(2000); // wait for transition + cy.dragAndDropToCanvas("buttonwidget", { x: 300, y: 600 }); + cy.wait(3000); + cy.commitAndPush(); + cy.merge(newBranch); + cy.get(gitSyncLocators.closeGitSyncModal).click(); + cy.wait(2000); + cy.switchGitBranch(newBranch); + cy.wait(4000); + // verify button widget is visible on child branch + cy.get(".t--widget-buttonwidget").should("be.visible"); +}); + +after(() => { + //cy.deleteTestGithubRepo(repoName); +});