b34b0dd7d6
Validators (Pushes and Pull Requests) / UI & Storage Validation (pull_request) Failing after 12s
Validators (Pushes and Pull Requests) / Database & Schema Validation (pull_request) Successful in 13s
Validators (Pushes and Pull Requests) / Core Validators & Database Setup (pull_request) Failing after 28s
Validators (Pushes and Pull Requests) / WBS & Audit Validations (pull_request) Has been skipped
Validators (Pushes and Pull Requests) / .NET Contracts (pull_request) Has been skipped
Validators (Pushes and Pull Requests) / Calibration & Performance (pull_request) Has been skipped
Validators (Pushes and Pull Requests) / Operational Report & Decision Packet (pull_request) Has been skipped
Validators (Pushes and Pull Requests) / CI Workflow Lint (pull_request) Failing after 10s
Validators (Pushes and Pull Requests) / Security & Secrets (pull_request) Successful in 12s
Validators (Pushes and Pull Requests) / Notify PR Results (pull_request) Successful in 2s
Frontend CI Pipeline / ci-frontend-8-steps (pull_request) Failing after 2m50s
30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
import { test, expect } from "@playwright/test"
|
|
|
|
test("Complete admin navigation", async ({ page }) => {
|
|
// Login
|
|
await page.goto("http://localhost:5173/login")
|
|
await page.fill("input[type='text']", "admin")
|
|
await page.fill("input[type='password']", "password")
|
|
await page.click("button[type='submit']")
|
|
await page.waitForURL(/admin\/dashboard/, { timeout: 5000 })
|
|
console.log("✅ Logged in")
|
|
|
|
// Test all sidebar links
|
|
const links = [
|
|
{ text: "Dashboard", path: /admin\/dashboard/ },
|
|
{ text: "Orders", path: /admin\/orders/ },
|
|
{ text: "Products", path: /admin\/products/ },
|
|
{ text: "Customers", path: /admin\/customers/ },
|
|
{ text: "Inventory", path: /admin\/inventory/ },
|
|
{ text: "Warehouses", path: /admin\/warehouses/ }
|
|
]
|
|
|
|
for (const link of links) {
|
|
await page.click(`text=${link.text}`)
|
|
await page.waitForURL(link.path, { timeout: 5000 })
|
|
const heading = await page.locator("h2.page-title, h1").first()
|
|
expect(heading).toBeTruthy()
|
|
console.log(`✅ ${link.text} page loaded`)
|
|
}
|
|
})
|