fix(context-center): route entity delete + playwright regex through new path

DeleteWidgetClassBase still returned the old 'knowledgeCenter' URL segment for
KnowledgePage / KnowledgeCenter entity deletes, so the UI was issuing
DELETE /api/v1/knowledgeCenter/{id}?hardDelete=... — which the server no
longer serves, returning 404. ContextCenter playwright spec also had a leftover
escaped regex (/\/api\/v1\/knowledgeCenter\/.../) matching the same legacy URL.

Point both at /api/v1/contextCenter/pages so the Knowledge Center / Context
Center delete flows reach the server again.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Sriharsha Chintalapani 2026-05-19 08:35:50 -07:00
parent 844a8736d2
commit c34552217f
2 changed files with 2 additions and 2 deletions

View file

@ -802,7 +802,7 @@ test.describe('Context Center', () => {
await page.getByTestId('confirmation-text-input').fill('DELETE');
const apiDeleteRes = page.waitForResponse(
/\/api\/v1\/knowledgeCenter\/.+\?hardDelete=true/
/\/api\/v1\/contextCenter\/pages\/.+\?hardDelete=true/
);
await page.getByTestId('confirm-button').click();
await apiDeleteRes;

View file

@ -54,7 +54,7 @@ class DeleteWidgetClassBase {
return `drives/${entityType}s`;
case EntityType.KNOWLEDGE_CENTER:
case EntityType.KNOWLEDGE_PAGE:
return 'knowledgeCenter';
return 'contextCenter/pages';
default:
return `${entityType}s`;
}