Skip to content

Commit

Permalink
try to set the right base url
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeseast committed Nov 16, 2023
1 parent 39a7f85 commit 3c4282d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: Playwright Tests

on:
push:
branches: [master]
pull_request:
branches: [master]

env:
URL: "https://deploy-preview-${{ github.event.number }}.muckcloud.com"
PLAYWRIGHT_TEST_BASE_URL: "https://deploy-preview-${{ github.event.number }}.muckcloud.com"

jobs:
wait:
Expand All @@ -29,6 +32,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: npm ci

Expand Down
5 changes: 0 additions & 5 deletions netlify.toml

This file was deleted.

6 changes: 3 additions & 3 deletions tests/anonymous/viewer/document.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ test("test", async ({ page }) => {
"/documents/20000007-finalseasonal_allergies_pollen_and_mold_2023__en";
await page.goto(url);

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

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

await page.getByRole("link", { name: "Original Document (PDF) »" }).click();
Expand All @@ -17,9 +19,7 @@ test("test", async ({ page }) => {

await page.getByRole("link", { name: "p. 1" }).click();

const currentUrl = new URL(page.url());

expect(currentUrl.hash).toEqual("#document/p1");
expect(new URL(page.url()).hash).toEqual("#document/p1");

await page
.locator("div")
Expand Down

0 comments on commit 3c4282d

Please sign in to comment.