Fix Playwright skipped test route mismatches
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user