wip:milestone 0 fixes
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

This commit is contained in:
2026-03-15 12:35:42 +02:00
parent 6708cf28a7
commit cffdf8af86
61266 changed files with 4511646 additions and 1938 deletions

View File

@@ -0,0 +1,59 @@
import { test, expect } from '@playwright/test'
test.describe('Dashboard E2E - Comprehensive', () => {
test.beforeEach(async ({ page }) => {
await page.goto('http://localhost:5173/')
await page.waitForLoadState('networkidle')
})
test('displays all dashboard elements', async ({ page }) => {
// Check main heading
await expect(page.locator('h1, h2, h3, h4').first()).toBeVisible()
// Check for statistics cards
const statsCards = page.locator('.MuiPaper-root, .MuiCard-root')
await expect(statsCards.first()).toBeVisible()
// Check for resource usage displays
await expect(page.locator('text=/CPU|Memory|Storage/i')).toBeVisible()
})
test('navigates to all pages from dashboard', async ({ page }) => {
const pages = [
{ name: 'Servers', url: /servers/ },
{ name: 'Templates', url: /templates/ },
{ name: 'Scaling', url: /scaling/ },
{ name: 'Providers', url: /providers/ }
]
for (const pageData of pages) {
await page.click(`text=${pageData.name}`)
await page.waitForTimeout(500)
await expect(page).toHaveURL(pageData.url)
// Navigate back to dashboard
await page.click('text=Dashboard')
await page.waitForTimeout(500)
}
})
test('displays cluster statistics', async ({ page }) => {
await expect(page.locator('text=/servers/i')).toBeVisible()
await expect(page.locator('text=/\d+/')).toBeVisible() // Numbers for stats
})
test('shows responsive design', async ({ page }) => {
// Test mobile view
await page.setViewportSize({ width: 375, height: 667 })
await page.waitForTimeout(500)
// Should still show main content
await expect(page.locator('h1, h2, h3, h4').first()).toBeVisible()
// Test desktop view
await page.setViewportSize({ width: 1920, height: 1080 })
await page.waitForTimeout(500)
await expect(page.locator('h1, h2, h3, h4').first()).toBeVisible()
})
})

View File

@@ -0,0 +1,46 @@
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/)
})
})

View File

@@ -0,0 +1,26 @@
import { test, expect } from '@playwright/test'
test.describe('Scaling E2E - Comprehensive', () => {
test.beforeEach(async ({ page }) => {
await page.goto('http://localhost:5173/scaling')
await page.waitForLoadState('networkidle')
})
test('displays scaling configuration UI', async ({ page }) => {
await expect(page.locator('text=/scaling/i')).toBeVisible()
// Check for form controls
await expect(page.locator('[role="combobox"], select').first()).toBeVisible()
// Check for sliders
await expect(page.locator('text=/nodes|workers|database/i')).toBeVisible()
})
test('has provider selection', async ({ page }) => {
await expect(page.locator('text=/provider|hetzner/i')).toBeVisible()
})
test('has create scaling plan button', async ({ page }) => {
await expect(page.locator('button:has-text("Create"), button:has-text("Plan")')).toBeVisible()
})
})

View File

@@ -0,0 +1,41 @@
import { test, expect } from '@playwright/test'
test.describe('Servers E2E - Comprehensive', () => {
test.beforeEach(async ({ page }) => {
await page.goto('http://localhost:5173/servers')
await page.waitForLoadState('networkidle')
})
test('displays servers page with all elements', async ({ page }) => {
// Check page title
await expect(page.locator('text=/servers/i')).toBeVisible()
// Check for data grid or table
const grid = page.locator('.MuiDataGrid-root, table')
await expect(grid.first()).toBeVisible()
// Check for add button
await expect(page.locator('button:has-text("Add")').or(page.locator('text=/add server/i'))).toBeVisible()
})
test('interacts with server list', async ({ page }) => {
// Wait for data to load
await page.waitForTimeout(1000)
// Check for server data
const serverText = await page.textContent('body')
expect(serverText?.toLowerCase()).toMatch(/server|worker|node/i)
})
test('navigates to other pages', async ({ page }) => {
// Navigate to templates
await page.click('text=Templates')
await page.waitForURL('**/templates')
await expect(page).toHaveURL(/templates/)
// Navigate to scaling
await page.click('text=Scaling')
await page.waitForURL('**/scaling')
await expect(page).toHaveURL(/scaling/)
})
})

View File

@@ -0,0 +1,28 @@
import { test, expect } from '@playwright/test'
test.describe('Templates E2E - Comprehensive', () => {
test.beforeEach(async ({ page }) => {
await page.goto('http://localhost:5173/templates')
await page.waitForLoadState('networkidle')
})
test('displays template catalog', async ({ page }) => {
await expect(page.locator('text=/templates/i')).toBeVisible()
// Check for template cards
const cards = page.locator('.MuiCard-root')
await expect(cards.first()).toBeVisible()
})
test('shows pricing information', async ({ page }) => {
await expect(page.locator('text=/€|EUR|cost|price/i')).toBeVisible()
})
test('displays template details', async ({ page }) => {
// Wait for templates to load
await page.waitForTimeout(1000)
const text = await page.textContent('body')
expect(text?.toLowerCase()).toMatch(/worker|database|memory|cpu/i)
})
})