Skip to content

Commit 9624107

Browse files
committed
fix: branch name test failing due to main vs master inconsistency
1 parent 5e5836c commit 9624107

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

test/spec/Extn-Git-integ-test.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,13 +475,16 @@ define(function (require, exports, module) {
475475
});
476476

477477
const createdBranch = "createdBranch";
478+
let defaultBranch;
478479
async function waitForBranchNameDropdown(expectedName) {
479480
await awaitsFor(()=>{
480481
return $("#git-branch").text().trim().includes(expectedName);
481482
}, `branch ${expectedName} to show in project`);
482483
}
483484

484485
it("should be able to create a new branch", async () => {
486+
defaultBranch = await testWindow.phoenixGitEvents.Git.getCurrentBranchName();
487+
expect(defaultBranch).toBeTruthy();
485488
$("#git-branch-dropdown-toggle").click();
486489
await awaitsFor(()=>{
487490
return $(".git-branch-new").is(":visible");
@@ -500,9 +503,9 @@ define(function (require, exports, module) {
500503
return $(".git-branch-new").is(":visible");
501504
}, "branch dropdown to show");
502505

503-
expect($(".switch-branch").text()).toContain("master");
506+
expect($(".switch-branch").text()).toContain(defaultBranch);
504507
$(".switch-branch").click();
505-
await waitForBranchNameDropdown("master");
508+
await waitForBranchNameDropdown(defaultBranch);
506509
});
507510
});
508511
});

0 commit comments

Comments
 (0)