Fix Playwright BASE_URL handling and failed UAT report tests

This commit is contained in:
A R R R Associates
2026-06-26 20:38:14 +05:30
parent 21c90749fb
commit ce9935c684
21 changed files with 98 additions and 53 deletions
+2 -1
View File
@@ -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();
});