ci: Cypress CI run Group name update (#19119)

## Description

- This PR includes the script updates for connecting to TED Git instead
of actual Github for running tests

## Type of change

- New script changes to connect to TED Git

## How Has This Been Tested?
- Cypress CI runs

## Checklist:
### QA activity:
- [X] Test plan has been approved by relevant developers
- [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] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [X] Added Test Plan Approved label after reveiwing all Cypress test
This commit is contained in:
Aishwarya-U-R 2023-01-27 09:42:15 +05:30 committed by GitHub
parent c4d7462fb3
commit 7607883ab5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 182 additions and 182 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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);
});