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:
@@ -14,21 +14,21 @@ describe("Discover Performance Page", () => {
|
||||
|
||||
it("page loads and loading overlay disappears", () => {
|
||||
// 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", () => {
|
||||
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");
|
||||
});
|
||||
|
||||
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");
|
||||
});
|
||||
|
||||
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("Processing Time").should("be.visible");
|
||||
cy.contains("Waiting Time").should("be.visible");
|
||||
@@ -36,7 +36,7 @@ describe("Discover Performance Page", () => {
|
||||
});
|
||||
|
||||
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("Cycle Efficiency").should("be.visible");
|
||||
cy.contains("Average Processing Time").should("be.visible");
|
||||
@@ -45,19 +45,19 @@ describe("Discover Performance Page", () => {
|
||||
});
|
||||
|
||||
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("Number of Cases by Activity").should("be.visible");
|
||||
});
|
||||
|
||||
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
|
||||
cy.get("canvas").should("have.length.at.least", 5);
|
||||
});
|
||||
|
||||
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
|
||||
cy.contains("li", "Waiting Time").click();
|
||||
// The Waiting Time section should be in view
|
||||
|
||||
Reference in New Issue
Block a user