Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/cli/cypress/e2e/index.cy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const { isBindingElement } = require("typescript");

describe("index page tests", () => {
beforeEach(() => {
cy.visit("/");
Expand All @@ -8,10 +6,12 @@ describe("index page tests", () => {
it("should redirect index to previewFunction with tree", () => {
cy.location("pathname").should("eq", "/previews/Welcome/preview");

cy.contains("preview")
// Scope to the treeitem rather than the label text so the assertions stay
// valid when the label is wrapped (e.g. in a truncating element).
cy.contains('[role="treeitem"]', "preview")
.should("have.attr", "aria-selected", "true")
.should("have.attr", "role", "treeitem");
cy.contains("Emails")
cy.contains('[role="treeitem"]', "Emails")
.should("have.attr", "aria-expanded", "true")
.should("have.attr", "aria-selected", "false")
.should("have.attr", "role", "treeitem");
Expand Down
Loading