Fix Playwright skipped test route mismatches

This commit is contained in:
A R R R Associates
2026-06-27 15:24:07 +05:30
parent ab91130511
commit 6bf24cf860
4 changed files with 17 additions and 12 deletions
+3 -3
View File
@@ -254,10 +254,10 @@ test.describe('EMP-HR: Employee documents', () => {
test('[V25-EMP-DOC-003] EMP-DOC-003 Executable upload to employee documents is blocked', async ({ page }) => {
skipIfMissing('EMPLOYEE_A_ID');
await login(page, 'Firm Admin');
await safeGoto(page, `/employees/${idOr('EMPLOYEE_A_ID')}`);
await safeGoto(page, `/employees/documents?employee_id=${idOr('EMPLOYEE_A_ID')}`);
await expectNoBackendError(page);
const fileInput = page.locator('input[type="file"]').first();
if (!(await fileInput.count())) test.skip(true, 'No file input on employee detail page');
const fileInput = page.locator('input[type="file"][name="document_file"], input[type="file"]').first();
expect(await fileInput.count(), 'Employee document upload input should be present on /employees/documents').toBeGreaterThan(0);
const { uploadPath } = require('../fixtures/v204-helpers');
await fileInput.setInputFiles(uploadPath('not-a-pdf.exe'));
const submit = page.locator('form:has(input[type="file"]) button[type="submit"]').first();