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/) }) })