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
+4 -4
View File
@@ -204,7 +204,7 @@ test.describe('SVC: Services depth', () => {
test('[V25-SVC-008] SVC-008 Subscription lock CSRF-less POST is rejected', async ({ request }) => {
skipIfMissing('SUBSCRIPTION_A_ID');
const resp = await request.post(
`${BASE_URL}/services/${idOr('SUBSCRIPTION_A_ID')}/lock`,
`${BASE_URL}/services/engagements/${idOr('SUBSCRIPTION_A_ID')}/lock`,
{ form: { csrf_token: '' } }
).catch(() => null);
if (!resp || [404, 405].includes(resp.status())) test.skip(true, 'Route not available');
@@ -213,7 +213,7 @@ test.describe('SVC: Services depth', () => {
test('[V25-SVC-009] SVC-009 Bulk lock CSRF-less POST is rejected', async ({ request }) => {
const resp = await request.post(
`${BASE_URL}/services/bulk-lock`,
`${BASE_URL}/services/engagements/bulk-lock`,
{ form: { csrf_token: '' } }
).catch(() => null);
if (!resp || [404, 405].includes(resp.status())) test.skip(true, 'Route not available');
@@ -223,7 +223,7 @@ test.describe('SVC: Services depth', () => {
test('[V25-SVC-010] SVC-010 Subscription generate CSRF-less POST is rejected', async ({ request }) => {
skipIfMissing('SUBSCRIPTION_A_ID');
const resp = await request.post(
`${BASE_URL}/services/subscriptions/${idOr('SUBSCRIPTION_A_ID')}/generate`,
`${BASE_URL}/services/work-tracker/subscriptions/${idOr('SUBSCRIPTION_A_ID')}/generate`,
{ form: { csrf_token: '' } }
).catch(() => null);
if (!resp || [404, 405].includes(resp.status())) test.skip(true, 'Route not available');
@@ -246,7 +246,7 @@ test.describe('SVC: Services depth', () => {
test('[V25-SVC-013] SVC-013 Task bulk-update CSRF-less POST is rejected', async ({ request }) => {
const resp = await request.post(
`${BASE_URL}/services/tasks/bulk-update`,
`${BASE_URL}/services/work-tracker/tasks/bulk-update`,
{ form: { csrf_token: '' } }
).catch(() => null);
if (!resp || [404, 405].includes(resp.status())) test.skip(true, 'Route not available');