Pyasma commented on code in PR #63516:
URL: https://github.com/apache/airflow/pull/63516#discussion_r2964022697


##########
airflow-core/src/airflow/ui/tests/e2e/pages/ConnectionsPage.ts:
##########
@@ -91,15 +93,23 @@ export class ConnectionsPage extends BasePage {
     this.successAlert = page.locator('[data-scope="toast"][data-part="root"]');
 
     // Delete confirmation dialog
-    this.confirmDeleteButton = 
page.locator('button:has-text("Delete")').first();
+    this.confirmDeleteButton = page.getByRole("button", { name: "Delete" 
}).first();
     this.rowsPerPageSelect = page.locator("select");
 
     // Sorting and filtering
     this.tableHeader = page.locator('[role="columnheader"]').first();
-    this.connectionIdHeader = page.locator("th:has-text('Connection 
ID')").first();
-    this.connectionTypeHeader = page.locator('th:has-text("Connection 
Type")').first();
-    this.hostHeader = page.locator('th:has-text("Host")').first();
+    this.connectionIdHeader = page

Review Comment:
   hey choo I tried to use `getByRole` but the Thing is `getByRole `captures 
first name it comes across in the original code there is Button element which 
has it's own name 
   
   Seems like it's falling cause it returns that name 
   ```
   <Table.ColumnHeader colSpan={colSpan} key={id} whiteSpace="nowrap">
         {isPlaceholder ? undefined : (
           <Button
             aria-label={translate("sort")}
             disabled={!canSort}
             onClick={column.getToggleSortingHandler()}
             variant="plain"
           >
             {text}
             {rightIcon}
           </Button>
         )}
         {showFilters ? <FilterMenuButton table={table} /> : undefined}
       </Table.ColumnHeader>
   ```
   i think it would be better to fall back to the old method but what's your 
suggestion 



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