Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Etsija committed Dec 21, 2023
1 parent e09a6d5 commit b2b5d80
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 3 additions & 1 deletion apps/clearance_ui/tests/e2e/global.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ setup("logs in", async ({ page }) => {

// Expect to be redirected to the home page
await expect(
page.getByRole("heading", { name: "Welcome to DoubleOpen Front End" }),
page.getByRole("heading", {
name: "Welcome to Double Open Clearance UI",
}),
).toBeVisible();

// Store the login state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ test("create license conclusion, delete from Main UI", async ({ page }) => {
await page.getByPlaceholder("Search license...").click();
await page.getByPlaceholder("Search license...").fill("MIT");
await page.getByRole("option", { name: "MIT", exact: true }).click();
await page.getByPlaceholder("Comment on your curation...").click();
await page
.getByPlaceholder("Comment on your curation...")
.getByPlaceholder("Comment on your license conclusion...")
.click();
await page
.getByPlaceholder("Comment on your license conclusion...")
.fill("Test comment 1");
page.once("dialog", (dialog) => {
dialog.accept().catch(() => {});
Expand Down Expand Up @@ -66,9 +68,11 @@ test("create license conclusion, delete from Clearance Library", async ({
await page
.getByPlaceholder("Write your SPDX expression")
.fill("Apache-2.0");
await page.getByPlaceholder("Comment on your curation...").click();
await page
.getByPlaceholder("Comment on your curation...")
.getByPlaceholder("Comment on your license conclusion...")
.click();
await page
.getByPlaceholder("Comment on your license conclusion...")
.fill("Test comment 2");
page.once("dialog", (dialog) => {
dialog.accept().catch(() => {});
Expand Down
2 changes: 1 addition & 1 deletion apps/clearance_ui/tests/unit/Home.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("Home", () => {
);

const heading = screen.getByRole("heading", {
name: /Welcome to DoubleOpen Front End/i,
name: /Welcome to Double Open Clearance UI/i,
});

expect(heading).toBeInTheDocument();
Expand Down

0 comments on commit b2b5d80

Please sign in to comment.