Loheide-eu-mitarbeiterplatt.../tests/Browser/lists.spec.js
Friederich Loheide e211db9f30
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Has been skipped
CI / PHP 8.4 / mariadb:10.6 (pull_request) Has been skipped
CI / PHP 8.3 / mariadb:11.4 (pull_request) Has been skipped
CI / PHP 8.4 / mariadb:11.4 (pull_request) Has been skipped
CI / PHP 8.3 / mysql:8.0 (pull_request) Has been skipped
CI / PHP 8.4 / mysql:8.0 (pull_request) Has been skipped
CI / PHP 8.3 / mysql:8.4 (pull_request) Has been skipped
CI / PHP 8.4 / mysql:8.4 (pull_request) Has been skipped
CI / Browser-Tests (pull_request) Failing after 7m34s
CI / PHP 8.3 / mysql:8.4-1 (pull_request) Successful in 11m55s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 16m43s
CI / Build-Artefakte aktuell (pull_request) Successful in 13m17s
Automatische Updates, Browser-Tests, CI grün (0.63.0)
- Opt-in „Updates automatisch installieren“ (AutoUpdate, alle 10 Minuten)
- Playwright-Tests in tests/Browser, CI-Job „Browser-Tests“
- CI: volle Matrix nur auf main, PRs mit einem MySQL-Job
- MySQL-JSON-Reihenfolge in zwei Tests, QM-Suchausschnitt ohne <mark>, h1 auf Startseite/Editor

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 17:29:20 +00:00

34 lines
1.4 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { expect, test } from '@playwright/test';
import { watchErrors } from './helpers.js';
test('Neuigkeiten: suchen, filtern und Ansicht merken', async ({ page }) => {
const errors = watchErrors(page);
await page.goto('/neuigkeiten');
await page.getByPlaceholder('Beiträge durchsuchen').fill('Sommer');
await page.waitForURL(/q=Sommer/);
await expect(page.getByRole('main').getByRole('link', { name: /Sommer/ }).first()).toBeVisible();
await page.getByRole('button', { name: 'Als Liste' }).click();
await page.reload();
await expect(page.getByRole('button', { name: 'Als Liste' })).toHaveAttribute('aria-pressed', 'true');
await page.getByRole('button', { name: 'Als Kacheln' }).click();
errors.assertNone();
});
test('Globale Suche findet Neuigkeiten', async ({ page }) => {
await page.goto('/suche?q=Sommer');
await expect(page.getByRole('main').getByRole('link', { name: /Sommerfest/ }).first()).toBeVisible();
// Ausschnitte sind reiner Text – keine sichtbaren HTML-Reste
await expect(page.getByRole('main')).not.toContainText('<mark>');
});
test('Personen: Suche filtert das Verzeichnis', async ({ page }) => {
const errors = watchErrors(page);
await page.goto('/personen');
await page.getByRole('main').getByRole('searchbox').fill('Ada');
await page.waitForURL(/q=Ada/);
await expect(page.getByRole('main').getByText('Ada Admin')).toBeVisible();
errors.assertNone();
});