Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
itaigilo committed Sep 29, 2024
1 parent 68390c1 commit 671aff4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions webui/test/e2e/common/quickstart.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,32 +107,35 @@ test.describe("Quickstart", () => {
await repositoriesPage.goToRepository(QUICKSTART_REPO_NAME);

const branchNameForPull = "branch-for-pull-1";
const commitMsg = "commit-for-pull-1";

const repositoryPage = new RepositoryPage(page);
await repositoryPage.createBranch(branchNameForPull);

// delete a file in the branch
await repositoryPage.gotoObjectsTab();
await repositoryPage.switchBranch(branchNameForPull);
await repositoryPage.deleteFirstFileInDirectory("images/");

// commit the change
await repositoryPage.gotoUncommittedChangeTab();
expect(await repositoryPage.getUncommittedCount()).toEqual(1);
await repositoryPage.commitChanges(commitMsg);
await repositoryPage.commitChanges("Commit for pull-1");
await expect(page.getByText("No changes")).toBeVisible();

// pulls list sanity
await repositoryPage.gotoPullRequestsTab();
await expect(page.getByText("Create Pull Request")).toBeVisible();
const pullsPage = new PullsPage(page);
expect(await pullsPage.getPullsListCount()).toEqual(0);

// create a pull request
await pullsPage.clickCreatePullButton();
await expect(page.getByRole("heading", {name: "Create Pull Request"})).toBeVisible();
await pullsPage.switchCompareBranch(branchNameForPull);
const titleForPull1 = "PR for branch 1";
await pullsPage.fillPullTitle(titleForPull1);
await pullsPage.clickCreatePullButton();
await expect(page.getByRole("heading", {name: titleForPull1})).toBeVisible();

await expect(page.locator("div.lakefs-uri").getByText(`main...${branchNameForPull}`)).toBeVisible();
});
});

0 comments on commit 671aff4

Please sign in to comment.