Use String.raw for backslash-escaped CSS selectors in Cypress tests (S7780)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,21 +13,21 @@ describe("Discover Conformance Page", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("page loads and loading overlay disappears", () => {
|
it("page loads and loading overlay disappears", () => {
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("displays Rule Settings sidebar", () => {
|
it("displays Rule Settings sidebar", () => {
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
cy.contains("Rule Settings").should("be.visible");
|
cy.contains("Rule Settings").should("be.visible");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("displays Conformance Checking Results heading", () => {
|
it("displays Conformance Checking Results heading", () => {
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
cy.contains("Conformance Checking Results").should("be.visible");
|
cy.contains("Conformance Checking Results").should("be.visible");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("displays rule type radio options", () => {
|
it("displays rule type radio options", () => {
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
cy.contains("Have activity").should("be.visible");
|
cy.contains("Have activity").should("be.visible");
|
||||||
cy.contains("Activity sequence").should("be.visible");
|
cy.contains("Activity sequence").should("be.visible");
|
||||||
cy.contains("Activity duration").should("be.visible");
|
cy.contains("Activity duration").should("be.visible");
|
||||||
@@ -37,18 +37,18 @@ describe("Discover Conformance Page", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("displays Clear and Apply buttons", () => {
|
it("displays Clear and Apply buttons", () => {
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
cy.contains("button", "Clear").should("be.visible");
|
cy.contains("button", "Clear").should("be.visible");
|
||||||
cy.contains("button", "Apply").should("exist");
|
cy.contains("button", "Apply").should("exist");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("displays Activity list area", () => {
|
it("displays Activity list area", () => {
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
cy.contains("Activity list").should("be.visible");
|
cy.contains("Activity list").should("be.visible");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("displays default placeholder values in results", () => {
|
it("displays default placeholder values in results", () => {
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
cy.contains("Conformance Rate").should("be.visible");
|
cy.contains("Conformance Rate").should("be.visible");
|
||||||
cy.contains("Cases").should("be.visible");
|
cy.contains("Cases").should("be.visible");
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,21 +14,21 @@ describe("Discover Performance Page", () => {
|
|||||||
|
|
||||||
it("page loads and loading overlay disappears", () => {
|
it("page loads and loading overlay disappears", () => {
|
||||||
// Loading overlay should not be visible after data loads
|
// Loading overlay should not be visible after data loads
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("displays Time Usage sidebar section", () => {
|
it("displays Time Usage sidebar section", () => {
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
cy.contains("Time Usage").should("be.visible");
|
cy.contains("Time Usage").should("be.visible");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("displays Frequency sidebar section", () => {
|
it("displays Frequency sidebar section", () => {
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
cy.contains("Frequency").should("be.visible");
|
cy.contains("Frequency").should("be.visible");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("displays sidebar navigation items", () => {
|
it("displays sidebar navigation items", () => {
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
cy.contains("Cycle Time & Efficiency").should("be.visible");
|
cy.contains("Cycle Time & Efficiency").should("be.visible");
|
||||||
cy.contains("Processing Time").should("be.visible");
|
cy.contains("Processing Time").should("be.visible");
|
||||||
cy.contains("Waiting Time").should("be.visible");
|
cy.contains("Waiting Time").should("be.visible");
|
||||||
@@ -36,7 +36,7 @@ describe("Discover Performance Page", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("displays chart titles", () => {
|
it("displays chart titles", () => {
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
cy.contains("Average Cycle Time").should("be.visible");
|
cy.contains("Average Cycle Time").should("be.visible");
|
||||||
cy.contains("Cycle Efficiency").should("be.visible");
|
cy.contains("Cycle Efficiency").should("be.visible");
|
||||||
cy.contains("Average Processing Time").should("be.visible");
|
cy.contains("Average Processing Time").should("be.visible");
|
||||||
@@ -45,19 +45,19 @@ describe("Discover Performance Page", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("displays frequency chart titles", () => {
|
it("displays frequency chart titles", () => {
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
cy.contains("New Cases").should("be.visible");
|
cy.contains("New Cases").should("be.visible");
|
||||||
cy.contains("Number of Cases by Activity").should("be.visible");
|
cy.contains("Number of Cases by Activity").should("be.visible");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("renders canvas elements for charts", () => {
|
it("renders canvas elements for charts", () => {
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
// Chart.js renders into canvas elements
|
// Chart.js renders into canvas elements
|
||||||
cy.get("canvas").should("have.length.at.least", 5);
|
cy.get("canvas").should("have.length.at.least", 5);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("sidebar navigation scrolls to section", () => {
|
it("sidebar navigation scrolls to section", () => {
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
// Click on "Waiting Time" in sidebar
|
// Click on "Waiting Time" in sidebar
|
||||||
cy.contains("li", "Waiting Time").click();
|
cy.contains("li", "Waiting Time").click();
|
||||||
// The Waiting Time section should be in view
|
// The Waiting Time section should be in view
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ describe("Discover Tab Navigation", () => {
|
|||||||
cy.get(".nav-item").contains("PERFORMANCE").click();
|
cy.get(".nav-item").contains("PERFORMANCE").click();
|
||||||
cy.url().should("include", "/performance");
|
cy.url().should("include", "/performance");
|
||||||
cy.wait("@getPerformance");
|
cy.wait("@getPerformance");
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
cy.contains("Time Usage").should("be.visible");
|
cy.contains("Time Usage").should("be.visible");
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ describe("Discover Tab Navigation", () => {
|
|||||||
cy.get(".nav-item").contains("CONFORMANCE").click();
|
cy.get(".nav-item").contains("CONFORMANCE").click();
|
||||||
cy.url().should("include", "/conformance");
|
cy.url().should("include", "/conformance");
|
||||||
cy.wait("@getLogCheckParams");
|
cy.wait("@getLogCheckParams");
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
cy.contains("Rule Settings").should("be.visible");
|
cy.contains("Rule Settings").should("be.visible");
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ describe("Discover Tab Navigation", () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit("/discover/log/297310264/performance");
|
cy.visit("/discover/log/297310264/performance");
|
||||||
cy.wait("@getPerformance");
|
cy.wait("@getPerformance");
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("clicking MAP tab navigates to map page", () => {
|
it("clicking MAP tab navigates to map page", () => {
|
||||||
@@ -64,7 +64,7 @@ describe("Discover Tab Navigation", () => {
|
|||||||
cy.get(".nav-item").contains("CONFORMANCE").click();
|
cy.get(".nav-item").contains("CONFORMANCE").click();
|
||||||
cy.url().should("include", "/conformance");
|
cy.url().should("include", "/conformance");
|
||||||
cy.wait("@getLogCheckParams");
|
cy.wait("@getLogCheckParams");
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
cy.contains("Rule Settings").should("be.visible");
|
cy.contains("Rule Settings").should("be.visible");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -73,7 +73,7 @@ describe("Discover Tab Navigation", () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit("/discover/log/297310264/conformance");
|
cy.visit("/discover/log/297310264/conformance");
|
||||||
cy.wait("@getLogCheckParams");
|
cy.wait("@getLogCheckParams");
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("clicking MAP tab navigates to map page", () => {
|
it("clicking MAP tab navigates to map page", () => {
|
||||||
@@ -87,7 +87,7 @@ describe("Discover Tab Navigation", () => {
|
|||||||
cy.get(".nav-item").contains("PERFORMANCE").click();
|
cy.get(".nav-item").contains("PERFORMANCE").click();
|
||||||
cy.url().should("include", "/performance");
|
cy.url().should("include", "/performance");
|
||||||
cy.wait("@getPerformance");
|
cy.wait("@getPerformance");
|
||||||
cy.get(".z-\\[9999\\]", { timeout: 10000 }).should("not.exist");
|
cy.get(String.raw`.z-\[9999\]`, { timeout: 10000 }).should("not.exist");
|
||||||
cy.contains("Time Usage").should("be.visible");
|
cy.contains("Time Usage").should("be.visible");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user