bito-code-review[bot] commented on code in PR #43310:
URL: https://github.com/apache/superset/pull/43310#discussion_r3810703518
##########
superset-frontend/src/features/dashboards/DashboardCard.test.tsx:
##########
@@ -101,6 +102,43 @@ test('Renders the modified date', () => {
expect(modifiedDateElement).toBeInTheDocument();
});
+test('clicking the thumbnail navigates to the dashboard exactly once', () => {
+ // The cover is a router link and the whole card is clickable, so a click on
+ // the cover used to be handled twice and pushed two identical entries, which
+ // left the Back button popping the duplicate rather than returning the user
+ // to the page they came from.
+ jest.spyOn(global, 'fetch').mockResolvedValue({
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Unrestored spy in test leaks across tests</b></div>
<div id="fix">
The `jest.spyOn(global, 'fetch')` at line 110 is never restored. Tests that
run after this one will still have the mocked fetch, causing cross-test
pollution.
</div>
</div>
<small><i>Code Review Run #f222ec</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]