rusackas commented on code in PR #41636:
URL: https://github.com/apache/superset/pull/41636#discussion_r3543521922
##########
superset-frontend/playwright/pages/ChartCreationPage.ts:
##########
@@ -41,7 +41,14 @@ export class ChartCreationPage {
* Gets the dataset selector container (includes the displayed selection
value)
*/
getDatasetSelectContainer(): Locator {
- return this.page.getByLabel('Dataset', { exact: false }).first();
+ // antd v6 moved the `aria-label` onto the combobox <input> itself, so
+ // getByLabel('Dataset') resolves to the empty input (no text content). The
+ // selected value is rendered in the `.ant-select-content-has-value`
element
+ // (which also wraps that input), so scope to it to read the displayed
value.
+ return this.page
+ .locator('.ant-select-content-has-value')
+ .filter({ has: this.page.getByLabel('Dataset', { exact: false }) })
+ .first();
}
Review Comment:
Checked the pinned `@rc-component/select`@1.8.2 source, single mode renders
`.ant-select-content-has-value` on the wrapper div.
`.ant-select-selection-item` only shows up for multi-select tags, so swapping
to it here would break the single-select case. Keeping the original selector.
--
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]