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
@@ -170,7 +170,7 @@ test.describe('BILL: Invoices and payments', () => {
test('[V25-BILL-009] BILL-009 Invoice post CSRF-less POST is rejected', async ({ request }) => {
skipIfMissing('INVOICE_A_ID');
const resp = await request.post(
`${BASE_URL}/billing/invoices/${idOr('INVOICE_A_ID')}/issue`,
`${BASE_URL}/billing/${idOr('INVOICE_A_ID')}/issue`,
{ form: { csrf_token: '' } }
).catch(() => null);
if (!resp || [404, 405].includes(resp.status())) test.skip(true, 'Route not available');
@@ -180,8 +180,8 @@ test.describe('BILL: Invoices and payments', () => {
test('[V25-BILL-010] BILL-010 New payment CSRF-less POST is rejected', async ({ request }) => {
skipIfMissing('INVOICE_A_ID');
const resp = await request.post(
`${BASE_URL}/billing/invoices/${idOr('INVOICE_A_ID')}/payments/new`,
{ form: { amount: '1000', csrf_token: '' } }
`${BASE_URL}/billing/${idOr('INVOICE_A_ID')}/payments/new`,
{ form: { payment_date: '2026-06-27', amount_received: '1000', csrf_token: '' } }
).catch(() => null);
if (!resp || [404, 405].includes(resp.status())) test.skip(true, 'Route not available');
expect([400, 401, 403, 422].includes(resp.status())).toBeTruthy();