Skip to content
Closed
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
16 changes: 8 additions & 8 deletions packages/rsc/e2e/basic.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { createHash } from "node:crypto";
import { readFileSync } from "node:fs";
import { type Page, expect, test } from "@playwright/test";
Expand Down Expand Up @@ -250,7 +250,7 @@
const res = await page.goto(f.url());
expect(await res?.text()).toContain("Client [edit] Counter");
editor.reset();
await page.getByRole("button", { name: "Client Counter: 0" }).click();

Check failure on line 253 in packages/rsc/e2e/basic.test.ts

View workflow job for this annotation

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

[webkit] › e2e/basic.test.ts:235:5 › dev-isolated › client hmr

1) [webkit] › e2e/basic.test.ts:235:5 › dev-isolated › client hmr ──────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Client Counter: 0' }) 251 | expect(await res?.text()).toContain("Client [edit] Counter"); 252 | editor.reset(); > 253 | await page.getByRole("button", { name: "Client Counter: 0" }).click(); | ^ 254 | }); 255 | 256 | test("non-boundary client hmr", async ({ page }) => { at /Users/runner/work/vite-plugins/vite-plugins/packages/rsc/e2e/basic.test.ts:253:69

Check failure on line 253 in packages/rsc/e2e/basic.test.ts

View workflow job for this annotation

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

[webkit] › e2e/basic.test.ts:235:5 › dev-isolated › client hmr

1) [webkit] › e2e/basic.test.ts:235:5 › dev-isolated › client hmr ──────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('button', { name: 'Client Counter: 0' }) 251 | expect(await res?.text()).toContain("Client [edit] Counter"); 252 | editor.reset(); > 253 | await page.getByRole("button", { name: "Client Counter: 0" }).click(); | ^ 254 | }); 255 | 256 | test("non-boundary client hmr", async ({ page }) => { at /Users/runner/work/vite-plugins/vite-plugins/packages/rsc/e2e/basic.test.ts:253:69
});

test("non-boundary client hmr", async ({ page }) => {
Expand Down Expand Up @@ -562,12 +562,12 @@
await expect(page.locator(".test-tw-client")).toHaveCSS(
"color",
// blue-500
"oklch(0.623 0.214 259.815)",
"rgb(0, 0, 255)",
);
await expect(page.locator(".test-tw-server")).toHaveCSS(
"color",
// red-500
"oklch(0.637 0.237 25.331)",
"rgb(255, 0, 0)",
);
}

Expand All @@ -582,27 +582,27 @@
await using _ = await expectNoReload(page);

const clientFile = f.createEditor("src/routes/client.tsx");
clientFile.edit((s) => s.replaceAll("text-blue-500", "text-blue-600"));
clientFile.edit((s) => s.replaceAll("text-[#00f]", "text-[#88f]"));
await expect(page.locator(".test-tw-client")).toHaveCSS(
"color",
"oklch(0.546 0.245 262.881)",
"rgb(136, 136, 255)",
);
clientFile.reset();
await expect(page.locator(".test-tw-client")).toHaveCSS(
"color",
"oklch(0.623 0.214 259.815)",
"rgb(0, 0, 255)",
);

const serverFile = f.createEditor("src/routes/root.tsx");
serverFile.edit((s) => s.replaceAll("text-red-500", "text-red-600"));
serverFile.edit((s) => s.replaceAll("text-[#f00]", "text-[#f88]"));
await expect(page.locator(".test-tw-server")).toHaveCSS(
"color",
"oklch(0.577 0.245 27.325)",
"rgb(255, 136, 136)",
);
serverFile.reset();
await expect(page.locator(".test-tw-server")).toHaveCSS(
"color",
"oklch(0.637 0.237 25.331)",
"rgb(255, 0, 0)",
);
});

Expand Down
2 changes: 1 addition & 1 deletion packages/rsc/examples/basic/src/routes/client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function TestStyleClient() {
}

export function TestTailwindClient() {
return <div className="test-tw-client text-blue-500">test-tw-client</div>;
return <div className="test-tw-client text-[#00f]">test-tw-client</div>;
}

export function TestTemporaryReference(props: {
Expand Down
2 changes: 1 addition & 1 deletion packages/rsc/examples/basic/src/routes/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function Root(props: { url: URL }) {
)}
</div>
<TestTailwindClient />
<div className="test-tw-server text-red-500">test-tw-server</div>
<div className="test-tw-server text-[#f00]">test-tw-server</div>
<TestTemporaryReference
action={async (node: React.ReactNode) => {
"use server";
Expand Down
4 changes: 3 additions & 1 deletion packages/rsc/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ export default defineConfig({
],
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
reporter: process.env.CI ? "github" : "list",
reporter: ["list", process.env.CI && "github"]
.filter(Boolean)
.map((name) => [name] as any),
}) as any;
Loading