diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 2812391..925f517 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -17,8 +17,16 @@ jobs: run: npm ci - name: Install Playwright Browsers run: npx playwright install --with-deps + - name: Waiting for 200 from the Netlify Preview + uses: jakepartusch/wait-for-netlify-action@v1.2 + id: waitFor200 + with: + site_name: "typeberry-toolkit" + max_timeout: 360 # 6 Minutes, depends on your build pipeline duration - name: Run Playwright tests run: npx playwright test + env: + PLAYWRIGHT_TEST_BASE_URL: ${{ steps.waitFor200.outputs.url }} - uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} with: diff --git a/tests/run-program.spec.ts b/tests/run-program.spec.ts index 886a172..2472b0f 100644 --- a/tests/run-program.spec.ts +++ b/tests/run-program.spec.ts @@ -2,7 +2,7 @@ import { test, expect, Page } from "@playwright/test"; async function runProgramTest(page: Page, pvmType: string) { // Navigate to your app - await page.goto("http://localhost:5173"); + await page.goto("/"); // Select the PVM type await page.waitForSelector('button[test-id="pvm-select"]');