bito-code-review[bot] commented on code in PR #40160:
URL: https://github.com/apache/superset/pull/40160#discussion_r3255556150
##########
superset-frontend/packages/superset-ui-core/src/components/TableCollection/index.tsx:
##########
@@ -307,7 +307,7 @@ function TableCollection<T extends object>({
components={{
header: {
cell: (props: HTMLAttributes<HTMLTableCellElement>) => (
- <th {...props} data-test="sort-header" role="columnheader" />
+ <th {...props} data-test="sort-header" />
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>E2E test breakage from selector removal</b></div>
<div id="fix">
Removing `role="columnheader"` from `<th>` will break the existing
`historyTable.header` Cypress selector which uses `[role=columnheader]`. While
`<th>` elements implicitly have columnheader role in HTML5 (making this
attribute technically redundant), the codebase's Cypress tests still depend on
it. Before merging, ensure the test in
`superset-frontend/cypress-base/cypress/support/directories.ts:171` is updated
to use the `data-test` attribute instead, consistent with how `queryHistory`
and `savedQuery` already reference `dataTestLocator('sort-header')`.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
```
---
superset-frontend/packages/superset-ui-core/src/components/TableCollection/index.tsx
+++
superset-frontend/packages/superset-ui-core/src/components/TableCollection/index.tsx
@@ -307,7 +307,7 @@
components={{
header: {
cell: (props: HTMLAttributes<HTMLTableCellElement>) => (
- <th {...props} data-test="sort-header" />
+ <th {...props} data-test="sort-header" role="columnheader" />
),
},
body: {
```
</div>
</details>
</div>
<small><i>Code Review Run #4ab358</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]