import { test, expect } from './fixtures'; test.describe('Superadmin CRUD & UI Consistency', () => { test('should show superadmin navigation and theme consistency', async ({ page }) => { await page.goto('/admin'); const tutorsLink = page.locator('nav >> text=Tutor:innen'); await expect(tutorsLink).toBeVisible(); const mainContainer = page.locator('.paper-bg'); await expect(mainContainer).toBeVisible(); const header = page.locator('.serif').first(); await expect(header).toBeVisible(); const fontFamily = await header.evaluate(el => window.getComputedStyle(el).fontFamily); expect(fontFamily).toContain('Source Serif'); }); test('should allow superadmin to navigate to tutors and see the list', async ({ page }) => { await page.goto('/admin'); await page.click('nav >> text=Tutor:innen'); await expect(page).toHaveURL(/\/admin\/tutors/); const tableHeader = page.locator('th >> text=Name / E-Mail'); await expect(tableHeader).toBeVisible(); await expect(page.locator('text=Demo Admin')).toBeVisible(); }); test('should allow superadmin to see course assignment UI', async ({ page }) => { await page.goto('/admin'); await page.click('nav >> text=Kurse'); await expect(page).toHaveURL(/\/admin\/courses/); await expect(page.locator('text=Neuen Kurs anlegen')).toBeVisible(); const tutorSelect = page.locator('select.tiny').first(); await expect(tutorSelect).toBeVisible(); }); });