inspector/client/e2e/startup-state.spec.ts
Richard Michael 461403b624 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>
2025-07-24 13:29:45 -07:00

16 lines
449 B
TypeScript

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("#");
});
});