Skip to content

Commit

Permalink
fix: bookmark icon should be visible for unauthenticated user in arti…
Browse files Browse the repository at this point in the history
…cle test suite (#1157)
  • Loading branch information
JohnAllenTech authored Oct 20, 2024
1 parent 91c4627 commit 3bb1ee4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions e2e/articles.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test.describe("Unauthenticated Articles Page", () => {
);
});

test("Should not show bookmark article icon", async ({ page }) => {
test("Should show bookmark article icon", async ({ page }) => {
await page.goto("http://localhost:3000/articles");

await expect(
Expand All @@ -25,7 +25,7 @@ test.describe("Unauthenticated Articles Page", () => {

await expect(
page.locator("article").first().getByLabel("Bookmark this post"),
).toBeHidden();
).toBeVisible();
});
test("Should load more articles when scrolling to the end of the page", async ({
page,
Expand Down Expand Up @@ -164,6 +164,7 @@ test.describe("Authenticated Articles Page", () => {

await expect(page.getByRole("button", { name: "Next" })).toBeVisible();
await page.getByRole("button", { name: "Next" }).click();

await expect(
page.getByRole("button", { name: "Publish now" }),
).toBeVisible();
Expand Down

0 comments on commit 3bb1ee4

Please sign in to comment.