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:
@@ -13,7 +13,7 @@ describe("Discover Tab Navigation", () => {
|
||||
describe("navigating from Map page", () => {
|
||||
beforeEach(() => {
|
||||
cy.visit("/discover/log/297310264/map");
|
||||
cy.wait("@getDiscover");
|
||||
cy.get("#cy").should("exist");
|
||||
});
|
||||
|
||||
it("shows DISCOVER heading and MAP/CONFORMANCE/PERFORMANCE tabs", () => {
|
||||
@@ -27,7 +27,6 @@ describe("Discover Tab Navigation", () => {
|
||||
it("clicking PERFORMANCE tab navigates to performance page", () => {
|
||||
cy.get(".nav-item").contains("PERFORMANCE").click();
|
||||
cy.url().should("include", "/performance");
|
||||
cy.wait("@getPerformance");
|
||||
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||
cy.contains("Time Usage").should("be.visible");
|
||||
});
|
||||
@@ -35,7 +34,6 @@ describe("Discover Tab Navigation", () => {
|
||||
it("clicking CONFORMANCE tab navigates to conformance page", () => {
|
||||
cy.get(".nav-item").contains("CONFORMANCE").click();
|
||||
cy.url().should("include", "/conformance");
|
||||
cy.wait("@getLogCheckParams");
|
||||
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||
cy.contains("Rule Settings").should("be.visible");
|
||||
});
|
||||
@@ -49,21 +47,19 @@ describe("Discover Tab Navigation", () => {
|
||||
describe("navigating from Performance page", () => {
|
||||
beforeEach(() => {
|
||||
cy.visit("/discover/log/297310264/performance");
|
||||
cy.wait("@getPerformance");
|
||||
cy.get(".chart-container, canvas").should("exist");
|
||||
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||
});
|
||||
|
||||
it("clicking MAP tab navigates to map page", () => {
|
||||
cy.get(".nav-item").contains("MAP").click();
|
||||
cy.url().should("include", "/map");
|
||||
cy.wait("@getDiscover");
|
||||
cy.get("#cy").should("exist");
|
||||
});
|
||||
|
||||
it("clicking CONFORMANCE tab navigates to conformance page", () => {
|
||||
cy.get(".nav-item").contains("CONFORMANCE").click();
|
||||
cy.url().should("include", "/conformance");
|
||||
cy.wait("@getLogCheckParams");
|
||||
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||
cy.contains("Rule Settings").should("be.visible");
|
||||
});
|
||||
@@ -72,21 +68,19 @@ describe("Discover Tab Navigation", () => {
|
||||
describe("navigating from Conformance page", () => {
|
||||
beforeEach(() => {
|
||||
cy.visit("/discover/log/297310264/conformance");
|
||||
cy.wait("@getLogCheckParams");
|
||||
cy.get(".p-radiobutton, [class*=conformance]").first().should("exist");
|
||||
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||
});
|
||||
|
||||
it("clicking MAP tab navigates to map page", () => {
|
||||
cy.get(".nav-item").contains("MAP").click();
|
||||
cy.url().should("include", "/map");
|
||||
cy.wait("@getDiscover");
|
||||
cy.get("#cy").should("exist");
|
||||
});
|
||||
|
||||
it("clicking PERFORMANCE tab navigates to performance page", () => {
|
||||
cy.get(".nav-item").contains("PERFORMANCE").click();
|
||||
cy.url().should("include", "/performance");
|
||||
cy.wait("@getPerformance");
|
||||
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||
cy.contains("Time Usage").should("be.visible");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user