Add tests for URL fragment routing behavior with order-independent window mocking
- Add tests for hash routing based on server capabilities priority - Test that no hash is set when disconnected - Add e2e test verifying startup has no hash fragment - Use Jest module mocking for useConnection hook states 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
28d3fc56c1
commit
461403b624
1 changed files with 175 additions and 0 deletions
16
client/e2e/startup-state.spec.ts
Normal file
16
client/e2e/startup-state.spec.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { test, expect } from "@playwright/test";
|
||||
|
||||
// Adjust the URL if your dev server runs on a different port
|
||||
const APP_URL = "http://localhost:6274/";
|
||||
|
||||
test.describe("Startup State", () => {
|
||||
test("should not navigate to a tab when Inspector first opens", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto(APP_URL);
|
||||
|
||||
// Check that there is no hash fragment in the URL
|
||||
const url = page.url();
|
||||
expect(url).not.toContain("#");
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue