Files
OmniRoute/tests/e2e/navigation.spec.ts
diegosouzapw 699329944e feat: initial OmniRoute release (rebranded from 9router)
This project is inspired by and originally forked from 9router by decolua
(https://github.com/decolua/9router).

Full rebrand: 9router → OmniRoute across all source code, configuration,
Docker, documentation, and assets.
2026-02-13 16:29:27 -03:00

29 lines
1.0 KiB
TypeScript

import { test, expect } from "@playwright/test";
test.describe("Dashboard Navigation", () => {
test("redirects unauthenticated user to /login", async ({ page }) => {
const response = await page.goto("/dashboard");
// Should either show login page or redirect to /login
await page.waitForURL(/\/(login|dashboard)/);
const url = page.url();
// The app should show some kind of page (login or dashboard)
expect(url).toMatch(/\/(login|dashboard)/);
});
test("login page renders with form elements", async ({ page }) => {
await page.goto("/login");
// Should show some form of authentication UI
const body = page.locator("body");
await expect(body).toBeVisible();
});
test("/docs page renders documentation", async ({ page }) => {
await page.goto("/docs");
const body = page.locator("body");
await expect(body).toBeVisible();
// Docs should contain some content
const text = await body.textContent();
expect(text?.length).toBeGreaterThan(100);
});
});