Skip to content

Commit

Permalink
Use a document on staging
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeseast committed Nov 16, 2023
1 parent 3ae110b commit 93cfc0b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/anonymous/viewer/document.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

import { test, expect } from "@playwright/test";

test("test", async ({ page }) => {
test("basic document test", async ({ page }) => {
// this is on staging; don't delete this document
const title = "FINALSeasonal_allergies_pollen_and_mold_2023__EN_";
const url =
"/documents/20000007-finalseasonal_allergies_pollen_and_mold_2023__en";
"/documents/20005908-finalseasonal_allergies_pollen_and_mold_2023__en";
await page.goto(url);

console.log(page.url());

await expect(page.locator(".sidebar").getByRole("heading")).toHaveText(title);

expect(new URL(page.url()).pathname).toBe(url);

await page.getByRole("link", { name: "Original Document (PDF) »" }).click();
Expand All @@ -33,6 +35,4 @@ test("test", async ({ page }) => {
// switch to thumbnail view, click the first image
await page.getByRole("combobox").selectOption("thumbnail");
await page.locator("img").first().click();

await expect(page.locator(".sidebar").getByRole("heading")).toHaveText(title);
});

0 comments on commit 93cfc0b

Please sign in to comment.