codeant-ai-for-open-source[bot] commented on code in PR #43264:
URL: https://github.com/apache/superset/pull/43264#discussion_r3798926795
##########
superset-frontend/src/pages/ArchivedList/ArchivedList.test.tsx:
##########
@@ -273,6 +299,28 @@ test('name search refetches with a contains filter on the
name field', async ()
});
});
+test('a search that matches nothing shows the empty-state and no restore
actions', async () => {
+ // The list answers with zero rows regardless of query -- the assertion
+ // only needs to observe the empty state a filtered, empty result produces.
+ fetchMock.get(infoEndpoint, { permissions: ['can_read', 'can_write'] });
+ fetchMock.get(listEndpoint, { result: [], count: 0 });
+ renderArchivedList();
Review Comment:
**Suggestion:** The list endpoint is configured to return an empty result
for the initial load as well as any subsequent request, so this test can pass
without the search input or Enter key causing a filtered refetch. Return
archived rows for the initial request, configure the filtered response to be
empty, and assert that a request containing `e2e_nonexistent` was made before
checking the empty state. [logic error]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ❌ Jest coverage can pass when search handling is broken.
- ⚠️ The archived-list search regression remains undetected.
- ⚠️ A false-positive test weakens CI protection for `ArchivedList`.
```
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=b049b158971049d9a07be0e84a34845f&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=b049b158971049d9a07be0e84a34845f&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/src/pages/ArchivedList/ArchivedList.test.tsx
**Line:** 305:307
**Comment:**
*Logic Error: The list endpoint is configured to return an empty result
for the initial load as well as any subsequent request, so this test can pass
without the search input or Enter key causing a filtered refetch. Return
archived rows for the initial request, configure the filtered response to be
empty, and assert that a request containing `e2e_nonexistent` was made before
checking the empty state.
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.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43264&comment_hash=5fa2d1cead6d8b28462f7c409db058dd338afdc5472a418e4a239f28c2c9385e&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43264&comment_hash=5fa2d1cead6d8b28462f7c409db058dd338afdc5472a418e4a239f28c2c9385e&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]