This is an automated email from the ASF dual-hosted git repository.
rahulvats 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 2851c7464b9 Remove pagination and sorting tests from UI E2E tests
(#62462)
2851c7464b9 is described below
commit 2851c7464b9d306a1b7369d0b183384219e0a178
Author: Rahul Vats <[email protected]>
AuthorDate: Wed Feb 25 19:56:19 2026 +0530
Remove pagination and sorting tests from UI E2E tests (#62462)
Remove pagination and sorting tests
---
.../src/airflow/ui/tests/e2e/pages/DagRunsPage.ts | 43 --------
.../airflow/ui/tests/e2e/pages/DagRunsTabPage.ts | 78 ---------------
.../src/airflow/ui/tests/e2e/pages/DagsPage.ts | 76 ---------------
.../src/airflow/ui/tests/e2e/pages/EventsPage.ts | 108 +--------------------
.../airflow/ui/tests/e2e/pages/ProvidersPage.ts | 34 +------
.../ui/tests/e2e/pages/RequiredActionsPage.ts | 67 +------------
.../ui/tests/e2e/pages/TaskInstancesPage.ts | 55 -----------
.../src/airflow/ui/tests/e2e/pages/XComsPage.ts | 40 --------
.../src/airflow/ui/tests/e2e/specs/asset.spec.ts | 20 ----
.../ui/tests/e2e/specs/dag-audit-log.spec.ts | 38 --------
.../ui/tests/e2e/specs/dag-runs-tab.spec.ts | 20 ----
.../airflow/ui/tests/e2e/specs/dag-runs.spec.ts | 4 -
.../airflow/ui/tests/e2e/specs/dags-list.spec.ts | 85 ----------------
.../airflow/ui/tests/e2e/specs/events-page.spec.ts | 2 +-
.../airflow/ui/tests/e2e/specs/providers.spec.ts | 51 ----------
.../ui/tests/e2e/specs/requiredAction.spec.ts | 6 --
.../ui/tests/e2e/specs/task-instances.spec.ts | 24 -----
.../src/airflow/ui/tests/e2e/specs/xcoms.spec.ts | 5 -
18 files changed, 8 insertions(+), 748 deletions(-)
diff --git a/airflow-core/src/airflow/ui/tests/e2e/pages/DagRunsPage.ts
b/airflow-core/src/airflow/ui/tests/e2e/pages/DagRunsPage.ts
index 080def6218d..8ace70b132e 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/pages/DagRunsPage.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/pages/DagRunsPage.ts
@@ -82,49 +82,6 @@ export class DagRunsPage extends BasePage {
expect(await dataLinks.count()).toBeGreaterThan(0);
}
- /**
- * Verify pagination controls and navigation
- */
- public async verifyPagination(limit: number): Promise<void> {
- await this.navigateTo(`${DagRunsPage.dagRunsUrl}?offset=0&limit=${limit}`);
- await this.page.waitForURL(/.*limit=/, { timeout: 10_000 });
- await this.page.waitForLoadState("networkidle");
- await this.dagRunsTable.waitFor({ state: "visible", timeout: 10_000 });
-
- const dataLinks = this.dagRunsTable.locator("a[href*='/dags/']");
-
- await expect(dataLinks.first()).toBeVisible({ timeout: 30_000 });
-
- const rows = this.dagRunsTable.locator("tbody tr");
-
- expect(await rows.count()).toBeGreaterThan(0);
-
- const paginationNav = this.page.locator('nav[aria-label="pagination"],
[role="navigation"]');
-
- await expect(paginationNav.first()).toBeVisible({ timeout: 10_000 });
-
- const page1Button = this.page.getByRole("button", { name: /page 1|^1$/ });
-
- await expect(page1Button.first()).toBeVisible({ timeout: 5000 });
-
- const page2Button = this.page.getByRole("button", { name: /page 2|^2$/ });
- const hasPage2 = await page2Button
- .first()
- .isVisible()
- .catch(() => false);
-
- if (hasPage2) {
- await page2Button.first().click();
- await this.page.waitForLoadState("networkidle");
- await this.dagRunsTable.waitFor({ state: "visible", timeout: 10_000 });
-
- const dataLinksPage2 = this.dagRunsTable.locator("a[href*='/dags/']");
- const noDataMessage =
this.page.locator("text=/no.*data|no.*runs|no.*results/i");
-
- await
expect(dataLinksPage2.first().or(noDataMessage.first())).toBeVisible({ timeout:
30_000 });
- }
- }
-
/**
* Verify that run details are displayed in the table row
*/
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 1e5a3e0c943..f89130f0a20 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/pages/DagRunsTabPage.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/pages/DagRunsTabPage.ts
@@ -21,57 +21,18 @@ import { BasePage } from "tests/e2e/pages/BasePage";
export class DagRunsTabPage extends BasePage {
public readonly markRunAsButton: Locator;
- public readonly nextPageButton: Locator;
- public readonly prevPageButton: Locator;
public readonly runsTable: Locator;
public readonly tableRows: Locator;
public readonly triggerButton: Locator;
- private currentDagId?: string;
- private currentLimit?: number;
-
public constructor(page: Page) {
super(page);
this.markRunAsButton =
page.locator('[data-testid="mark-run-as-button"]').first();
- this.nextPageButton = page.locator('[data-testid="next"]');
- this.prevPageButton = page.locator('[data-testid="prev"]');
this.runsTable = page.locator('[data-testid="table-list"]');
this.tableRows = this.runsTable.locator("tbody tr");
this.triggerButton = page.locator('[data-testid="trigger-dag-button"]');
}
- public async clickNextPage(): Promise<void> {
- await this.waitForRunsTableToLoad();
- const firstRunLink =
this.tableRows.first().locator("a[href*='/runs/']").first();
-
- await expect(firstRunLink).toBeVisible();
- const firstRunId = await firstRunLink.textContent();
-
- if (firstRunId === null || firstRunId === "") {
- throw new Error("Could not get first run ID before pagination");
- }
-
- await this.nextPageButton.click();
- await expect(this.tableRows.first()).not.toContainText(firstRunId, {
timeout: 10_000 });
- await this.ensureUrlParams();
- }
-
- public async clickPrevPage(): Promise<void> {
- await this.waitForRunsTableToLoad();
- const firstRunLink =
this.tableRows.first().locator("a[href*='/runs/']").first();
-
- await expect(firstRunLink).toBeVisible();
- const firstRunId = await firstRunLink.textContent();
-
- if (firstRunId === null || firstRunId === "") {
- throw new Error("Could not get first run ID before pagination");
- }
-
- await this.prevPageButton.click();
- await expect(this.tableRows.first()).not.toContainText(firstRunId, {
timeout: 10_000 });
- await this.ensureUrlParams();
- }
-
public async clickRunAndVerifyDetails(): Promise<void> {
const firstRunLink =
this.tableRows.first().locator("a[href*='/runs/']").first();
@@ -90,17 +51,6 @@ export class DagRunsTabPage extends BasePage {
await this.waitForRunsTableToLoad();
}
- public async clickRunsTabWithPageSize(dagId: string, pageSize: number):
Promise<void> {
- this.currentDagId = dagId;
- this.currentLimit = pageSize;
-
- await this.navigateTo(`/dags/${dagId}/runs?offset=0&limit=${pageSize}`);
- await this.page.waitForURL(/.*\/dags\/[^/]+\/runs.*offset=0&limit=/, {
- timeout: 15_000,
- });
- await this.waitForRunsTableToLoad();
- }
-
public async filterByState(state: string): Promise<void> {
const currentUrl = new URL(this.page.url());
@@ -110,12 +60,6 @@ export class DagRunsTabPage extends BasePage {
await this.waitForRunsTableToLoad();
}
- public async getRowCount(): Promise<number> {
- await this.waitForRunsTableToLoad();
-
- return this.tableRows.count();
- }
-
public async markRunAs(state: "failed" | "success"): Promise<void> {
const stateBadge =
this.page.locator('[data-testid="state-badge"]').first();
@@ -269,26 +213,4 @@ export class DagRunsTabPage extends BasePage {
await expect(dataLink.or(noDataMessage)).toBeVisible({ timeout: 30_000 });
}
-
- private async ensureUrlParams(): Promise<void> {
- if (this.currentLimit === undefined || this.currentDagId === undefined) {
- return;
- }
-
- const currentUrl = this.page.url();
- const url = new URL(currentUrl);
- const hasLimit = url.searchParams.has("limit");
- const hasOffset = url.searchParams.has("offset");
-
- if (hasLimit && !hasOffset) {
- url.searchParams.set("offset", "0");
- await this.navigateTo(url.pathname + url.search);
- await this.waitForRunsTableToLoad();
- } else if (!hasLimit && !hasOffset) {
- url.searchParams.set("offset", "0");
- url.searchParams.set("limit", String(this.currentLimit));
- await this.navigateTo(url.pathname + url.search);
- await this.waitForRunsTableToLoad();
- }
- }
}
diff --git a/airflow-core/src/airflow/ui/tests/e2e/pages/DagsPage.ts
b/airflow-core/src/airflow/ui/tests/e2e/pages/DagsPage.ts
index b3e65857339..5f510b797b1 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/pages/DagsPage.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/pages/DagsPage.ts
@@ -35,14 +35,11 @@ export class DagsPage extends BasePage {
public readonly failedFilter: Locator;
public readonly needsReviewFilter: Locator;
public readonly operatorFilter: Locator;
- public readonly paginationNextButton: Locator;
- public readonly paginationPrevButton: Locator;
public readonly queuedFilter: Locator;
public readonly retriesFilter: Locator;
public readonly runningFilter: Locator;
public readonly searchBox: Locator;
public readonly searchInput: Locator;
- public readonly sortSelect: Locator;
public readonly stateElement: Locator;
public readonly successFilter: Locator;
public readonly tableViewButton: Locator;
@@ -61,8 +58,6 @@ export class DagsPage extends BasePage {
// page trigger button has visible text or is icon-only.
this.confirmButton = page.locator('button:has-text("Trigger")').last();
this.stateElement = page.locator('*:has-text("State") + *').first();
- this.paginationNextButton = page.locator('[data-testid="next"]');
- this.paginationPrevButton = page.locator('[data-testid="prev"]');
this.searchBox = page.getByRole("textbox", { name: /search/i });
this.searchInput = page.getByPlaceholder("Search DAGs");
this.operatorFilter = page.getByRole("combobox").filter({ hasText:
/operator/i });
@@ -71,8 +66,6 @@ export class DagsPage extends BasePage {
// View toggle buttons
this.cardViewButton = page.locator('button[aria-label="Show card view"]');
this.tableViewButton = page.locator('button[aria-label="Show table
view"]');
- // Sort select (card view only)
- this.sortSelect = page.locator('[data-testid="sort-by-select"]');
// Status filter buttons
this.successFilter = page.locator('button:has-text("Success")');
this.failedFilter = page.locator('button:has-text("Failed")');
@@ -106,75 +99,6 @@ export class DagsPage extends BasePage {
await this.waitForDagList();
}
- /**
- * Click next page button and wait for list to change
- */
- public async clickNextPage(): Promise<void> {
- const initialDagNames = await this.getDagNames();
-
- // Set up API listener before action
- const responsePromise = this.page
- .waitForResponse((resp) => resp.url().includes("/dags") && resp.status()
=== 200, {
- timeout: 30_000,
- })
- .catch(() => {
- /* API might be cached */
- });
-
- await this.paginationNextButton.click();
-
- // Wait for API response
- await responsePromise;
-
- // Wait for UI to actually change (increased timeout for slower browsers
like Firefox)
- await expect
- .poll(() => this.getDagNames(), {
- message: "List did not update after clicking next page",
- timeout: 30_000,
- })
- .not.toEqual(initialDagNames);
-
- await this.waitForDagList();
- }
-
- /**
- * Click previous page button and wait for list to change
- */
- public async clickPrevPage(): Promise<void> {
- const initialDagNames = await this.getDagNames();
-
- // Set up API listener before action
- const responsePromise = this.page
- .waitForResponse((resp) => resp.url().includes("/dags") && resp.status()
=== 200, {
- timeout: 30_000,
- })
- .catch(() => {
- /* API might be cached */
- });
-
- await this.paginationPrevButton.click();
-
- // Wait for API response
- await responsePromise;
-
- // Wait for UI to actually change (increased timeout for slower browsers
like Firefox)
- await expect
- .poll(() => this.getDagNames(), {
- message: "List did not update after clicking prev page",
- timeout: 30_000,
- })
- .not.toEqual(initialDagNames);
-
- await this.waitForDagList();
- }
-
- /**
- * Click sort select (only works in card view)
- */
- public async clickSortSelect(): Promise<void> {
- await this.sortSelect.click();
- }
-
public async filterByOperator(operator: string): Promise<void> {
await this.selectDropdownOption(this.operatorFilter, operator);
}
diff --git a/airflow-core/src/airflow/ui/tests/e2e/pages/EventsPage.ts
b/airflow-core/src/airflow/ui/tests/e2e/pages/EventsPage.ts
index 35a84242f6f..8c1766be098 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/pages/EventsPage.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/pages/EventsPage.ts
@@ -27,14 +27,9 @@ export class EventsPage extends BasePage {
public readonly extraColumn: Locator;
public readonly filterBar: Locator;
public readonly ownerColumn: Locator;
- public readonly paginationNextButton: Locator;
- public readonly paginationPrevButton: Locator;
public readonly tableRows: Locator;
public readonly whenColumn: Locator;
- private currentDagId?: string;
- private currentLimit?: number;
-
public constructor(page: Page) {
super(page);
this.eventsPageTitle = page.locator('h2:has-text("Audit Log")');
@@ -46,8 +41,6 @@ export class EventsPage extends BasePage {
.filter({ has: page.locator('button:has-text("Filter")') })
.first();
this.ownerColumn = this.eventsTable.locator('th:has-text("User")');
- this.paginationNextButton = page.locator('[data-testid="next"]');
- this.paginationPrevButton = page.locator('[data-testid="prev"]');
this.tableRows = this.eventsTable.locator("tbody tr");
this.whenColumn = this.eventsTable.locator('th:has-text("When")');
}
@@ -70,35 +63,6 @@ export class EventsPage extends BasePage {
await menuItem.click();
}
- public async clickColumnHeader(columnKey: string): Promise<void> {
- const columnHeader = this.eventsTable.locator("th").filter({ hasText: new
RegExp(columnKey, "i") });
- const sortButton = columnHeader.locator('button[aria-label="sort"]');
-
- await sortButton.click();
- await this.waitForTableLoad();
- }
-
- public async clickColumnToSort(columnName: "Event" | "User" | "When"):
Promise<void> {
- const columnHeader =
this.eventsTable.locator(`th:has-text("${columnName}")`);
- const sortButton = columnHeader.locator('button[aria-label="sort"]');
-
- await sortButton.click();
- await this.waitForTableLoad();
- await this.ensureUrlParams();
- }
-
- public async clickNextPage(): Promise<void> {
- await this.paginationNextButton.click();
- await this.waitForTableLoad();
- await this.ensureUrlParams();
- }
-
- public async clickPrevPage(): Promise<void> {
- await this.paginationPrevButton.click();
- await this.waitForTableLoad();
- await this.ensureUrlParams();
- }
-
public async getCellByColumnName(row: Locator, columnName: string):
Promise<Locator> {
const headers = await this.eventsTable.locator("thead
th").allTextContents();
const index = headers.findIndex((h) =>
h.toLowerCase().includes(columnName.toLowerCase()));
@@ -120,7 +84,7 @@ export class EventsPage extends BasePage {
return this.tableRows.all();
}
- public async getEventTypes(allPages: boolean = false):
Promise<Array<string>> {
+ public async getEventTypes(): Promise<Array<string>> {
const rows = await this.getEventLogRows();
if (rows.length === 0) {
@@ -138,24 +102,7 @@ export class EventsPage extends BasePage {
}
}
- if (!allPages) {
- return eventTypes;
- }
-
- const allEventTypes = [...eventTypes];
- const startUrl = this.page.url();
-
- while (await this.hasNextPage()) {
- await this.clickNextPage();
- const pageEvents = await this.getEventTypes(false);
-
- allEventTypes.push(...pageEvents);
- }
-
- await this.page.goto(startUrl, { timeout: 30_000, waitUntil:
"domcontentloaded" });
- await this.waitForTableLoad();
-
- return allEventTypes;
+ return eventTypes;
}
public getFilterPill(filterLabel: string): Locator {
@@ -166,29 +113,13 @@ export class EventsPage extends BasePage {
return this.tableRows.count();
}
- public async hasNextPage(): Promise<boolean> {
- const count = await this.paginationNextButton.count();
-
- if (count === 0) {
- return false;
- }
-
- return await this.paginationNextButton.isEnabled();
- }
-
public async navigate(): Promise<void> {
await this.navigateTo("/events");
await this.waitForTableLoad();
}
- public async navigateToAuditLog(dagId: string, limit?: number):
Promise<void> {
- this.currentDagId = dagId;
- this.currentLimit = limit;
-
- const baseUrl = EventsPage.getEventsUrl(dagId);
- const url = limit === undefined ? baseUrl :
`${baseUrl}?offset=0&limit=${limit}`;
-
- await this.page.goto(url, {
+ public async navigateToAuditLog(dagId: string): Promise<void> {
+ await this.page.goto(EventsPage.getEventsUrl(dagId), {
timeout: 30_000,
waitUntil: "domcontentloaded",
});
@@ -296,35 +227,4 @@ export class EventsPage extends BasePage {
{ timeout: 60_000 },
);
}
-
- /**
- * Ensure offset=0 is present when limit is set to prevent limit from being
ignored
- */
- private async ensureUrlParams(): Promise<void> {
- if (this.currentLimit === undefined || this.currentDagId === undefined) {
- return;
- }
-
- const currentUrl = this.page.url();
- const url = new URL(currentUrl);
- const hasLimit = url.searchParams.has("limit");
- const hasOffset = url.searchParams.has("offset");
-
- if (hasLimit && !hasOffset) {
- url.searchParams.set("offset", "0");
- await this.page.goto(url.toString(), {
- timeout: 30_000,
- waitUntil: "domcontentloaded",
- });
- await this.waitForTableLoad();
- } else if (!hasLimit && !hasOffset) {
- url.searchParams.set("offset", "0");
- url.searchParams.set("limit", String(this.currentLimit));
- await this.page.goto(url.toString(), {
- timeout: 30_000,
- waitUntil: "domcontentloaded",
- });
- await this.waitForTableLoad();
- }
- }
}
diff --git a/airflow-core/src/airflow/ui/tests/e2e/pages/ProvidersPage.ts
b/airflow-core/src/airflow/ui/tests/e2e/pages/ProvidersPage.ts
index 6b597938f33..368b8302f8b 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/pages/ProvidersPage.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/pages/ProvidersPage.ts
@@ -16,14 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { expect, type Locator, type Page } from "@playwright/test";
+import type { Locator, Page } from "@playwright/test";
import { BasePage } from "./BasePage";
export class ProvidersPage extends BasePage {
public readonly heading: Locator;
- public readonly paginationNextButton: Locator;
- public readonly paginationPrevButton: Locator;
public readonly rows: Locator;
public readonly table: Locator;
@@ -35,32 +33,6 @@ export class ProvidersPage extends BasePage {
this.rows = this.table.locator("tbody tr").filter({
has: page.locator("td"),
});
- this.paginationNextButton = page.locator('[data-testid="next"]');
- this.paginationPrevButton = page.locator('[data-testid="prev"]');
- }
-
- /**
- * Click next page button
- */
- public async clickNextPage(): Promise<void> {
- const initialProviderNames = await this.providerNames();
-
- await this.paginationNextButton.click();
-
- await expect.poll(() => this.providerNames(), { timeout: 10_000
}).not.toEqual(initialProviderNames);
- await this.waitForTableData();
- }
-
- /**
- * Click previous page button
- */
- public async clickPrevPage(): Promise<void> {
- const initialProviderNames = await this.providerNames();
-
- await this.paginationPrevButton.click();
-
- await expect.poll(() => this.providerNames(), { timeout: 10_000
}).not.toEqual(initialProviderNames);
- await this.waitForTableData();
}
public async getRowCount(): Promise<number> {
@@ -86,10 +58,6 @@ export class ProvidersPage extends BasePage {
await this.navigateTo("/providers");
}
- public async providerNames(): Promise<Array<string>> {
- return this.rows.locator("td a").allTextContents();
- }
-
public async waitForLoad(): Promise<void> {
await this.table.waitFor({ state: "visible", timeout: 30_000 });
await this.waitForTableData();
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 6c4b86fcd14..9381cc69d25 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/pages/RequiredActionsPage.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/pages/RequiredActionsPage.ts
@@ -25,32 +25,18 @@ export class RequiredActionsPage extends BasePage {
public readonly actionsTable: Locator;
public readonly emptyStateMessage: Locator;
public readonly pageHeading: Locator;
- public readonly paginationNextButton: Locator;
- public readonly paginationPrevButton: Locator;
public constructor(page: Page) {
super(page);
this.pageHeading = page.getByRole("heading").filter({ hasText: /required
action/i });
this.actionsTable = page.getByTestId("table-list");
this.emptyStateMessage = page.getByText(/no required actions found/i);
- this.paginationNextButton = page.locator('[data-testid="next"]');
- this.paginationPrevButton = page.locator('[data-testid="prev"]');
}
public static getRequiredActionsUrl(): string {
return "/required_actions";
}
- public async clickNextPage(): Promise<void> {
- await this.paginationNextButton.click();
- await expect(this.actionsTable).toBeVisible({ timeout: 10_000 });
- }
-
- public async clickPrevPage(): Promise<void> {
- await this.paginationPrevButton.click();
- await expect(this.actionsTable).toBeVisible({ timeout: 10_000 });
- }
-
public async getActionsTableRowCount(): Promise<number> {
const rows = this.page.locator("table tbody tr");
const isTableVisible = await this.actionsTable.isVisible();
@@ -62,35 +48,16 @@ export class RequiredActionsPage extends BasePage {
return rows.count();
}
- public async getActionSubjects(): Promise<Array<string>> {
- const rows = this.page.locator("table tbody tr td:nth-child(2)");
- const texts = await rows.allTextContents();
-
- return texts.map((text) => text.trim()).filter((text) => text !== "");
- }
-
- public async hasNextPage(): Promise<boolean> {
- const isDisabled = await this.paginationNextButton.isDisabled();
-
- return !isDisabled;
- }
-
public async isEmptyStateDisplayed(): Promise<boolean> {
return this.emptyStateMessage.isVisible();
}
- public async isPaginationVisible(): Promise<boolean> {
- return this.paginationNextButton.isVisible();
- }
-
public async isTableDisplayed(): Promise<boolean> {
return this.actionsTable.isVisible();
}
- public async navigateToRequiredActionsPage(limit?: number): Promise<void> {
- await (limit === undefined
- ? this.navigateTo(RequiredActionsPage.getRequiredActionsUrl())
- :
this.navigateTo(`${RequiredActionsPage.getRequiredActionsUrl()}?limit=${limit}&offset=0`));
+ public async navigateToRequiredActionsPage(): Promise<void> {
+ await this.navigateTo(RequiredActionsPage.getRequiredActionsUrl());
await expect(this.pageHeading).toBeVisible({ timeout: 10_000 });
}
@@ -102,36 +69,6 @@ export class RequiredActionsPage extends BasePage {
await this.runHITLFlow(dagId, false);
}
- public async verifyPagination(limit: number): Promise<void> {
- await this.navigateToRequiredActionsPage(limit);
-
- await expect(this.paginationNextButton).toBeVisible();
- await expect(this.paginationPrevButton).toBeVisible();
-
- const page1Actions = await this.getActionSubjects();
-
- expect(page1Actions.length).toBeGreaterThan(0);
-
- await this.clickNextPage();
-
- await expect
- .poll(
- async () => {
- const subjects = await this.getActionSubjects();
-
- return subjects.length > 0 && subjects.join(",") !==
page1Actions.join(",");
- },
- { timeout: 30_000 },
- )
- .toBe(true);
-
- const page2Actions = await this.getActionSubjects();
-
- await this.clickPrevPage();
-
- await expect.poll(() => this.getActionSubjects(), { timeout: 30_000
}).not.toEqual(page2Actions);
- }
-
private async clickButtonAndWaitForHITLResponse(button: Locator):
Promise<void> {
const responsePromise = this.page.waitForResponse(
(res) => res.url().includes("hitlDetails") && res.request().method() ===
"PATCH",
diff --git a/airflow-core/src/airflow/ui/tests/e2e/pages/TaskInstancesPage.ts
b/airflow-core/src/airflow/ui/tests/e2e/pages/TaskInstancesPage.ts
index 9c560888ec1..4fde48e7f4b 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/pages/TaskInstancesPage.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/pages/TaskInstancesPage.ts
@@ -24,59 +24,13 @@ export class TaskInstancesPage extends BasePage {
return "/task_instances";
}
- public readonly paginationNextButton: Locator;
-
- public readonly paginationPrevButton: Locator;
-
public readonly taskInstancesTable: Locator;
public constructor(page: Page) {
super(page);
- this.paginationNextButton = page.locator('[data-testid="next"]');
- this.paginationPrevButton = page.locator('[data-testid="prev"]');
this.taskInstancesTable = page.locator('table, div[role="table"]');
}
- /**
- * Click next page button
- */
- public async clickNextPage(): Promise<void> {
- const initialTaskInstanceIds = await this.getTaskInstanceIds();
-
- await this.paginationNextButton.click();
-
- await expect
- .poll(() => this.getTaskInstanceIds(), { timeout: 10_000 })
- .not.toEqual(initialTaskInstanceIds);
-
- await this.waitForTaskInstanceList();
- }
-
- /**
- * Click previous page button
- */
- public async clickPrevPage(): Promise<void> {
- const initialTaskInstanceIds = await this.getTaskInstanceIds();
-
- await this.paginationPrevButton.click();
-
- await expect
- .poll(() => this.getTaskInstanceIds(), { timeout: 10_000 })
- .not.toEqual(initialTaskInstanceIds);
- await this.waitForTaskInstanceList();
- }
-
- /**
- * Get all task instance identifiers from the current page
- */
- public async getTaskInstanceIds(): Promise<Array<string>> {
- await this.waitForTaskInstanceList();
- const taskLinks = this.taskInstancesTable.locator("a[href*='/dags/']");
- const texts = await taskLinks.allTextContents();
-
- return texts.map((text) => text.trim()).filter((text) => text !== "");
- }
-
/**
* Navigate to Task Instances page and wait for data to load
*/
@@ -188,13 +142,4 @@ export class TaskInstancesPage extends BasePage {
expect(await rows.count()).toBeGreaterThan(0);
}
-
- /**
- * Wait for task instance list to be rendered
- */
- private async waitForTaskInstanceList(): Promise<void> {
- const dataLink =
this.taskInstancesTable.locator("a[href*='/dags/']").first();
-
- await expect(dataLink).toBeVisible({ timeout: 10_000 });
- }
}
diff --git a/airflow-core/src/airflow/ui/tests/e2e/pages/XComsPage.ts
b/airflow-core/src/airflow/ui/tests/e2e/pages/XComsPage.ts
index d28e34b2cd7..188a5d81fd9 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/pages/XComsPage.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/pages/XComsPage.ts
@@ -27,8 +27,6 @@ export class XComsPage extends BasePage {
public readonly addFilterButton: Locator;
public readonly collapseAllButton: Locator;
public readonly expandAllButton: Locator;
- public readonly paginationNextButton: Locator;
- public readonly paginationPrevButton: Locator;
public readonly xcomsTable: Locator;
public constructor(page: Page) {
@@ -36,8 +34,6 @@ export class XComsPage extends BasePage {
this.addFilterButton = page.locator('[data-testid="add-filter-button"]');
this.collapseAllButton =
page.locator('[data-testid="collapse-all-button"]');
this.expandAllButton = page.locator('[data-testid="expand-all-button"]');
- this.paginationNextButton = page.locator('[data-testid="next"]');
- this.paginationPrevButton = page.locator('[data-testid="prev"]');
this.xcomsTable = page.locator('[data-testid="table-list"]');
}
@@ -127,42 +123,6 @@ export class XComsPage extends BasePage {
}
}
- public async verifyPagination(limit: number): Promise<void> {
- await this.navigateTo(`${XComsPage.xcomsUrl}?offset=0&limit=${limit}`);
- await this.page.waitForURL(/.*offset=0.*limit=/, { timeout: 10_000 });
- await this.page.waitForLoadState("networkidle");
- await this.xcomsTable.waitFor({ state: "visible", timeout: 10_000 });
-
- const rows = this.xcomsTable.locator("tbody tr");
-
- expect(await rows.count()).toBeGreaterThan(0);
-
- await expect(this.paginationNextButton).toBeVisible({ timeout: 10_000 });
- await this.paginationNextButton.click();
- await this.page.waitForLoadState("networkidle");
- await this.xcomsTable.waitFor({ state: "visible", timeout: 10_000 });
-
- const urlPage2 = this.page.url();
-
- expect(urlPage2).toContain(`limit=${limit}`);
- expect(urlPage2).not.toContain("offset=0&");
-
- const rows2 = this.xcomsTable.locator("tbody tr");
-
- expect(await rows2.count()).toBeGreaterThan(0);
-
- await expect(this.paginationPrevButton).toBeVisible({ timeout: 5000 });
- await this.paginationPrevButton.click();
- await this.page.waitForLoadState("networkidle");
- await this.xcomsTable.waitFor({ state: "visible", timeout: 10_000 });
-
- const urlBackToPage1 = this.page.url();
-
- expect(urlBackToPage1).toContain(`limit=${limit}`);
- const isPage1 = urlBackToPage1.includes("offset=0") ||
!urlBackToPage1.includes("offset=");
-
- expect(isPage1).toBeTruthy();
- }
public async verifyXComDetailsDisplay(): Promise<void> {
const firstRow = this.xcomsTable.locator("tbody tr").first();
diff --git a/airflow-core/src/airflow/ui/tests/e2e/specs/asset.spec.ts
b/airflow-core/src/airflow/ui/tests/e2e/specs/asset.spec.ts
index a123b64b101..be99eebab23 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/specs/asset.spec.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/specs/asset.spec.ts
@@ -117,26 +117,6 @@ test.describe("Assets Page", () => {
}
});
- test("verify pagination controls navigate between pages", async () => {
- await assets.navigateTo("/assets?limit=5&offset=0");
- await assets.waitForLoad();
-
- const page1Initial = await assets.assetNames();
-
- expect(page1Initial.length).toBeGreaterThan(0);
-
- const pagination = assets.page.locator('[data-scope="pagination"]');
-
- await pagination.getByRole("button", { name: /page 2/i }).click();
- await expect.poll(() => assets.assetNames(), { timeout: 30_000
}).not.toEqual(page1Initial);
-
- const page2Assets = await assets.assetNames();
-
- await pagination.getByRole("button", { name: /page 1/i }).click();
-
- await expect.poll(() => assets.assetNames(), { timeout: 30_000
}).not.toEqual(page2Assets);
- });
-
test("verify asset details and dependencies", async ({ page }) => {
const assetDetailPage = new AssetDetailPage(page);
const assetName = testConfig.asset.name;
diff --git a/airflow-core/src/airflow/ui/tests/e2e/specs/dag-audit-log.spec.ts
b/airflow-core/src/airflow/ui/tests/e2e/specs/dag-audit-log.spec.ts
index ebbfdb6b719..6b6989ad1a8 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/specs/dag-audit-log.spec.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/specs/dag-audit-log.spec.ts
@@ -117,42 +117,4 @@ test.describe("DAG Audit Log", () => {
expect(userText).toBeTruthy();
expect(userText?.trim()).not.toBe("");
});
-
- test("verify pagination through audit log entries", async () => {
- await eventsPage.navigateToAuditLog(testDagId, 3);
-
- const hasNext = await eventsPage.hasNextPage();
-
- expect(hasNext).toBe(true);
-
- const urlPage1 = eventsPage.page.url();
-
- expect(urlPage1).toContain("offset=0");
- expect(urlPage1).toContain("limit=3");
-
- await eventsPage.clickNextPage();
-
- const urlPage2 = eventsPage.page.url();
-
- expect(urlPage2).toContain("limit=3");
- expect(urlPage2).not.toContain("offset=0");
-
- await eventsPage.clickPrevPage();
-
- const urlBackToPage1 = eventsPage.page.url();
-
- expect(urlBackToPage1).toContain("offset=0");
- expect(urlBackToPage1).toContain("limit=3");
- });
-
- test("verify sorting when clicking column header", async () => {
- await eventsPage.navigateToAuditLog(testDagId);
-
- await eventsPage.clickColumnToSort("Event");
-
- const sortedEvents = await eventsPage.getEventTypes(true);
-
- expect(sortedEvents.length).toBeGreaterThan(0);
- expect(sortedEvents).toEqual([...sortedEvents].sort());
- });
});
diff --git a/airflow-core/src/airflow/ui/tests/e2e/specs/dag-runs-tab.spec.ts
b/airflow-core/src/airflow/ui/tests/e2e/specs/dag-runs-tab.spec.ts
index 14dcd6e3e2a..d9aef74f547 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/specs/dag-runs-tab.spec.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/specs/dag-runs-tab.spec.ts
@@ -100,24 +100,4 @@ test.describe("DAG Runs Tab", () => {
await dagRunsTabPage.searchByRunIdPattern("manual");
await dagRunsTabPage.verifySearchResults("manual");
});
-
- test("paginate through runs", async () => {
- await dagRunsTabPage.clickRunsTabWithPageSize(testDagId, 2);
-
- const initialRowCount = await dagRunsTabPage.getRowCount();
-
- expect(initialRowCount).toBe(2);
-
- await dagRunsTabPage.clickNextPage();
-
- const nextPageRowCount = await dagRunsTabPage.getRowCount();
-
- expect(nextPageRowCount).toBeGreaterThan(0);
-
- await dagRunsTabPage.clickPrevPage();
-
- const backRowCount = await dagRunsTabPage.getRowCount();
-
- expect(backRowCount).toBe(initialRowCount);
- });
});
diff --git a/airflow-core/src/airflow/ui/tests/e2e/specs/dag-runs.spec.ts
b/airflow-core/src/airflow/ui/tests/e2e/specs/dag-runs.spec.ts
index 718f00b7cd0..5567ba6d58b 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/specs/dag-runs.spec.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/specs/dag-runs.spec.ts
@@ -139,8 +139,4 @@ test.describe("DAG Runs Page", () => {
await dagRunsPage.navigate();
await dagRunsPage.verifyDagIdFiltering(testDagId1);
});
-
- test("verify pagination with offset and limit", async () => {
- await dagRunsPage.verifyPagination(3);
- });
});
diff --git a/airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts
b/airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts
index 193c2af6652..6d0a257757c 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts
@@ -20,39 +20,6 @@ import { expect, test } from "@playwright/test";
import { testConfig } from "playwright.config";
import { DagsPage } from "tests/e2e/pages/DagsPage";
-test.describe("Dags Pagination", () => {
- let dagsPage: DagsPage;
-
- test.beforeEach(({ page }) => {
- dagsPage = new DagsPage(page);
- });
-
- test("should verify pagination works on the Dags list page", async () => {
- test.setTimeout(120_000); // 2 minutes for slower browsers like Firefox
- await dagsPage.navigate();
-
- await expect(dagsPage.paginationNextButton).toBeVisible();
- await expect(dagsPage.paginationPrevButton).toBeVisible();
-
- const initialDagNames = await dagsPage.getDagNames();
-
- expect(initialDagNames.length).toBeGreaterThan(0);
-
- await dagsPage.clickNextPage();
-
- const dagNamesAfterNext = await dagsPage.getDagNames();
-
- expect(dagNamesAfterNext.length).toBeGreaterThan(0);
- expect(dagNamesAfterNext).not.toEqual(initialDagNames);
-
- await dagsPage.clickPrevPage();
-
- const dagNamesAfterPrev = await dagsPage.getDagNames();
-
- expect(dagNamesAfterPrev).toEqual(initialDagNames);
- });
-});
-
test.describe("Dag Trigger Workflow", () => {
let dagsPage: DagsPage;
const testDagId = testConfig.testDag.id;
@@ -228,55 +195,3 @@ test.describe("Dags Status Filtering", () => {
await dagsPage.verifyDagsListVisible();
});
});
-
-test.describe("Dags Sorting", () => {
- let dagsPage: DagsPage;
-
- test.beforeEach(({ page }) => {
- dagsPage = new DagsPage(page);
- });
-
- test("should sort Dags by name in card view", async () => {
- test.setTimeout(120_000); // 2 minutes for slower browsers like Firefox
- await dagsPage.navigate();
- await dagsPage.verifyDagsListVisible();
-
- await dagsPage.switchToCardView();
-
- await expect(dagsPage.sortSelect).toBeVisible();
-
- const ascNames = await dagsPage.getDagNames();
-
- expect(ascNames.length).toBeGreaterThan(1);
-
- await dagsPage.clickSortSelect();
-
- await expect(dagsPage.page.getByRole("option").first()).toBeVisible();
-
- await dagsPage.page.getByRole("option", { name: "Sort by Display Name
(Z-A)" }).click();
-
- // Poll until the list order actually changes instead of a fixed delay
- await expect
- .poll(async () => dagsPage.getDagNames(), {
- message: "List did not re-sort within timeout",
- timeout: 10_000,
- })
- .not.toEqual(ascNames);
-
- const descNames = await dagsPage.getDagNames();
-
- expect(descNames.length).toBeGreaterThan(1);
-
- const [firstName] = descNames;
- const lastName = descNames[descNames.length - 1];
-
- expect(firstName).toBeDefined();
- expect(lastName).toBeDefined();
-
- expect(firstName).not.toEqual(ascNames[0]);
-
- if (firstName !== undefined && firstName !== "" && lastName !== undefined
&& lastName !== "") {
- expect(firstName.localeCompare(lastName)).toBeGreaterThan(0);
- }
- });
-});
diff --git a/airflow-core/src/airflow/ui/tests/e2e/specs/events-page.spec.ts
b/airflow-core/src/airflow/ui/tests/e2e/specs/events-page.spec.ts
index bd2ae48b677..d8638e7026a 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/specs/events-page.spec.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/specs/events-page.spec.ts
@@ -114,7 +114,7 @@ test.describe("Events with Generated Data", () => {
await expect(eventsPage.eventsTable).toBeVisible();
await expect(async () => {
- const filteredEvents = await eventsPage.getEventTypes(false);
+ const filteredEvents = await eventsPage.getEventTypes();
expect(filteredEvents.length).toBeGreaterThan(0);
for (const event of filteredEvents) {
diff --git a/airflow-core/src/airflow/ui/tests/e2e/specs/providers.spec.ts
b/airflow-core/src/airflow/ui/tests/e2e/specs/providers.spec.ts
index dc20c518d3e..526876d15e3 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/specs/providers.spec.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/specs/providers.spec.ts
@@ -67,55 +67,4 @@ test.describe("Providers Page", () => {
expect(description).not.toEqual("");
}
});
-
- test("verify providers pagination", async () => {
- const limit = 5;
-
- await providers.navigateTo(`/providers?offset=0&limit=${limit}`);
- await providers.waitForLoad();
-
- const rows = await providers.getRowCount();
-
- expect(rows).toBeGreaterThan(0);
-
- const initialProviderNames = await providers.providerNames();
-
- expect(initialProviderNames.length).toBeGreaterThan(0);
-
- await expect(providers.paginationNextButton).toBeVisible();
- await expect(providers.paginationPrevButton).toBeVisible();
-
- await providers.paginationNextButton.click();
- await providers.waitForLoad();
-
- await providers.page.waitForURL((url) => {
- const u = new URL(url);
- const offset = u.searchParams.get("offset");
-
- return offset !== null && offset !== "0";
- });
-
- const rowsPage2 = await providers.getRowCount();
-
- expect(rowsPage2).toBeGreaterThan(0);
-
- const ProviderNamesAfterNext = await providers.providerNames();
-
- expect(ProviderNamesAfterNext.length).toBeGreaterThan(0);
- expect(ProviderNamesAfterNext).not.toEqual(initialProviderNames);
-
- await providers.paginationPrevButton.click();
- await providers.waitForLoad();
-
- await providers.page.waitForURL((url) => {
- const u = new URL(url);
- const offset = u.searchParams.get("offset");
-
- return offset === "0" || offset === null;
- });
-
- const rowsBack = await providers.getRowCount();
-
- expect(rowsBack).toBeGreaterThan(0);
- });
});
diff --git a/airflow-core/src/airflow/ui/tests/e2e/specs/requiredAction.spec.ts
b/airflow-core/src/airflow/ui/tests/e2e/specs/requiredAction.spec.ts
index 0b40d0d66fc..976413e92cd 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/specs/requiredAction.spec.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/specs/requiredAction.spec.ts
@@ -68,10 +68,4 @@ test.describe("Verify Required Action page", () => {
await expect(browsePage.emptyStateMessage).toBeVisible();
}
});
-
- test("verify pagination with offset and limit", async ({ page }) => {
- const browsePage = new RequiredActionsPage(page);
-
- await browsePage.verifyPagination(3);
- });
});
diff --git a/airflow-core/src/airflow/ui/tests/e2e/specs/task-instances.spec.ts
b/airflow-core/src/airflow/ui/tests/e2e/specs/task-instances.spec.ts
index 12c05aba057..aa8910ed85a 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/specs/task-instances.spec.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/specs/task-instances.spec.ts
@@ -136,28 +136,4 @@ test.describe("Task Instances Page", () => {
await taskInstancesPage.navigate();
await taskInstancesPage.verifyStateFiltering("Success");
});
-
- test("verify pagination with offset and limit", async () => {
- await taskInstancesPage.navigate();
-
- await expect(taskInstancesPage.paginationNextButton).toBeVisible();
- await expect(taskInstancesPage.paginationPrevButton).toBeVisible();
-
- const initialTaskInstanceIds = await
taskInstancesPage.getTaskInstanceIds();
-
- expect(initialTaskInstanceIds.length).toBeGreaterThan(0);
-
- await taskInstancesPage.clickNextPage();
-
- const taskInstanceIdsAfterNext = await
taskInstancesPage.getTaskInstanceIds();
-
- expect(taskInstanceIdsAfterNext.length).toBeGreaterThan(0);
- expect(taskInstanceIdsAfterNext).not.toEqual(initialTaskInstanceIds);
-
- await taskInstancesPage.clickPrevPage();
-
- const taskInstanceIdsAfterPrev = await
taskInstancesPage.getTaskInstanceIds();
-
- expect(taskInstanceIdsAfterPrev).toEqual(initialTaskInstanceIds);
- });
});
diff --git a/airflow-core/src/airflow/ui/tests/e2e/specs/xcoms.spec.ts
b/airflow-core/src/airflow/ui/tests/e2e/specs/xcoms.spec.ts
index dcbe8a43835..3911ab27c8a 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/specs/xcoms.spec.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/specs/xcoms.spec.ts
@@ -27,7 +27,6 @@ test.describe("XComs Page", () => {
let xcomsPage: XComsPage;
const testDagId = testConfig.xcomDag.id;
const testXComKey = "return_value";
- const paginationLimit = 3;
const triggerCount = 2;
test.beforeAll(async ({ browser }) => {
@@ -97,8 +96,4 @@ test.describe("XComs Page", () => {
test("verify filtering by DAG display name", async () => {
await xcomsPage.verifyDagDisplayNameFiltering(testDagId);
});
-
- test("verify pagination works", async () => {
- await xcomsPage.verifyPagination(paginationLimit);
- });
});