mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-12 09:12:40 +02:00
test(web): move dashboard tracer-bullet into smoke/ and harden Playwright config
This commit is contained in:
parent
87dd5af259
commit
a2976ee0b6
3 changed files with 25 additions and 24 deletions
|
|
@ -1,21 +0,0 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
/**
|
||||
* Tracer-bullet test: proves the entire E2E pipeline works end-to-end.
|
||||
*
|
||||
* Verifies:
|
||||
* - Web server is reachable
|
||||
* - Auth setup ran successfully (storageState contains valid token)
|
||||
* - Dashboard route renders for an authenticated user
|
||||
*
|
||||
* Keep this test minimal. Product-specific behaviour belongs in dedicated
|
||||
* spec files (new-chat, search-spaces, editor-panel, etc.).
|
||||
*/
|
||||
test.describe("Dashboard", () => {
|
||||
test("loads dashboard with sidebar navigation for authenticated user", async ({ page }) => {
|
||||
await page.goto("/dashboard");
|
||||
|
||||
await expect(page).toHaveURL(/\/dashboard/);
|
||||
await expect(page.getByRole("navigation").first()).toBeVisible();
|
||||
});
|
||||
});
|
||||
21
surfsense_web/tests/smoke/dashboard.spec.ts
Normal file
21
surfsense_web/tests/smoke/dashboard.spec.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
/**
|
||||
* Tracer-bullet smoke test: proves the entire E2E pipeline is wired up.
|
||||
*
|
||||
* Verifies:
|
||||
* - Web server is reachable
|
||||
* - tests/auth.setup.ts ran and stored a valid bearer token
|
||||
* - Dashboard route renders for an authenticated user
|
||||
*
|
||||
* Keep minimal. Connector- or feature-specific behaviour belongs under
|
||||
* tests/connectors/ or tests/<feature>/.
|
||||
*/
|
||||
test.describe("Smoke", () => {
|
||||
test("dashboard loads for authenticated user", async ({ page }) => {
|
||||
await page.goto("/dashboard");
|
||||
|
||||
// Sidebar is <aside> (role=complementary); its visibility implies redirect + auth fetch.
|
||||
await expect(page.getByRole("complementary").first()).toBeVisible({ timeout: 60_000 });
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue