Skip to content
Closed
Changes from 1 commit
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
17 changes: 15 additions & 2 deletions app/client/cypress/support/Pages/GitSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ export class GitSync {
_checkMergeability = "//span[contains(text(), 'Checking mergeability')]";
public _branchListItem = "[data-testid=t--branch-list-item]";
public _bottomBarMergeButton = ".t--bottom-bar-merge";
private mergeCTA = "[data-testid=t--git-merge-button]";
public _mergeBranchDropdownDestination =
".t--merge-branch-dropdown-destination";
public _dropdownmenu = ".rc-select-item-option-content";
private _openRepoButton = "[data-testid=t--git-repo-button]";
public _commitButton = ".t--commit-button";
private _commitCommentInput = ".t--commit-comment-input textarea";
public _commitCommentInput = ".t--commit-comment-input textarea";

public _discardChanges = ".t--discard-button";
public _discardCallout = "[data-testid='t--discard-callout']";
Expand Down Expand Up @@ -389,6 +390,18 @@ export class GitSync {
this.agHelper.AssertElementAbsence(this._checkMergeability, 35000);
}

MergeToMaster() {
this.CheckMergeConflicts("master");
this.agHelper.AssertElementEnabledDisabled(this.mergeCTA, 0, false);
this.agHelper.GetNClick(this.mergeCTA);
this.assertHelper.AssertNetworkStatus("@mergeBranch");
this.agHelper.AssertContains(
Cypress.env("MESSAGES").MERGED_SUCCESSFULLY(),
"be.visible",
);
this.CloseGitSyncModal();
}
Comment thread
trishaanand marked this conversation as resolved.

OpenRepositoryAndVerify() {
this.agHelper.GetNClick(this._openRepoButton);
}
Expand Down Expand Up @@ -451,4 +464,4 @@ export class GitSync {
}
this.CloseGitSyncModal();
}
}
}