codeant-ai-for-open-source[bot] commented on code in PR #37708:
URL: https://github.com/apache/superset/pull/37708#discussion_r2788541169
##########
superset-frontend/src/explore/components/SaveModal.test.tsx:
##########
@@ -25,6 +25,8 @@ import {
render,
waitFor,
within,
+ screen,
+ userEvent,
Review Comment:
**Suggestion:** The newly added `screen` and `userEvent` imports from the
testing helpers are never used in this test file, which will trigger linting
errors for unused variables and can cause CI to fail; they should be removed to
keep the test suite clean and passing. [code quality]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ⚠️ Frontend lint step fails on SaveModal.test.tsx unused imports.
- ⚠️ CI pipeline for PRs may block merges.
```
</details>
```suggestion
```
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. Open `superset-frontend/src/explore/components/SaveModal.test.tsx` and
observe the
imports from `spec/helpers/testing-library` at lines 23–30, including
`screen` and
`userEvent` added on lines 28–29.
2. Confirm via search (Grep on
`/workspace/superset/superset-frontend/src/explore/components/SaveModal.test.tsx`)
that
`screen` and `userEvent` only appear on the import lines and are not
referenced elsewhere
in the file.
3. Run the frontend lint task (e.g., `npm run lint` or the configured lint
script for
`superset-frontend`), which includes ESLint rules for unused
variables/imports, against
the current PR code.
4. Observe ESLint reporting errors for `screen` and `userEvent` being
defined but never
used in `SaveModal.test.tsx`, causing the lint step (and consequently CI
that runs it) to
fail until these unused imports are removed.
```
</details>
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/src/explore/components/SaveModal.test.tsx
**Line:** 28:29
**Comment:**
*Code Quality: The newly added `screen` and `userEvent` imports from
the testing helpers are never used in this test file, which will trigger
linting errors for unused variables and can cause CI to fail; they should be
removed to keep the test suite clean and passing.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F37708&comment_hash=ba7242e7f79b730b7c07133628e191c73000941e8c07f41285487a95e24560c4&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F37708&comment_hash=ba7242e7f79b730b7c07133628e191c73000941e8c07f41285487a95e24560c4&reaction=dislike'>👎</a>
--
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]