Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions packages/plugin-rsc/e2e/custom-server-function.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { expect, test, type Page } from '@playwright/test'
import { useFixture } from './fixture'
import {
Expand Down Expand Up @@ -84,7 +84,7 @@

async function testActions(page: Page) {
// The first two actions are inline functions in one RSC-reachable module.
await page.getByRole('button', { name: 'Built-in: 0' }).click()

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (ubuntu-latest / chromium)

[chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

4) [chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (ubuntu-latest / chromium)

[chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

4) [chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (ubuntu-latest / chromium)

[chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

4) [chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (macos-latest / chromium)

[chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

2) [chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/Users/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /Users/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (macos-latest / chromium)

[chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

2) [chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/Users/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /Users/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (macos-latest / chromium)

[chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

2) [chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/Users/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /Users/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (ubuntu-latest / chromium) (react-experimental)

[chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

2) [chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (ubuntu-latest / chromium) (react-experimental)

[chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

2) [chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (ubuntu-latest / chromium) (react-experimental)

[chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

2) [chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (ubuntu-latest / chromium) (react-canary)

[chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

3) [chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (ubuntu-latest / chromium) (react-canary)

[chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

3) [chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (ubuntu-latest / chromium) (react-canary)

[chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

3) [chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (macos-latest / webkit)

[webkit] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

2) [webkit] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/Users/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /Users/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (macos-latest / webkit)

[webkit] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

2) [webkit] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/Users/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /Users/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (macos-latest / webkit)

[webkit] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

2) [webkit] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/Users/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /Users/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (ubuntu-latest / chromium) (vite-7)

[chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

4) [chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (ubuntu-latest / chromium) (vite-7)

[chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

4) [chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (ubuntu-latest / chromium) (vite-7)

[chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

4) [chromium] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (ubuntu-latest / firefox)

[firefox] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

8) [firefox] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (ubuntu-latest / firefox)

[firefox] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

8) [firefox] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11

Check failure on line 87 in packages/plugin-rsc/e2e/custom-server-function.test.ts

View workflow job for this annotation

GitHub Actions / test-rsc (ubuntu-latest / firefox)

[firefox] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms

8) [firefox] › e2e/custom-server-function.test.ts:80:3 › dev-custom-server-function › progressive forms Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Built-in: 0' }) 85 | async function testActions(page: Page) { 86 | // The first two actions are inline functions in one RSC-reachable module. > 87 | await page.getByRole('button', { name: 'Built-in: 0' }).click() | ^ 88 | await expect( 89 | page.getByRole('button', { name: 'Built-in: 1' }), 90 | ).toBeVisible() at testActions (/home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:87:61) at /home/runner/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/e2e/custom-server-function.test.ts:82:11
await expect(
page.getByRole('button', { name: 'Built-in: 1' }),
).toBeVisible()
Expand All @@ -92,6 +92,22 @@
await page.getByRole('button', { name: 'Custom: 0' }).click()
await expect(page.getByRole('button', { name: 'Custom: 1' })).toBeVisible()

await page
.getByRole('button', { name: 'Server file, custom inline: 0' })
.click()
await expect(
page.getByRole('button', { name: 'Server file, custom inline: 1' }),
).toBeVisible()

await page
.getByRole('button', { name: 'Custom server file, server inline: 0' })
.click()
await expect(
page.getByRole('button', {
name: 'Custom server file, server inline: 1',
}),
).toBeVisible()

// This module is only imported by a Client Component, so its implementation
// reaches the RSC build through the aggregated server reference manifest.
await page.getByRole('button', { name: 'From client: 0' }).click()
Expand All @@ -104,5 +120,15 @@
page.getByRole('button', { name: 'Built-in: 0' }),
).toBeVisible()
await expect(page.getByRole('button', { name: 'Custom: 0' })).toBeVisible()

await page.getByRole('button', { name: 'Reset composition' }).click()
await expect(
page.getByRole('button', { name: 'Server file, custom inline: 0' }),
).toBeVisible()
await expect(
page.getByRole('button', {
name: 'Custom server file, server inline: 0',
}),
).toBeVisible()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import {
getCount as getCustomServerFileCount,
increment as incrementCustomServerFile,
} from './use-custom-server-file.ts'
import {
getCount as getServerFileCount,
increment as incrementServerFile,
reset as resetServerFile,
} from './use-server-file.ts'

export async function DirectiveComposition() {
const [serverFileCount, customServerFileCount] = await Promise.all([
getServerFileCount(),
getCustomServerFileCount(),
])
return (
<>
<form action={incrementServerFile}>
<button>Server file, custom inline: {serverFileCount}</button>
</form>
<form action={incrementCustomServerFile}>
<button>
Custom server file, server inline: {customServerFileCount}
</button>
</form>
<form action={resetServerFile}>
<button>Reset composition</button>
</form>
</>
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use custom-server'

let count = 0

export async function getCount() {
return count
}

export async function increment() {
'use server'
count++
}

export async function reset() {
count = 0
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'use server'

import { reset as resetCustomServerFile } from './use-custom-server-file.ts'

let count = 0

export async function getCount() {
return count
}

export async function increment() {
'use custom-server'
count++
}

export async function reset() {
count = 0
await resetCustomServerFile()
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ActionFromClient } from './features/action-from-client/client.tsx'
import { DirectiveComposition } from './features/directive-composition/server.tsx'
import { MixedDirectives } from './features/mixed-directives/server.tsx'

export function Root(_props: { url: URL }) {
Expand All @@ -11,6 +12,7 @@ export function Root(_props: { url: URL }) {
</head>
<body>
<MixedDirectives />
<DirectiveComposition />
<ActionFromClient />
</body>
</html>
Expand Down
Loading