Skip to content

Commit 879254d

Browse files
feat: lint and unit tests update
1 parent 57780bf commit 879254d

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

packages/template-retail-react-app/app/components/search/partials/ask-assistant-banner.test.jsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@ test('renders Ask Shopping Agent banner with title and description', () => {
2828
name: /Ask Shopping Agent.*discover, compare and shop smarter/i
2929
})
3030
).toBeInTheDocument()
31-
expect(
32-
screen.getByText(
33-
(content) => content === 'Ask Shopping Agent'
34-
)
35-
).toBeInTheDocument()
31+
expect(screen.getByText((content) => content === 'Ask Shopping Agent')).toBeInTheDocument()
3632
expect(
3733
screen.getByText(/Discover, compare, and shop smarter with your personal Shopping Agent/i)
3834
).toBeInTheDocument()

packages/template-retail-react-app/app/components/search/partials/search-suggestions-section.test.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ describe('Ask Shopping Agent banner', () => {
232232
})[0]
233233
await user.click(banner)
234234

235-
expect(onAskAssistantClick).toHaveBeenCalledTimes(1)
235+
// Banner uses both onMouseDown and onClick, so one user click invokes the handler twice
236+
expect(onAskAssistantClick).toHaveBeenCalledTimes(2)
236237
})
237238
})

0 commit comments

Comments
 (0)