Skip to content

Commit 5ea4bec

Browse files
hi-ogawacodex
andcommitted
test(rsc): add hoist member binding e2e
Co-authored-by: Codex <noreply@openai.com>
1 parent 44a2da9 commit 5ea4bec

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

packages/plugin-rsc/e2e/basic.test.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,6 +1404,33 @@ function defineTest(f: Fixture) {
14041404
.click()
14051405
}
14061406

1407+
test('action bind member @js', async ({ page }) => {
1408+
await page.goto(f.url())
1409+
await waitForHydration(page)
1410+
await using _ = await expectNoReload(page)
1411+
await testActionBindMember(page)
1412+
})
1413+
1414+
testNoJs('action bind member @nojs', async ({ page }) => {
1415+
await page.goto(f.url())
1416+
await testActionBindMember(page)
1417+
})
1418+
1419+
async function testActionBindMember(page: Page) {
1420+
await expect(page.getByTestId('test-server-action-bind-member')).toHaveText(
1421+
'[?]',
1422+
)
1423+
await page
1424+
.getByRole('button', { name: 'test-server-action-bind-member' })
1425+
.click()
1426+
await expect(page.getByTestId('test-server-action-bind-member')).toHaveText(
1427+
'true',
1428+
)
1429+
await page
1430+
.getByRole('button', { name: 'test-server-action-bind-reset' })
1431+
.click()
1432+
}
1433+
14071434
test('action bind client @js', async ({ page }) => {
14081435
await page.goto(f.url())
14091436
await waitForHydration(page)

0 commit comments

Comments
 (0)