Skip to content

Commit

Permalink
improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
bilalabbad committed Oct 31, 2024
1 parent 314b5ab commit c181e8f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions frontend/app/tests/e2e/branches.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,18 @@ test.describe("Branches creation and deletion", () => {
await expect(page.getByTestId("create-branch-button")).toBeDisabled();
});

test("should not see the quick action to create a not found branch name", async ({ page }) => {
test("should not show quick-create option when searching for non-existent branch", async ({
page,
}) => {
await page.goto("/");
await page.getByTestId("branch-selector-trigger").click();
await page.getByTestId("branch-search-input").fill("not-found-branch");

const nonExistentBranchName = "non-existent-branch-123";
await page.getByTestId("branch-search-input").fill(nonExistentBranchName);

await expect(page.getByText("No branch found")).toBeVisible();
await expect(
page.getByRole("option", { name: "Create branch not-found-branch" })
page.getByRole("option", { name: `Create branch ${nonExistentBranchName}` })
).not.toBeVisible();
});
});
Expand Down

0 comments on commit c181e8f

Please sign in to comment.