This is an automated email from the ASF dual-hosted git repository.

choo121600 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 896c0318a76 Remove unused methods from e2e test page objects (#67516)
896c0318a76 is described below

commit 896c0318a76b87ef1e18df3910c7800b184a0e1a
Author: Haseeb Malik <[email protected]>
AuthorDate: Mon May 25 23:49:06 2026 -0400

    Remove unused methods from e2e test page objects (#67516)
---
 .../src/airflow/ui/tests/e2e/global-setup.ts       |  2 +-
 .../airflow/ui/tests/e2e/pages/AssetListPage.ts    |  5 ---
 .../src/airflow/ui/tests/e2e/pages/BackfillPage.ts |  5 ---
 .../airflow/ui/tests/e2e/pages/DagRunsTabPage.ts   | 51 ----------------------
 .../ui/tests/e2e/pages/RequiredActionsPage.ts      | 11 -----
 .../src/airflow/ui/tests/e2e/pages/VariablePage.ts | 12 -----
 6 files changed, 1 insertion(+), 85 deletions(-)

diff --git a/airflow-core/src/airflow/ui/tests/e2e/global-setup.ts 
b/airflow-core/src/airflow/ui/tests/e2e/global-setup.ts
index b48163003e3..bab5353a65b 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/global-setup.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/global-setup.ts
@@ -31,7 +31,7 @@ const browsers = { chromium, firefox, webkit };
  */
 async function globalSetup(config: FullConfig) {
   const [firstProject] = config.projects as [FullConfig["projects"][number]];
-  const baseURL = firstProject.use.baseURL ?? "http://localhost:28080";;
+  const baseURL = firstProject.use.baseURL ?? testConfig.connection.baseUrl;
   const { password, username } = testConfig.credentials;
   const browserName = firstProject.name as keyof typeof browsers;
   const browserType = browsers[browserName];
diff --git a/airflow-core/src/airflow/ui/tests/e2e/pages/AssetListPage.ts 
b/airflow-core/src/airflow/ui/tests/e2e/pages/AssetListPage.ts
index c5f77696f82..e179d2a3c06 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/pages/AssetListPage.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/pages/AssetListPage.ts
@@ -65,11 +65,6 @@ export class AssetListPage extends BasePage {
     return name?.trim() ?? "";
   }
 
-  public async search(value: string): Promise<void> {
-    await this.searchInput.fill(value);
-    await this.waitForLoad();
-  }
-
   public async waitForLoad(): Promise<void> {
     await expect(this.table).toBeVisible();
     await expect(this.rows.locator("td a").first()).toBeVisible();
diff --git a/airflow-core/src/airflow/ui/tests/e2e/pages/BackfillPage.ts 
b/airflow-core/src/airflow/ui/tests/e2e/pages/BackfillPage.ts
index f8350cb2370..10eb0ae78bd 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/pages/BackfillPage.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/pages/BackfillPage.ts
@@ -23,7 +23,6 @@ import { BasePage } from "tests/e2e/pages/BasePage";
 import {
   apiCancelAllActiveBackfills,
   apiCancelBackfill,
-  apiWaitForBackfillComplete,
   apiWaitForNoActiveBackfill,
 } from "tests/e2e/utils/test-helpers";
 
@@ -449,10 +448,6 @@ export class BackfillPage extends BasePage {
     await this.pauseOrUnpauseButton.click();
   }
 
-  public async waitForBackfillComplete(backfillId: number, timeout: number = 
120_000): Promise<void> {
-    await apiWaitForBackfillComplete(this.page, backfillId, timeout);
-  }
-
   public async waitForNoActiveBackfillViaApi(dagId: string, timeout: number = 
120_000): Promise<void> {
     await apiWaitForNoActiveBackfill(this.page, dagId, timeout);
   }
diff --git a/airflow-core/src/airflow/ui/tests/e2e/pages/DagRunsTabPage.ts 
b/airflow-core/src/airflow/ui/tests/e2e/pages/DagRunsTabPage.ts
index 60fcd84ef37..df8cc6fdbc3 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/pages/DagRunsTabPage.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/pages/DagRunsTabPage.ts
@@ -67,46 +67,6 @@ export class DagRunsTabPage extends BasePage {
     }).toPass({ intervals: [2000], timeout: 30_000 });
   }
 
-  public async markRunAs(state: "failed" | "success"): Promise<void> {
-    const stateBadge = this.page.getByTestId("state-badge").first();
-
-    await expect(stateBadge).toBeVisible();
-    const currentState = await stateBadge.textContent();
-
-    if (currentState?.toLowerCase().includes(state)) {
-      return;
-    }
-
-    await expect(this.markRunAsButton).toBeVisible();
-    await this.markRunAsButton.click();
-
-    const stateOption = this.page.getByTestId(`mark-run-as-${state}`);
-
-    await expect(stateOption).toBeVisible({ timeout: 5000 });
-
-    if (await stateOption.isDisabled()) {
-      await this.page.keyboard.press("Escape");
-
-      return;
-    }
-
-    await stateOption.click();
-
-    const confirmButton = this.page.getByRole("button", { name: "Confirm" });
-
-    await expect(confirmButton).toBeVisible({ timeout: 5000 });
-
-    const responsePromise = this.page.waitForResponse(
-      (response) => response.url().includes("dagRuns") && 
response.request().method() === "PATCH",
-      { timeout: 10_000 },
-    );
-
-    await confirmButton.click();
-    await responsePromise;
-
-    await expect(confirmButton).toBeHidden();
-  }
-
   public async navigateToDag(dagId: string): Promise<void> {
     await expect(async () => {
       await this.navigateTo(`/dags/${dagId}`);
@@ -117,17 +77,6 @@ export class DagRunsTabPage extends BasePage {
     }).toPass({ intervals: [2000], timeout: 60_000 });
   }
 
-  public async navigateToRunDetails(dagId: string, runId: string): 
Promise<void> {
-    await expect(async () => {
-      await this.navigateTo(`/dags/${dagId}/runs/${runId}`);
-      await expect(this.page).toHaveURL(
-        new 
RegExp(`/dags/${DagRunsTabPage.escapeRegExp(dagId)}/runs/${DagRunsTabPage.escapeRegExp(runId)}`),
-        { timeout: 15_000 },
-      );
-      await expect(this.markRunAsButton).toBeVisible({ timeout: 15_000 });
-    }).toPass({ intervals: [2000], timeout: 60_000 });
-  }
-
   public async searchByRunIdPattern(pattern: string): Promise<void> {
     const currentUrl = new URL(this.page.url());
 
diff --git a/airflow-core/src/airflow/ui/tests/e2e/pages/RequiredActionsPage.ts 
b/airflow-core/src/airflow/ui/tests/e2e/pages/RequiredActionsPage.ts
index d4bb9ded4e6..ee2996f39b9 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/pages/RequiredActionsPage.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/pages/RequiredActionsPage.ts
@@ -42,21 +42,10 @@ export class RequiredActionsPage extends BasePage {
     return "/required_actions";
   }
 
-  public async getActionsTableRowCount(): Promise<number> {
-    const rows = this.actionsTable.locator("tbody").getByRole("row");
-    const isTableVisible = await this.actionsTable.isVisible();
-
-    return isTableVisible ? rows.count() : 0;
-  }
-
   public async isEmptyStateDisplayed(): Promise<boolean> {
     return this.emptyStateMessage.isVisible();
   }
 
-  public async isTableDisplayed(): Promise<boolean> {
-    return this.actionsTable.isVisible();
-  }
-
   public async navigateToRequiredActionsPage(): Promise<void> {
     await expect(async () => {
       await this.navigateTo(RequiredActionsPage.getRequiredActionsUrl());
diff --git a/airflow-core/src/airflow/ui/tests/e2e/pages/VariablePage.ts 
b/airflow-core/src/airflow/ui/tests/e2e/pages/VariablePage.ts
index 7fd574ed2ca..6f08d5f0038 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/pages/VariablePage.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/pages/VariablePage.ts
@@ -39,18 +39,6 @@ export class VariablePage extends BasePage {
     this.selectAllCheckbox = page.locator("thead input[type='checkbox']");
   }
 
-  public async getVariableKeys(): Promise<Array<string>> {
-    await this.waitForLoad();
-    const count = await this.tableRows.count();
-
-    if (count === 0) {
-      return [];
-    }
-    const keys = await 
this.tableRows.locator("td:nth-child(2)").allTextContents();
-
-    return keys.map((key) => key.trim()).filter(Boolean);
-  }
-
   public async navigate(): Promise<void> {
     await expect(async () => {
       await this.navigateTo("/variables");

Reply via email to