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


##########
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:
   Better to use a data-testid here over CSS selectors



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