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


##########
airflow-core/src/airflow/ui/tests/e2e/pages/PluginsPage.ts:
##########
@@ -22,43 +22,19 @@ import { BasePage } from "./BasePage";
 
 export class PluginsPage extends BasePage {
   public readonly heading: Locator;
+  public readonly nameColumn: Locator;
   public readonly rows: Locator;
+  public readonly sourceColumn: Locator;
   public readonly table: Locator;
 
   public constructor(page: Page) {
     super(page);
 
-    this.heading = page.getByRole("heading", {
-      name: /plugins/i,
-    });
+    this.heading = page.getByRole("heading", { name: /plugins/i });
     this.table = page.getByTestId("table-list");
-    this.rows = this.table.locator("tbody tr").filter({
-      has: page.locator("td"),
-    });
-  }
-
-  public async getPluginCount(): Promise<number> {
-    return this.rows.count();
-  }
-
-  public async getPluginNames(): Promise<Array<string>> {
-    const count = await this.rows.count();
-
-    if (count === 0) {
-      return [];
-    }
-
-    return this.rows.locator("td:first-child").allTextContents();
-  }
-
-  public async getPluginSources(): Promise<Array<string>> {
-    const count = await this.rows.count();
-
-    if (count === 0) {
-      return [];
-    }
-
-    return this.rows.locator("td:nth-child(2)").allTextContents();
+    this.rows = this.table.locator("tbody tr").filter({ has: 
page.locator("td") });
+    this.nameColumn = this.rows.locator("td:nth-child(1)");
+    this.sourceColumn = this.rows.locator("td:nth-child(2)");

Review Comment:
   If modifying `TableList.tsx` improves test stability, it might be worth 
considering that option as well.
   Our goal is to improve overall test stability and keep test patterns 
consistent, so feel free to explore that approach if it makes sense.



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