choo121600 commented on code in PR #63559:
URL: https://github.com/apache/airflow/pull/63559#discussion_r2945095553


##########
airflow-core/src/airflow/ui/tests/e2e/pages/DagsPage.ts:
##########
@@ -525,8 +492,13 @@ export class DagsPage extends BasePage {
 
   private async selectDropdownOption(filter: Locator, value: string): 
Promise<void> {
     await filter.click();
-    await 
this.page.locator(`div[role="option"][data-value="${value}"]`).dispatchEvent("click");
-    await this.page.waitForTimeout(500);
+
+    const option = 
this.page.locator(`div[role="option"][data-value="${value}"]`);
+
+    await expect(option).toBeVisible({ timeout: 5000 });
+    await option.click();
+
+    await expect(this.page.locator('div[role="listbox"]')).toBeHidden({ 
timeout: 5000 });

Review Comment:
   `toBeHidden()` can be unreliable on WebKit for Chakra UI's Select component.
   When the dropdown closes, Chakra does not remove the element from the DOM. 
Instead, it sets `data-state="closed"` and hides it via a CSS transition.
   
   However, Playwright's visibility check may resolve before the transition 
completes, causing the element to still be considered visible even though the 
state is already closed.
   
   It might be more reliable to assert on Chakra's internal state instead:
   ```
   await expect(dropdown).toHaveAttribute("data-state", "closed", { timeout: 
5000 });
   ```
   The same issue likely applies to `selectDropdownOption`, where 
`toBeHidden()` is used on the listbox.



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