mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
fix: complete dashboard hydration
This commit is contained in:
1 parent
03877a0971
commit
d07b9249c8
16 files changed
+468
-60
No files matched your search
@@ -45,13 +45,31 @@ describe("Playwright CI determinism", () => {
|
||||
expect(config.retries).toBe(2);
|
||||
expect(config.failOnFlakyTests).toBe(true);
|
||||
expect(config.reporter).toEqual([["github"], ["html", { open: "never" }]]);
|
||||
expect(config.webServer).toMatchObject({
|
||||
command: expect.stringContaining(
|
||||
`${JSON.stringify(process.execPath)} .next/standalone/server.js`,
|
||||
),
|
||||
env: expect.objectContaining({
|
||||
NATIVE_CANVAS: "off",
|
||||
}),
|
||||
// Two servers, and which is which matters. The suite's own server runs
|
||||
// with the dashboard's RSC prefetch OFF so `page.route` fixtures govern
|
||||
// what the dashboard paints; the second runs it ON, which is the default
|
||||
// and therefore the only configuration self-hosters ever see. A React #418
|
||||
// hydration bailout shipped on `/` precisely because nothing in CI ran the
|
||||
// shipped one. Pin both so that gap cannot reopen by deletion.
|
||||
const servers = config.webServer;
|
||||
expect(Array.isArray(servers)).toBe(true);
|
||||
const webServers = servers as Array<Record<string, unknown>>;
|
||||
expect(webServers).toHaveLength(2);
|
||||
for (const server of webServers) {
|
||||
expect(server).toMatchObject({
|
||||
command: expect.stringContaining(
|
||||
`${JSON.stringify(process.execPath)} .next/standalone/server.js`,
|
||||
),
|
||||
env: expect.objectContaining({
|
||||
NATIVE_CANVAS: "off",
|
||||
}),
|
||||
});
|
||||
}
|
||||
expect(webServers[0]!.env).toMatchObject({
|
||||
DASHBOARD_SSR_PREFETCH: "false",
|
||||
});
|
||||
expect(webServers[1]!.env).toMatchObject({
|
||||
DASHBOARD_SSR_PREFETCH: "true",
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user