Some checks failed
CI/CD Pipeline / unit-tests (push) Failing after 1m16s
CI/CD Pipeline / integration-tests (push) Failing after 2m32s
CI/CD Pipeline / lint (push) Successful in 5m22s
CI/CD Pipeline / e2e-tests (push) Has been skipped
CI/CD Pipeline / build (push) Has been skipped
47 lines
1.4 KiB
TypeScript
47 lines
1.4 KiB
TypeScript
import { test, expect } from '@playwright/test'
|
|
|
|
test.describe('Full User Journey E2E', () => {
|
|
test('complete user workflow', async ({ page }) => {
|
|
// Start at dashboard
|
|
await page.goto('http://localhost:5173/')
|
|
await page.waitForLoadState('networkidle')
|
|
await expect(page).toHaveURL(/\/$/)
|
|
|
|
// Navigate through all pages
|
|
const navigationFlow = [
|
|
{ link: 'Servers', urlPattern: /servers/ },
|
|
{ link: 'Templates', urlPattern: /templates/ },
|
|
{ link: 'Scaling', urlPattern: /scaling/ },
|
|
{ link: 'Providers', urlPattern: /providers/ },
|
|
{ link: 'Cluster Health', urlPattern: /health/ },
|
|
{ link: 'Settings', urlPattern: /settings/ },
|
|
{ link: 'Dashboard', urlPattern: /\/$/ }
|
|
]
|
|
|
|
for (const step of navigationFlow) {
|
|
await page.click(`text=${step.link}`)
|
|
await page.waitForTimeout(500)
|
|
await expect(page).toHaveURL(step.urlPattern)
|
|
}
|
|
})
|
|
|
|
test('navigation works with browser back button', async ({ page }) => {
|
|
await page.goto('http://localhost:5173/')
|
|
await page.waitForLoadState('networkidle')
|
|
|
|
// Navigate to servers
|
|
await page.click('text=Servers')
|
|
await page.waitForTimeout(500)
|
|
|
|
// Use browser back
|
|
await page.goBack()
|
|
await page.waitForTimeout(500)
|
|
await expect(page).toHaveURL(/\/$/)
|
|
|
|
// Use browser forward
|
|
await page.goForward()
|
|
await page.waitForTimeout(500)
|
|
await expect(page).toHaveURL(/servers/)
|
|
})
|
|
})
|