sjyangkevin commented on code in PR #63463:
URL: https://github.com/apache/airflow/pull/63463#discussion_r2940674713


##########
airflow-core/src/airflow/ui/tests/e2e/pages/EventsPage.ts:
##########
@@ -129,54 +129,40 @@ export class EventsPage extends BasePage {
   public async setFilterValue(filterLabel: string, value: string): 
Promise<void> {
     const filterPill = this.getFilterPill(filterLabel);
 
-    if ((await filterPill.count()) > 0) {
+    if (await filterPill.isVisible()) {
       await filterPill.click();
     }
 
-    // Wait for input to appear and fill it
-    const filterInput = this.page.locator(`input[placeholder*="${filterLabel}" 
i], input`).last();
+    const filterInput = this.page
+      .locator("div")
+      .filter({ hasText: `${filterLabel}:` })
+      .locator("input")
+      .first();

Review Comment:
   Thanks @choo121600 for the feedback. I attempted to update this to 
`getByRole`, but getting frequent timeout when testing locally. I wonder if the 
timeout is related to the flaky parts or some issues in the UI.
   
   I got below analysis from Claude Code, but I am validating it.
   > InputWithAddon.tsx:42-54 renders the label as a Chakra <Text> (renders as 
<p>) — not a semantic <label>. The <Input> at line 55 has no aria-label, 
aria-labelledby, or id. So currently getByRole("textbox", { name: "Event Type" 
}) finds nothing
   
   I think another way I can check is to update this to use `getByRole`, but 
running it in the debug mode, and then run for each browser one by one, to 
inspect if this can run properly. If so, then it is likely due to the flaky 
parts, then I will update it to use `getByRole` and then push changes.
   
   Do you think it is a good direction to approach? Thanks



-- 
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]

Reply via email to