bito-code-review[bot] commented on PR #40914:
URL: https://github.com/apache/superset/pull/40914#issuecomment-4664206590
<!-- Bito Reply -->
The suggestion to capture and restore the full `window.location.href` is
appropriate. This approach ensures that the pathname and hash are preserved,
preventing potential state leakage to subsequent tests. Below is the
recommended update for the test setup:
```typescript
const originalHref = window.location.href;
// ... test logic ...
window.history.replaceState({}, '', originalHref);
```
**superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.test.tsx**
```
const originalHref = window.location.href;
// ... test logic ...
window.history.replaceState({}, '', originalHref);
```
--
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]