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: fix failing gitsync tests #34214

Merged
merged 3 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,7 @@ describe("Git sync apps", { tags: ["@tag.Git"] }, function () {
cy.get(gitSyncLocators.commitCommentInput).type("Initial Commit");
cy.get(gitSyncLocators.commitButton).click();
cy.get(gitSyncLocators.closeGitSyncModal).click();
cy.merge(mainBranch);
agHelper.GetNClick(gitSyncLocators.closeGitSyncModal);
gitSync.MergeToMaster();
cy.latestDeployPreview();
// verify page is hidden on deploy mode
agHelper.AssertContains("Child_Page Copy", "not.exist");
Expand Down
11 changes: 7 additions & 4 deletions app/client/cypress/support/Pages/GitSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export class GitSync {
private mergeCTA = "[data-testid=t--git-merge-button]";
public _mergeBranchDropdownDestination =
".t--merge-branch-dropdown-destination";
public _mergeBranchDropdownmenu =
".t--merge-branch-dropdown-destination .rc-select-selection-search-input";
public _dropdownmenu = ".rc-select-item-option-content";
private _openRepoButton = "[data-testid=t--git-repo-button]";
public _commitButton = ".t--commit-button";
Expand Down Expand Up @@ -380,11 +382,12 @@ export class GitSync {
CheckMergeConflicts(destinationBranch: string) {
this.agHelper.AssertElementExist(this._bottomBarPull);
this.agHelper.GetNClick(this._bottomBarMergeButton);
cy.wait(2000);
this.agHelper.GetNClick(this._mergeBranchDropdownDestination);
// cy.get(commonLocators.dropdownmenu).contains(destinationBranch).click();
this.agHelper.WaitUntilEleAppear(this._mergeBranchDropdownmenu);
this.agHelper.WaitUntilEleDisappear(this._mergeLoader);
this.assertHelper.AssertNetworkStatus("@getBranch", 200);
this.agHelper.GetNClick(this._mergeBranchDropdownmenu, 0, true);
this.agHelper.WaitUntilEleAppear(this._dropdownmenu);
this.agHelper.GetNClickByContains(this._dropdownmenu, destinationBranch);

this.agHelper.AssertElementAbsence(this._checkMergeability, 35000);
}

Expand Down
Loading