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:
@@ -12,7 +12,7 @@ describe("Files Page", () => {
|
||||
});
|
||||
|
||||
it("displays the file list after login", () => {
|
||||
cy.wait("@getFiles");
|
||||
cy.contains("sample-process.xes").should("exist");
|
||||
cy.contains("h2", "All Files").should("exist");
|
||||
// Should display file names from fixture
|
||||
cy.contains("sample-process.xes").should("exist");
|
||||
@@ -21,37 +21,37 @@ describe("Files Page", () => {
|
||||
});
|
||||
|
||||
it("shows Recently Used section", () => {
|
||||
cy.wait("@getFiles");
|
||||
cy.contains("sample-process.xes").should("exist");
|
||||
cy.contains("h2", "Recently Used").should("exist");
|
||||
});
|
||||
|
||||
it("switches to DISCOVER tab", () => {
|
||||
cy.wait("@getFiles");
|
||||
cy.contains("sample-process.xes").should("exist");
|
||||
cy.contains(".nav-item", "DISCOVER").click();
|
||||
// DISCOVER tab shows filtered file types
|
||||
cy.contains("h2", "All Files").should("exist");
|
||||
});
|
||||
|
||||
it("switches to COMPARE tab and shows drag zones", () => {
|
||||
cy.wait("@getFiles");
|
||||
cy.contains("sample-process.xes").should("exist");
|
||||
cy.contains(".nav-item", "COMPARE").click();
|
||||
cy.contains("Performance Comparison").should("exist");
|
||||
cy.contains("Drag and drop a file here").should("exist");
|
||||
});
|
||||
|
||||
it("shows Import button on FILES tab", () => {
|
||||
cy.wait("@getFiles");
|
||||
cy.contains("sample-process.xes").should("exist");
|
||||
cy.get("#import_btn").should("contain", "Import");
|
||||
});
|
||||
|
||||
it("can switch between list and grid view", () => {
|
||||
cy.wait("@getFiles");
|
||||
cy.contains("sample-process.xes").should("exist");
|
||||
// DataTable (list view) should be visible by default
|
||||
cy.get("table").should("exist");
|
||||
});
|
||||
|
||||
it("double-click file navigates to discover page", () => {
|
||||
cy.wait("@getFiles");
|
||||
cy.contains("sample-process.xes").should("exist");
|
||||
// Double-click the first file row in the table
|
||||
// The actual route depends on file type (log→map, log-check→conformance, etc.)
|
||||
cy.get("table tbody tr").first().dblclick();
|
||||
|
||||
Reference in New Issue
Block a user