Enhance frontend testing setup and refactor TrainingPlanningPageRoot component
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 37s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 19s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m21s
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 37s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 19s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m21s
- Added Vitest as a testing framework and included test scripts in package.json for improved testing capabilities. - Refactored TrainingPlanningPageRoot component by removing unused state variables and imports, streamlining the code for better readability and performance. - Introduced new utility functions for planning routes to enhance navigation within the training planning interface.
This commit is contained in:
1 parent
295c7e7efc
commit
16eaf839e7
17 files changed
+1854
-786
No files matched your search
@@ -305,6 +305,46 @@ test('13. Trainingsplanung: Rahmen-Import-Dialog öffnet und schließt', async (
|
||||
console.log('✓ Trainingsplanung: Rahmen-Import-Dialog Smoke');
|
||||
});
|
||||
|
||||
test('14. Trainingsplanung: Bearbeiten navigiert zur Edit-Route', async ({ page }, testInfo) => {
|
||||
await login(page);
|
||||
await page.goto('/planning', { waitUntil: 'networkidle' });
|
||||
const main = page.locator('.app-main');
|
||||
await expect(main.locator('.spinner')).toHaveCount(0, { timeout: 25000 });
|
||||
const editBtn = main.getByRole('button', { name: 'Bearbeiten' }).first();
|
||||
if (!(await editBtn.count())) {
|
||||
testInfo.skip(true, 'Keine Trainingseinheit in der Liste');
|
||||
return;
|
||||
}
|
||||
await editBtn.click();
|
||||
await page.waitForURL(/\/planning\/units\/\d+\/edit/, { timeout: 15000 });
|
||||
await expect(page.getByTestId('planning-unit-form')).toBeVisible({ timeout: 15000 });
|
||||
console.log('✓ Trainingsplanung: Edit-Route aus Hub');
|
||||
});
|
||||
|
||||
test('15. Trainingsplanung: Legacy-Deep-Link ?unit= leitet auf Edit-Route um', async ({ page }, testInfo) => {
|
||||
await login(page);
|
||||
await page.goto('/planning', { waitUntil: 'networkidle' });
|
||||
const main = page.locator('.app-main');
|
||||
await expect(main.locator('.spinner')).toHaveCount(0, { timeout: 25000 });
|
||||
const editBtn = main.getByRole('button', { name: 'Bearbeiten' }).first();
|
||||
if (!(await editBtn.count())) {
|
||||
testInfo.skip(true, 'Keine Trainingseinheit in der Liste');
|
||||
return;
|
||||
}
|
||||
await editBtn.click();
|
||||
await page.waitForURL(/\/planning\/units\/(\d+)\/edit/, { timeout: 15000 });
|
||||
const m = page.url().match(/\/planning\/units\/(\d+)\/edit/);
|
||||
const unitId = m?.[1];
|
||||
if (!unitId) {
|
||||
testInfo.skip(true, 'Unit-ID aus Edit-URL nicht ermittelbar');
|
||||
return;
|
||||
}
|
||||
await page.goto(`/planning?unit=${unitId}`, { waitUntil: 'networkidle' });
|
||||
await page.waitForURL(new RegExp(`/planning/units/${unitId}/edit`), { timeout: 15000 });
|
||||
await expect(page.getByTestId('planning-unit-form')).toBeVisible({ timeout: 15000 });
|
||||
console.log('✓ Trainingsplanung: Legacy ?unit= Redirect');
|
||||
});
|
||||
|
||||
test('P-12: sessionStorage wird bei Logout bereinigt (sj_coach_* Schlüssel)', async ({ page }) => {
|
||||
await page.setViewportSize({ width: 1280, height: 800 });
|
||||
await login(page);
|
||||
|
||||
Reference in new issue
Block a user