Skip to content

Commit 6dd3013

Browse files
committed
fix(cypress): update click-menu-scroll-top selector and refresh snapshot
- Replace removed .sidebar-item__title BEM class in click-menu-scroll-top.cy.js with data-testid attribute selector (same fix as pr_4435.cy.js) - Update SidebarItem snapshot to reflect new data-testid attribute on NavLink
1 parent faa3178 commit 6dd3013

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

cypress/e2e/click-menu-scroll-top.cy.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ describe("Click menu", () => {
77
// note that there's no hash in url
88
cy.get('[data-testid="contributors"]').scrollIntoView();
99

10-
const selector = '.sidebar-item__title[href="/concepts/modules/"]';
10+
const selector =
11+
'[data-testid="sidebar-item-title"][href="/concepts/modules/"]';
1112

1213
cy.get(selector).click();
1314
cy.window().then((win) => {

src/components/SidebarItem/__snapshots__/SidebarItem.test.jsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ exports[`SidebarItem matches snapshot 1`] = `
1919
<a
2020
class="flex-1 max-w-[85%] overflow-hidden whitespace-nowrap text-ellipsis text-[#2b3a42] dark:text-[#b8b8b8]"
2121
data-discover="true"
22+
data-testid="sidebar-item-title"
2223
href="/guides/getting-started/"
2324
>
2425
Getting Started

0 commit comments

Comments
 (0)