Add E2E tests for logout, account CRUD, and file operations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-05 20:40:46 +08:00
parent 733bfd7509
commit 1a4062487e
5 changed files with 249 additions and 0 deletions

View File

@@ -43,6 +43,22 @@ export function setupApiIntercepts() {
body: { success: true },
}).as('putUser');
// User detail (GET /api/users/:username)
cy.intercept('GET', '/api/users/*', {
fixture: 'api/user-detail.json',
}).as('getUserDetail');
// User roles
cy.intercept('PUT', '/api/users/*/roles/*', {
statusCode: 200,
body: { success: true },
}).as('putUserRole');
cy.intercept('DELETE', '/api/users/*/roles/*', {
statusCode: 200,
body: { success: true },
}).as('deleteUserRole');
// Discover (map data)
cy.intercept('GET', '/api/logs/*/discover', {
fixture: 'api/discover.json',