Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fixed failing GitImport test #34589

Merged
merged 13 commits into from
Jul 15, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ describe("Git import flow ", { tags: ["@tag.Git"] }, function () {
cy.wait(1000);
dataSources.FillMongoDSForm();
cy.testDatasource(true);
agHelper.GetNClick(dataSources._saveDs);
cy.wait(2000);
dataSources.SaveDatasource(true);
cy.wait("@getWorkspace");
cy.get(reconnectDatasourceModal.ImportSuccessModal).should("be.visible");
cy.get(reconnectDatasourceModal.ImportSuccessModalCloseBtn).click({
Expand Down Expand Up @@ -170,8 +169,9 @@ describe("Git import flow ", { tags: ["@tag.Git"] }, function () {
agHelper.AssertElementExist(gitSync._bottomBarPull);
cy.get(gitSyncLocators.closeGitSyncModal).click();
cy.wait(2000);
cy.merge(mainBranch);
cy.get(gitSyncLocators.closeGitSyncModal).click();
gitSync.MergeToMaster();
//cy.merge(mainBranch);
// cy.get(gitSyncLocators.closeGitSyncModal).click();
cy.wait(2000);
cy.latestDeployPreview();
table.AssertTableLoaded();
Expand Down
4 changes: 3 additions & 1 deletion app/client/cypress/limited-tests.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# To run only limited tests - give the spec names in below format:
cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js
cypress/e2e/Regression/ClientSide/Git/GitImport/GitImport_spec.js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert this file please @NandanAnantharamu and run this on EE as well multiple times on last time

cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect5_spec.ts


# For running all specs - uncomment below:
#cypress/e2e/**/**/*
Expand Down
10 changes: 9 additions & 1 deletion app/client/cypress/support/gitSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,15 @@ Cypress.Commands.add("switchGitBranch", (branch, expectError) => {
Cypress.Commands.add("commitAndPush", (assertFailure) => {
cy.get(homePage.publishButton).click();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetNClick please

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

agHelper.AssertElementExist(gitSync._bottomBarPull);
cy.get(gitSyncLocators.commitCommentInput).type("Initial Commit");
agHelper.AssertElementVisibility(gitSyncLocators.gitSyncModal);
cy.get(gitSyncLocators.commitCommentInput).should(
"have.attr",
"placeholder",
"Your commit message here",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use message const here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw why did you make change in this helper? @NandanAnantharamu

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was waiting for the gitSyncLocators.commitCommentInput so added few steps to make sure it actually appears

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

);
cy.get(gitSyncLocators.commitCommentInput).type("Initial Commit", {
force: true,
});
cy.get(gitSyncLocators.commitButton).click();
if (!assertFailure) {
// check for commit success
Expand Down
Loading