Skip to content

Commit b838793

Browse files
committed
fix navigation menu test for cloud item link; rename the variable createCloudLink -> createCloudItem as there is a different link element
1 parent 4054950 commit b838793

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

redisinsight/ui/src/components/navigation-menu/NavigationMenu.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ describe('NavigationMenu', () => {
165165
it('should render cloud link', () => {
166166
const { container } = render(<NavigationMenu />)
167167

168-
const createCloudLink = container.querySelector(
169-
'[data-test-subj="create-cloud-nav-link"]',
168+
const createCloudItem = container.querySelector(
169+
'[data-testid="create-cloud-sidebar-item"]',
170170
)
171-
expect(createCloudLink).toBeTruthy()
171+
expect(createCloudItem).toBeTruthy()
172172
})
173173

174174
it('should render github btn with proper link', () => {

redisinsight/ui/src/components/navigation-menu/components/create-cloud/CreateCloud.spec.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ describe('CreateCloud', () => {
4747

4848
it('should call proper actions on click cloud button', () => {
4949
const { container } = render(sideBarWithCreateCloud)
50-
const createCloudLink = container.querySelector(
50+
const createCloudItem = container.querySelector(
5151
'[data-testid="create-cloud-sidebar-item"]',
5252
)
5353

54-
fireEvent.click(createCloudLink as Element)
54+
fireEvent.click(createCloudItem as Element)
5555

5656
expect(store.getActions()).toEqual([
5757
setSSOFlow(OAuthSocialAction.Create),
@@ -73,11 +73,11 @@ describe('CreateCloud', () => {
7373
},
7474
})
7575
const { container } = render(sideBarWithCreateCloud)
76-
const createCloudLink = container.querySelector(
76+
const createCloudItem = container.querySelector(
7777
'[data-testid="create-cloud-sidebar-item"]',
7878
)
7979

80-
fireEvent.click(createCloudLink as Element)
80+
fireEvent.click(createCloudItem as Element)
8181

8282
expect(sendEventTelemetry).toBeCalledWith({
8383
event: HELP_LINKS.cloud.event,
@@ -90,9 +90,9 @@ describe('CreateCloud', () => {
9090
it('should not render if cloud ads feature flag is disabled', () => {
9191
mockFeatureFlags(false)
9292
const { container } = render(sideBarWithCreateCloud)
93-
const createCloudLink = container.querySelector(
93+
const createCloudItem = container.querySelector(
9494
'[data-testid="create-cloud-db-link"]',
9595
)
96-
expect(createCloudLink).not.toBeInTheDocument()
96+
expect(createCloudItem).not.toBeInTheDocument()
9797
})
9898
})

0 commit comments

Comments
 (0)