Migrate Cypress E2E from cy.intercept to MSW service worker

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-22 09:30:22 +08:00
parent b978071f94
commit 3d1de913f8
27 changed files with 184 additions and 307 deletions

View File

@@ -12,7 +12,6 @@ describe("Account Management", () => {
it("displays user list on account admin page", () => {
cy.visit("/account-admin");
cy.wait("@getUsers");
// Should display users from fixture
cy.contains("Test Admin").should("exist");
cy.contains("Alice Wang").should("exist");
@@ -21,14 +20,13 @@ describe("Account Management", () => {
it("shows active/inactive status badges", () => {
cy.visit("/account-admin");
cy.wait("@getUsers");
cy.contains("Test Admin").should("exist");
// The user list should show status indicators
cy.contains("testadmin").should("exist");
});
it("navigates to my-account page", () => {
cy.visit("/my-account");
cy.wait("@getMyAccount");
cy.url().should("include", "/my-account");
});
});