Fix Playwright BASE_URL handling and failed UAT report tests
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const { test, expect, request } = require('@playwright/test');
|
||||
require('dotenv').config();
|
||||
const { BASE_URL, absoluteUrl } = require('../fixtures/url');
|
||||
const { login, fillFirst, clickFirst } = require('../fixtures/auth');
|
||||
const { expectBlockedOrSafe, expectNoServerError, expectSecurityHeaders } = require('../fixtures/assertions');
|
||||
|
||||
@@ -14,7 +15,7 @@ test('VAPT-TARGET-002 unauthorized protected URL redirects or blocks', async ({
|
||||
});
|
||||
|
||||
test('VAPT-TARGET-003 CSRF negative request should not create case', async () => {
|
||||
const api = await request.newContext({ baseURL: process.env.BASE_URL });
|
||||
const api = await request.newContext({ baseURL: BASE_URL });
|
||||
const resp = await api.post('/notice-cases/new', { form: { title: 'csrf-negative', reference_no: 'CSRF-NEG' } });
|
||||
expect([400,401,403,404,405,422,303].includes(resp.status())).toBeTruthy();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user