Skip to content

Commit 3f99a7e

Browse files
committed
fix: Playwright to wait body is visible before testing
1 parent eae2296 commit 3f99a7e

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: Release
22

33
on:
4-
push:
5-
branches: [main] # run after CI passes & merge lands
4+
workflow_run:
5+
workflows: ["CI"]
6+
types: [completed]
7+
branches: [main]
68
workflow_dispatch:
79

810
permissions:
@@ -13,6 +15,7 @@ permissions:
1315
jobs:
1416
release:
1517
runs-on: ubuntu-latest
18+
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
1619
steps:
1720
- uses: actions/checkout@v4
1821
- uses: google-github-actions/release-please-action@v4

packages/core/__tests__/e2e/next.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ test.describe('Zero-UI Next Integration', () => {
1212
test(`toggles <${attr}> from light → dark`, async ({ page }) => {
1313
// 1️⃣ Load fully hydrated page
1414
await page.goto('/', { waitUntil: 'networkidle' });
15+
await page.locator('body').waitFor({ state: 'visible', timeout: 5000 });
1516
console.log(`✅ page loaded testing ${attr} from light → dark`);
1617

1718
const body = page.locator('body');

packages/core/__tests__/e2e/vite.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ test.describe('Zero-UI Vite Integration', () => {
1212
test(`toggles <${attr}> from light → dark`, async ({ page }) => {
1313
// 1️⃣ Load fully hydrated page
1414
await page.goto('/', { waitUntil: 'networkidle' });
15+
await page.locator('body').waitFor({ state: 'visible', timeout: 5000 });
1516
console.log(`✅ page loaded testing ${attr} from light → dark`);
1617

1718
const body = page.locator('body');

0 commit comments

Comments
 (0)