You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Sahil-Shadwal (via GitHub)" <gi...@apache.org> on 2025/12/23 14:32:16 UTC
[PR] add E2E tests for DAG Runs tab [airflow]
Sahil-Shadwal opened a new pull request, #59754:
URL: https://github.com/apache/airflow/pull/59754
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
Add E2E tests for DAG Runs tab functionality.
## Changes
- Added `data-testid` to [DagRuns.tsx](cci:7://file:///Users/sahilshadwal/Desktop/airflow/airflow-core/src/airflow/ui/src/pages/DagRuns.tsx:0:0-0:0) for E2E testing
- Extended [DagsPage.ts](cci:7://file:///Users/sahilshadwal/Desktop/airflow/airflow-core/src/airflow/ui/tests/e2e/pages/DagsPage.ts:0:0-0:0) with 7 methods for Runs tab interactions
- Created test suite with 4 test cases covering navigation, display, filtering, search, and pagination
## Test Coverage
✅ Navigate to Runs tab
✅ Verify run details (ID, state, times, duration)
✅ Click run to view details
✅ Filter and search functionality
✅ Pagination
Closes #59541
Related issues: #59028
<!-- Please keep an empty line above the dashes. -->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #59754:
URL: https://github.com/apache/airflow/pull/59754#issuecomment-3686857495
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:
- Pay attention to the quality of your code (ruff, mypy and type annotations). Our [prek-hooks]( https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst#prerequisites-for-prek-hooks) will help you with that.
- In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/main/airflow-core/docs/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
- Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/dev/breeze/doc/README.rst) for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
- Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
- Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
- Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#coding-style-and-best-practices).
- Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
Apache Airflow is a community-driven project and together we are making it better 🚀.
In case of doubts contact the developers at:
Mailing List: dev@airflow.apache.org
Slack: https://s.apache.org/airflow-slack
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "Sahil-Shadwal (via GitHub)" <gi...@apache.org>.
Sahil-Shadwal commented on PR #59754:
URL: https://github.com/apache/airflow/pull/59754#issuecomment-3754513856
@vatsrahul1001
Hey, thanks for sticking with me on this - I know it's taken way longer than it should have. Really appreciate you taking the time to explain the patterns.
Just pushed a fix removing the LoginPage stuff (finally caught what you meant about not using login in pages). Looked at how the other merged PRs handle auth (#59943, #59919, etc.) and matched that pattern - just using the global storageState: AUTH_FILE instead.
Quick summary of what changed:
Removed LoginPage completely
Tests get the authenticated page directly from Playwright config now
All the other stuff you mentioned is addressed too (beforeAll, separate file, filtering)
If there's anything else that needs fixing, let me know and I'll get on it.
But honestly, if you'd rather hand this off to someone else at this point, I totally get it - I know I've already taken up a lot of your time.
Thanks again for the help!
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "Sahil-Shadwal (via GitHub)" <gi...@apache.org>.
Sahil-Shadwal commented on PR #59754:
URL: https://github.com/apache/airflow/pull/59754#issuecomment-3793647002
@vatsrahul1001 sorry to disappoint , i tried to fix these but i am getting nowhere and i am busy rn so please assign this issue to someone else
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on PR #59754:
URL: https://github.com/apache/airflow/pull/59754#issuecomment-3694525813
@Sahil-Shadwal can you look at failures?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "Sahil-Shadwal (via GitHub)" <gi...@apache.org>.
Sahil-Shadwal commented on PR #59754:
URL: https://github.com/apache/airflow/pull/59754#issuecomment-3718783013
> @Sahil-Shadwal can you resolve conflicts?
✅done
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "Sahil-Shadwal (via GitHub)" <gi...@apache.org>.
Sahil-Shadwal commented on PR #59754:
URL: https://github.com/apache/airflow/pull/59754#issuecomment-3694664523
> @Sahil-Shadwal can you look at failures?
On it
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on PR #59754:
URL: https://github.com/apache/airflow/pull/59754#issuecomment-3713727824
> > @Sahil-Shadwal All of dag run tab test failing can you check? <img alt="image" width="1228" height="507" src="https://private-user-images.githubusercontent.com/43964496/530917650-377212f7-dd72-45a4-9d97-485f26749406.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjcyNjM1NzIsIm5iZiI6MTc2NzI2MzI3MiwicGF0aCI6Ii80Mzk2NDQ5Ni81MzA5MTc2NTAtMzc3MjEyZjctZGQ3Mi00NWE0LTlkOTctNDg1ZjI2NzQ5NDA2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTAxVDEwMjc1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNhYThhNzEzZjA2ODUyN2ZhMmU1NzhjN2Q2ZTlhNjg1MWE3ZjUyNzFiZDUzNzc2Nzk0NzFhMTFmZDg1ZjExMjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.zhDvBoskOq0sxWiuTPP54Q_frGJhf9Pmns-h1sXuRXw">
> > hey @vatsrahul1001
> > I'm working on stabilizing the E2E tests for the DAG Runs Tab.
>
> Progress so far: I've resolved the major blocking issues preventing the tests from running:
>
> Fixed the this.waitForPageLoad is not a function crash by implementing the correct Playwright wait states. Added proper authentication (LoginPage flow) which was missing from the spec, causing navigation failures. Fixed timeout issues caused by aggressive DAG triggering in the beforeEach hook. Current Issue: While the tests now run and authenticate correctly, I'm seeing failures specifically on [e.g., "verifying run details" or "pagination"]. It appears the tests are unable to locate specific elements on the Runs tab, even though the page loads.
>
> My Ask:
>
> Is there a specific attribute or data-testid convention I should be using for the Runs tab table specifically? Do we need to seed specific run data in the test environment (e.g., using breeze setup) beyond what the default DAGs provide? Any pointers would be appreciated!
>
> <img alt="Screenshot 2026-01-01 at 3 55 37 PM" width="858" height="752" src="https://private-user-images.githubusercontent.com/119167601/531322910-fcd8d701-59ae-4066-a7ae-8fc2e614f34a.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njc2ODg5MzQsIm5iZiI6MTc2NzY4ODYzNCwicGF0aCI6Ii8xMTkxNjc2MDEvNTMxMzIyOTEwLWZjZDhkNzAxLTU5YWUtNDA2Ni1hN2FlLThmYzJlNjE0ZjM0YS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMTA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDEwNlQwODM3MTRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03MzRiM2Y2ZmRiZmYwMjUyMGYxMzdiZTVlZTlkY2U1Y2I1MzJmMWI3YjQwMzE4MTU1MzRkZDU1Y2FkMmRjNzQxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.4DzC4vtAPkzG46C14na-eMwxoRo6gutgmtyQbIMybLY">
@Sahil-Shadwal Thanks for the update on your progress!
**1. data-testid conventions for Runs tab**
You've already added the right ones in your PR:
- `data-testid="dag-runs-table"` - for the table wrapper
- `data-testid="run-id"` - for run ID link
- `data-testid="run-state"` - for state badge
These are correct. The issue you're seeing with element location is likely timing - the table loads asynchronously. Make sure you're waiting for the table to be visible before querying rows:
await this.runsTable.waitFor({ state: "visible", timeout: 10_000 });
**2. Seeding test data**
You don't need to seed data manually. Instead, create the data you need in `beforeAll`:
test.beforeAll(async ({ browser }) => {
test.setTimeout(5 * 60 * 1000);
const context = await browser.newContext({ storageState: AUTH_FILE });
const page = await context.newPage();
const setupPage = new DagsPage(page);
await setupPage.triggerDag(testDagId);
await setupPage.triggerDag(testDagId);
const response = await page.request.get(
`/api/v1/dags/${testDagId}/dagRuns?limit=1`
);
const data = await response.json();
const runId = data.dag_runs[0]?.dag_run_id;
if (runId) {
await page.request.patch(
`/api/v1/dags/${testDagId}/dagRuns/${runId}`,
{ data: { state: "failed" } }
);
}
await context.close();
});This creates the test data once before all tests run, and gives you both successful and failed runs for proper filter testing.
**3. waitForPageLoad issue**
If `waitForPageLoad` doesn't exist in `BasePage`, use:
await this.page.waitForLoadState("networkidle");Let me know if you run into other issues!
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on PR #59754:
URL: https://github.com/apache/airflow/pull/59754#issuecomment-3793915018
> @vatsrahul1001 sorry to disappoint , i tried to fix these but i am getting nowhere and i am busy rn so please assign this issue to someone else
@Sahil-Shadwal you do not need to be disappoint. Feel free to pick up new issues when yoiu have bandwidth
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on code in PR #59754:
URL: https://github.com/apache/airflow/pull/59754#discussion_r2649654710
##########
airflow-core/src/airflow/ui/tests/e2e/pages/DagsPage.ts:
##########
@@ -116,6 +121,115 @@ export class DagsPage extends BasePage {
/**
* Navigate to details tab and verify Dag details are displayed correctly
*/
+ /**
+ * Navigate to the Runs tab for a specific DAG
+ */
+ public async navigateToRunsTab(dagName: string): Promise<void> {
+ await this.navigateToDagDetail(dagName);
+ await this.runsTab.waitFor({ state: "visible" });
+ await this.runsTab.click();
+ await this.waitForPageLoad();
+ }
+
+ /**
+ * Verify the Runs tab is displayed correctly
+ */
+ public async verifyRunsTabDisplayed(): Promise<void> {
+ // Verify the runs table is present
+ await expect(this.runsTable).toBeVisible();
+
+ // Verify pagination controls are visible
+ await expect(this.paginationNextButton).toBeVisible();
+ await expect(this.paginationPrevButton).toBeVisible();
+ }
+
+ /**
+ * Get run details from the runs table
+ */
+ public async getRunDetails(): Promise<
+ Array<{
+ runId: string;
+ state: string;
+ }>
+ > {
+ const runRows = this.page.locator('[data-testid="dag-runs-table"] table tbody tr');
+ await runRows.first().waitFor({ state: "visible", timeout: 10_000 });
+
+ const runCount = await runRows.count();
+ const runs: Array<{ runId: string; state: string }> = [];
+
+ for (let i = 0; i < runCount; i++) {
+ const row = runRows.nth(i);
+ const cells = row.locator("td");
+
+ // Assuming first column is run ID and state column exists
+ const runId = (await cells.nth(0).textContent()) ?? "";
+ const state = (await cells.nth(1).textContent()) ?? "";
+
+ runs.push({ runId: runId.trim(), state: state.trim() });
+ }
+
+ return runs;
+ }
+
+ /**
+ * Click on a specific run to view details
+ */
+ public async clickRun(runId: string): Promise<void> {
+ const runLink = this.page.locator(`a:has-text("${runId}")`).first();
+
+ await runLink.waitFor({ state: "visible" });
+ await runLink.click();
+ await this.waitForPageLoad();
+ }
+
+ /**
+ * Filter runs by state
+ */
+ public async filterByState(state: string): Promise<void> {
+ // Click on the state filter
+ const stateFilter = this.page.locator('button:has-text("State")');
+
+ await stateFilter.waitFor({ state: "visible" });
+ await stateFilter.click();
+
+ // Select the specific state
+ const stateOption = this.page.locator(`[role="option"]:has-text("${state}")`);
+
+ await stateOption.waitFor({ state: "visible" });
+ await stateOption.click();
+
+ await this.waitForPageLoad();
+ }
+
+ /**
+ * Search for dag runs by run ID pattern
+ */
+ public async searchRun(searchTerm: string): Promise<void> {
+ // Find the run ID pattern input field
+ const searchInput = this.page.locator('input[placeholder*="Run ID"]').or(
+ this.page.locator('input[name="runIdPattern"]'),
+ );
+
+ await searchInput.waitFor({ state: "visible" });
+ await searchInput.fill(searchTerm);
+
+ // Wait for the search to take effect
+ await this.page.waitForTimeout(1000);
Review Comment:
Wait for a specific condition instead of arbitrary timeout.
##########
airflow-core/src/airflow/ui/tests/e2e/pages/DagsPage.ts:
##########
@@ -116,6 +121,115 @@ export class DagsPage extends BasePage {
/**
* Navigate to details tab and verify Dag details are displayed correctly
*/
+ /**
+ * Navigate to the Runs tab for a specific DAG
+ */
+ public async navigateToRunsTab(dagName: string): Promise<void> {
+ await this.navigateToDagDetail(dagName);
+ await this.runsTab.waitFor({ state: "visible" });
+ await this.runsTab.click();
+ await this.waitForPageLoad();
+ }
+
+ /**
+ * Verify the Runs tab is displayed correctly
+ */
+ public async verifyRunsTabDisplayed(): Promise<void> {
+ // Verify the runs table is present
+ await expect(this.runsTable).toBeVisible();
+
+ // Verify pagination controls are visible
+ await expect(this.paginationNextButton).toBeVisible();
+ await expect(this.paginationPrevButton).toBeVisible();
+ }
+
+ /**
+ * Get run details from the runs table
+ */
+ public async getRunDetails(): Promise<
+ Array<{
+ runId: string;
+ state: string;
+ }>
+ > {
+ const runRows = this.page.locator('[data-testid="dag-runs-table"] table tbody tr');
+ await runRows.first().waitFor({ state: "visible", timeout: 10_000 });
+
+ const runCount = await runRows.count();
+ const runs: Array<{ runId: string; state: string }> = [];
+
+ for (let i = 0; i < runCount; i++) {
+ const row = runRows.nth(i);
+ const cells = row.locator("td");
+
+ // Assuming first column is run ID and state column exists
+ const runId = (await cells.nth(0).textContent()) ?? "";
+ const state = (await cells.nth(1).textContent()) ?? "";
+
+ runs.push({ runId: runId.trim(), state: state.trim() });
+ }
+
+ return runs;
+ }
+
+ /**
+ * Click on a specific run to view details
+ */
+ public async clickRun(runId: string): Promise<void> {
+ const runLink = this.page.locator(`a:has-text("${runId}")`).first();
+
+ await runLink.waitFor({ state: "visible" });
+ await runLink.click();
+ await this.waitForPageLoad();
+ }
+
+ /**
+ * Filter runs by state
+ */
+ public async filterByState(state: string): Promise<void> {
+ // Click on the state filter
+ const stateFilter = this.page.locator('button:has-text("State")');
+
+ await stateFilter.waitFor({ state: "visible" });
+ await stateFilter.click();
+
+ // Select the specific state
+ const stateOption = this.page.locator(`[role="option"]:has-text("${state}")`);
+
+ await stateOption.waitFor({ state: "visible" });
+ await stateOption.click();
+
+ await this.waitForPageLoad();
+ }
+
+ /**
+ * Search for dag runs by run ID pattern
+ */
+ public async searchRun(searchTerm: string): Promise<void> {
Review Comment:
We are not using searchRun metod in any test
##########
airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts:
##########
@@ -84,3 +84,87 @@ test.describe("Dag Details Tab", () => {
await dagsPage.verifyDagDetails(testDagId);
});
});
+
+/*
+ * DAG Runs Tab E2E Tests
+ */
+test.describe("DAG Runs Tab", () => {
+ let dagsPage: DagsPage;
+
+ const testDagId = testConfig.testDag.id;
+
+ test.beforeEach(({ page }) => {
+ dagsPage = new DagsPage(page);
+ });
+
+ test("should navigate to Runs tab and display correctly", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ // Verify runs table is displayed
+ await dagsPage.verifyRunsTabDisplayed();
+
+ // Verify we can see run details
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+ });
+
+ test("should verify run details are displayed correctly", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
Review Comment:
If the test DAG has no runs, all tests fail. Consider Triggering a DAG run before testing
##########
airflow-core/src/airflow/ui/tests/e2e/pages/DagsPage.ts:
##########
@@ -116,6 +121,115 @@ export class DagsPage extends BasePage {
/**
* Navigate to details tab and verify Dag details are displayed correctly
*/
+ /**
+ * Navigate to the Runs tab for a specific DAG
+ */
+ public async navigateToRunsTab(dagName: string): Promise<void> {
+ await this.navigateToDagDetail(dagName);
+ await this.runsTab.waitFor({ state: "visible" });
+ await this.runsTab.click();
+ await this.waitForPageLoad();
+ }
+
+ /**
+ * Verify the Runs tab is displayed correctly
+ */
+ public async verifyRunsTabDisplayed(): Promise<void> {
+ // Verify the runs table is present
+ await expect(this.runsTable).toBeVisible();
+
+ // Verify pagination controls are visible
+ await expect(this.paginationNextButton).toBeVisible();
+ await expect(this.paginationPrevButton).toBeVisible();
+ }
+
+ /**
+ * Get run details from the runs table
+ */
+ public async getRunDetails(): Promise<
+ Array<{
+ runId: string;
+ state: string;
+ }>
+ > {
+ const runRows = this.page.locator('[data-testid="dag-runs-table"] table tbody tr');
+ await runRows.first().waitFor({ state: "visible", timeout: 10_000 });
+
+ const runCount = await runRows.count();
+ const runs: Array<{ runId: string; state: string }> = [];
+
+ for (let i = 0; i < runCount; i++) {
+ const row = runRows.nth(i);
+ const cells = row.locator("td");
+
+ // Assuming first column is run ID and state column exists
+ const runId = (await cells.nth(0).textContent()) ?? "";
Review Comment:
We could use better selector here
Assumes runId is column 0 and state is column 1. If UI changes column order, test breaks.
##########
airflow-core/src/airflow/ui/tests/e2e/pages/DagsPage.ts:
##########
@@ -116,6 +121,115 @@ export class DagsPage extends BasePage {
/**
* Navigate to details tab and verify Dag details are displayed correctly
Review Comment:
The first comment is orphaned from a previous method. We can remove it.
##########
airflow-core/src/airflow/ui/tests/e2e/pages/DagsPage.ts:
##########
@@ -116,6 +121,115 @@ export class DagsPage extends BasePage {
/**
* Navigate to details tab and verify Dag details are displayed correctly
*/
+ /**
+ * Navigate to the Runs tab for a specific DAG
+ */
+ public async navigateToRunsTab(dagName: string): Promise<void> {
+ await this.navigateToDagDetail(dagName);
+ await this.runsTab.waitFor({ state: "visible" });
+ await this.runsTab.click();
+ await this.waitForPageLoad();
+ }
+
+ /**
+ * Verify the Runs tab is displayed correctly
+ */
+ public async verifyRunsTabDisplayed(): Promise<void> {
+ // Verify the runs table is present
+ await expect(this.runsTable).toBeVisible();
+
+ // Verify pagination controls are visible
+ await expect(this.paginationNextButton).toBeVisible();
+ await expect(this.paginationPrevButton).toBeVisible();
+ }
+
+ /**
+ * Get run details from the runs table
+ */
+ public async getRunDetails(): Promise<
+ Array<{
+ runId: string;
+ state: string;
+ }>
+ > {
+ const runRows = this.page.locator('[data-testid="dag-runs-table"] table tbody tr');
+ await runRows.first().waitFor({ state: "visible", timeout: 10_000 });
+
+ const runCount = await runRows.count();
+ const runs: Array<{ runId: string; state: string }> = [];
+
+ for (let i = 0; i < runCount; i++) {
+ const row = runRows.nth(i);
+ const cells = row.locator("td");
+
+ // Assuming first column is run ID and state column exists
+ const runId = (await cells.nth(0).textContent()) ?? "";
+ const state = (await cells.nth(1).textContent()) ?? "";
+
+ runs.push({ runId: runId.trim(), state: state.trim() });
+ }
+
+ return runs;
+ }
+
+ /**
+ * Click on a specific run to view details
+ */
+ public async clickRun(runId: string): Promise<void> {
+ const runLink = this.page.locator(`a:has-text("${runId}")`).first();
+
+ await runLink.waitFor({ state: "visible" });
+ await runLink.click();
+ await this.waitForPageLoad();
+ }
+
+ /**
+ * Filter runs by state
+ */
+ public async filterByState(state: string): Promise<void> {
Review Comment:
We are not using this method in any test
##########
airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts:
##########
@@ -84,3 +84,87 @@ test.describe("Dag Details Tab", () => {
await dagsPage.verifyDagDetails(testDagId);
});
});
+
+/*
+ * DAG Runs Tab E2E Tests
+ */
+test.describe("DAG Runs Tab", () => {
Review Comment:
Use Dag instead of DAG
##########
airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts:
##########
@@ -84,3 +84,87 @@ test.describe("Dag Details Tab", () => {
await dagsPage.verifyDagDetails(testDagId);
});
});
+
+/*
+ * DAG Runs Tab E2E Tests
+ */
+test.describe("DAG Runs Tab", () => {
+ let dagsPage: DagsPage;
+
+ const testDagId = testConfig.testDag.id;
+
+ test.beforeEach(({ page }) => {
+ dagsPage = new DagsPage(page);
+ });
+
+ test("should navigate to Runs tab and display correctly", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ // Verify runs table is displayed
+ await dagsPage.verifyRunsTabDisplayed();
+
+ // Verify we can see run details
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+ });
+
+ test("should verify run details are displayed correctly", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+
+ // Verify first run has required fields
+ const firstRun = runs[0];
+
+ expect(firstRun.runId).toBeTruthy();
+ expect(firstRun.state).toBeTruthy();
+ });
+
+ test("should click run and navigate to details page", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+
+ const firstRun = runs[0];
+
+ await dagsPage.clickRun(firstRun.runId);
+
+ // Verify we're on the run details page
+ await dagsPage.verifyRunDetailsPage(firstRun.runId);
+ });
+
+ test("should verify pagination works on the Runs tab", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ await expect(dagsPage.paginationNextButton).toBeVisible();
+ await expect(dagsPage.paginationPrevButton).toBeVisible();
+
+ const initialRuns = await dagsPage.getRunDetails();
+
+ expect(initialRuns.length).toBeGreaterThan(0);
+
+ // Check if next button is enabled (has more than one page)
+ const isNextEnabled = await dagsPage.paginationNextButton.isEnabled();
+
+ if (isNextEnabled) {
Review Comment:
If there's only one page of results, the core pagination test is skipped silently. Consider using test.skip() with a message.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "Sahil-Shadwal (via GitHub)" <gi...@apache.org>.
Sahil-Shadwal commented on PR #59754:
URL: https://github.com/apache/airflow/pull/59754#issuecomment-3718069227
<img width="847" height="651" alt="Screenshot 2026-01-07 at 3 14 22 PM" src="https://github.com/user-attachments/assets/f8519f49-6bdc-4648-a9b9-db063c46c7b0" />
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on PR #59754:
URL: https://github.com/apache/airflow/pull/59754#issuecomment-3789722280
@Sahil-Shadwal can you resolve conflicts and look at failing tests?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "Sahil-Shadwal (via GitHub)" <gi...@apache.org>.
Sahil-Shadwal commented on PR #59754:
URL: https://github.com/apache/airflow/pull/59754#issuecomment-3703522662
> @Sahil-Shadwal All of dag run tab test failing can you check? <img alt="image" width="1228" height="507" src="https://private-user-images.githubusercontent.com/43964496/530917650-377212f7-dd72-45a4-9d97-485f26749406.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjcyNjM1NzIsIm5iZiI6MTc2NzI2MzI3MiwicGF0aCI6Ii80Mzk2NDQ5Ni81MzA5MTc2NTAtMzc3MjEyZjctZGQ3Mi00NWE0LTlkOTctNDg1ZjI2NzQ5NDA2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTAxVDEwMjc1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNhYThhNzEzZjA2ODUyN2ZhMmU1NzhjN2Q2ZTlhNjg1MWE3ZjUyNzFiZDUzNzc2Nzk0NzFhMTFmZDg1ZjExMjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.zhDvBoskOq0sxWiuTPP54Q_frGJhf9Pmns-h1sXuRXw">
hey @vatsrahul1001
I'm working on stabilizing the E2E tests for the DAG Runs Tab.
Progress so far: I've resolved the major blocking issues preventing the tests from running:
Fixed the this.waitForPageLoad is not a function crash by implementing the correct Playwright wait states.
Added proper authentication (LoginPage flow) which was missing from the spec, causing navigation failures.
Fixed timeout issues caused by aggressive DAG triggering in the beforeEach hook.
Current Issue: While the tests now run and authenticate correctly, I'm seeing failures specifically on [e.g., "verifying run details" or "pagination"]. It appears the tests are unable to locate specific elements on the Runs tab, even though the page loads.
My Ask:
Is there a specific attribute or data-testid convention I should be using for the Runs tab table specifically?
Do we need to seed specific run data in the test environment (e.g., using breeze setup) beyond what the default DAGs provide?
Any pointers would be appreciated!
<img width="858" height="752" alt="Screenshot 2026-01-01 at 3 55 37 PM" src="https://github.com/user-attachments/assets/fcd8d701-59ae-4066-a7ae-8fc2e614f34a" />
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on PR #59754:
URL: https://github.com/apache/airflow/pull/59754#issuecomment-3759511345
> @vatsrahul1001
>
> Hey, thanks for sticking with me on this - I know it's taken way longer than it should have. Really appreciate you taking the time to explain the patterns.
>
> Just pushed a fix removing the LoginPage stuff (finally caught what you meant about not using login in pages). Looked at how the other merged PRs handle auth (#59943, #59919, etc.) and matched that pattern - just using the global storageState: AUTH_FILE instead.
>
> Quick summary of what changed:
>
> Removed LoginPage completely Tests get the authenticated page directly from Playwright config now All the other stuff you mentioned is addressed too (beforeAll, separate file, filtering) If there's anything else that needs fixing, let me know and I'll get on it.
>
> But honestly, if you'd rather hand this off to someone else at this point, I totally get it - I know I've already taken up a lot of your time.
>
> Thanks again for the help!
Thanks for the changes @Sahil-Shadwal, I see static checks and tests are still failing can you have a look?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on PR #59754:
URL: https://github.com/apache/airflow/pull/59754#issuecomment-3718749348
@Sahil-Shadwal can you resolve conflicts?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 closed pull request #59754: add E2E tests for DAG Runs tab
URL: https://github.com/apache/airflow/pull/59754
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on PR #59754:
URL: https://github.com/apache/airflow/pull/59754#issuecomment-3723125694
@Sahil-Shadwal CI is failing can you have a look also I see you are using login in pages we should not do that
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on PR #59754:
URL: https://github.com/apache/airflow/pull/59754#issuecomment-3713690469
@Sahil-Shadwal Thanks for working on this! A few things to address:
1. **Move DAG trigger to `beforeAll`** - Running in `beforeEach` is too slow (6 triggers for 6 tests). Create runs with different states for proper testing(this will help in filtering tet)
You can change dag run success state to failed state with patch call
```
await page.request.patch(
`/api/v1/dags/${testDagId}/dagRuns/${runId}`,
{ data: { state: "failed" } }
```
3. **Create separate `dag-runs.spec.ts`** - Don't add to `dags-list.spec.ts`
4. **Filter test improvement** - Currently filters by a state that already exists. Either create runs with mixed states, or use the API to mark a run as failed to properly test filtering we can do it in before all
5. **Pagination** - Use `?offset=0&limit=1` URL param to test pagination without needing many runs
6. **Search test** - Search for a partial pattern and verify fewer results returned
7. **Verify `waitForPageLoad`** - Make sure it exists in BasePage or use `waitForLoadState("networkidle")`
8. You need to rebase
Let me know if you have questions!
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on code in PR #59754:
URL: https://github.com/apache/airflow/pull/59754#discussion_r2664173551
##########
airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts:
##########
@@ -84,3 +84,142 @@ test.describe("Dag Details Tab", () => {
await dagsPage.verifyDagDetails(testDagId);
});
});
+
+/*
+ * Dag Runs Tab E2E Tests
+ */
+test.describe("Dag Runs Tab", () => {
+ let dagsPage: DagsPage;
+
+ const testDagId = testConfig.testDag.id;
+
+ test.beforeEach(async ({ page }) => {
+ dagsPage = new DagsPage(page);
+ await dagsPage.triggerDag(testDagId);
+ });
+
+ test("should navigate to Runs tab and display correctly", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ // Verify runs table is displayed
+ await dagsPage.verifyRunsTabDisplayed();
+
+ // Verify we can see run details
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+ });
+
+ test("should verify run details are displayed correctly", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+
+ // Verify first run has required fields
+ const [firstRun] = runs;
+
+ expect(firstRun.runId).toBeTruthy();
+ expect(firstRun.state).toBeTruthy();
+ });
+
+ test("should click run and navigate to details page", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+
+ const [firstRun] = runs;
+
+ await dagsPage.clickRun(firstRun.runId);
+
+ // Verify we're on the run details page
+ await dagsPage.verifyRunDetailsPage(firstRun.runId);
+ });
+
+ test("should filter runs by state", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+
+ const [firstRun] = runs;
+
+ if (firstRun === undefined) {
+ throw new Error("No runs found");
+ }
+
+ const targetState = firstRun.state;
+
+ await dagsPage.filterByState(targetState);
+
+ const filteredRuns = await dagsPage.getRunDetails();
+
+ expect(filteredRuns.length).toBeGreaterThan(0);
+ expect(filteredRuns.every((run) => run.state === targetState)).toBeTruthy();
+ });
+
+ test("should search runs", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+
+ const [firstRun] = runs;
+
+ if (firstRun === undefined) {
+ throw new Error("No runs found");
+ }
+
+ const targetRunId = firstRun.runId;
+
+ await dagsPage.searchRun(targetRunId);
+
+ const searchedRuns = await dagsPage.getRunDetails();
+
+ expect(searchedRuns.length).toBeGreaterThan(0);
+ const [firstSearchedRun] = searchedRuns;
+
+ if (firstSearchedRun === undefined) {
+ throw new Error("No searched runs found");
+ }
+
+ expect(firstSearchedRun.runId).toContain(targetRunId);
+ });
+
+ test("should verify pagination works on the Runs tab", async () => {
Review Comment:
rename test to `verify pagination`
##########
airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts:
##########
@@ -84,3 +84,142 @@ test.describe("Dag Details Tab", () => {
await dagsPage.verifyDagDetails(testDagId);
});
});
+
+/*
+ * Dag Runs Tab E2E Tests
+ */
+test.describe("Dag Runs Tab", () => {
+ let dagsPage: DagsPage;
+
+ const testDagId = testConfig.testDag.id;
+
+ test.beforeEach(async ({ page }) => {
+ dagsPage = new DagsPage(page);
+ await dagsPage.triggerDag(testDagId);
+ });
+
+ test("should navigate to Runs tab and display correctly", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ // Verify runs table is displayed
+ await dagsPage.verifyRunsTabDisplayed();
+
+ // Verify we can see run details
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+ });
+
+ test("should verify run details are displayed correctly", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+
+ // Verify first run has required fields
+ const [firstRun] = runs;
+
+ expect(firstRun.runId).toBeTruthy();
+ expect(firstRun.state).toBeTruthy();
+ });
+
+ test("should click run and navigate to details page", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+
+ const [firstRun] = runs;
+
+ await dagsPage.clickRun(firstRun.runId);
+
+ // Verify we're on the run details page
+ await dagsPage.verifyRunDetailsPage(firstRun.runId);
+ });
+
+ test("should filter runs by state", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+
+ const [firstRun] = runs;
+
+ if (firstRun === undefined) {
+ throw new Error("No runs found");
+ }
+
+ const targetState = firstRun.state;
+
+ await dagsPage.filterByState(targetState);
+
+ const filteredRuns = await dagsPage.getRunDetails();
+
+ expect(filteredRuns.length).toBeGreaterThan(0);
+ expect(filteredRuns.every((run) => run.state === targetState)).toBeTruthy();
+ });
+
+ test("should search runs", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+
+ const [firstRun] = runs;
+
+ if (firstRun === undefined) {
+ throw new Error("No runs found");
+ }
+
+ const targetRunId = firstRun.runId;
+
+ await dagsPage.searchRun(targetRunId);
+
+ const searchedRuns = await dagsPage.getRunDetails();
+
+ expect(searchedRuns.length).toBeGreaterThan(0);
+ const [firstSearchedRun] = searchedRuns;
+
+ if (firstSearchedRun === undefined) {
+ throw new Error("No searched runs found");
+ }
+
+ expect(firstSearchedRun.runId).toContain(targetRunId);
+ });
+
+ test("should verify pagination works on the Runs tab", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ await expect(dagsPage.paginationNextButton).toBeVisible();
+ await expect(dagsPage.paginationPrevButton).toBeVisible();
+
+ const initialRuns = await dagsPage.getRunDetails();
+
+ expect(initialRuns.length).toBeGreaterThan(0);
+
+ // Check if next button is enabled (has more than one page)
+ const isNextEnabled = await dagsPage.paginationNextButton.isEnabled();
+
+ if (!isNextEnabled) {
Review Comment:
No need to skip, you can use approach which I have mentioned here https://github.com/apache/airflow/pull/59754#issuecomment-3713690469
##########
airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts:
##########
@@ -84,3 +84,142 @@ test.describe("Dag Details Tab", () => {
await dagsPage.verifyDagDetails(testDagId);
});
});
+
+/*
+ * Dag Runs Tab E2E Tests
+ */
+test.describe("Dag Runs Tab", () => {
+ let dagsPage: DagsPage;
+
+ const testDagId = testConfig.testDag.id;
+
+ test.beforeEach(async ({ page }) => {
+ dagsPage = new DagsPage(page);
+ await dagsPage.triggerDag(testDagId);
+ });
+
+ test("should navigate to Runs tab and display correctly", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ // Verify runs table is displayed
+ await dagsPage.verifyRunsTabDisplayed();
+
+ // Verify we can see run details
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+ });
+
+ test("should verify run details are displayed correctly", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+
+ // Verify first run has required fields
+ const [firstRun] = runs;
+
+ expect(firstRun.runId).toBeTruthy();
+ expect(firstRun.state).toBeTruthy();
+ });
+
+ test("should click run and navigate to details page", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+
+ const [firstRun] = runs;
+
+ await dagsPage.clickRun(firstRun.runId);
+
+ // Verify we're on the run details page
+ await dagsPage.verifyRunDetailsPage(firstRun.runId);
+ });
+
+ test("should filter runs by state", async () => {
Review Comment:
Also ensure to validate filtering works and count changes
##########
airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts:
##########
@@ -84,3 +84,142 @@ test.describe("Dag Details Tab", () => {
await dagsPage.verifyDagDetails(testDagId);
});
});
+
+/*
+ * Dag Runs Tab E2E Tests
+ */
+test.describe("Dag Runs Tab", () => {
+ let dagsPage: DagsPage;
+
+ const testDagId = testConfig.testDag.id;
+
+ test.beforeEach(async ({ page }) => {
+ dagsPage = new DagsPage(page);
+ await dagsPage.triggerDag(testDagId);
+ });
+
+ test("should navigate to Runs tab and display correctly", async () => {
Review Comment:
Rename test to `verify runs table displays with valid data`
##########
airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts:
##########
@@ -84,3 +84,142 @@ test.describe("Dag Details Tab", () => {
await dagsPage.verifyDagDetails(testDagId);
});
});
+
+/*
+ * Dag Runs Tab E2E Tests
+ */
+test.describe("Dag Runs Tab", () => {
+ let dagsPage: DagsPage;
+
+ const testDagId = testConfig.testDag.id;
+
+ test.beforeEach(async ({ page }) => {
Review Comment:
Let's replace it with beforeALL as mentioned in https://github.com/apache/airflow/pull/59754#issuecomment-3713727824
##########
airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts:
##########
@@ -84,3 +84,142 @@ test.describe("Dag Details Tab", () => {
await dagsPage.verifyDagDetails(testDagId);
});
});
+
+/*
+ * Dag Runs Tab E2E Tests
+ */
+test.describe("Dag Runs Tab", () => {
+ let dagsPage: DagsPage;
+
+ const testDagId = testConfig.testDag.id;
+
+ test.beforeEach(async ({ page }) => {
+ dagsPage = new DagsPage(page);
+ await dagsPage.triggerDag(testDagId);
+ });
+
+ test("should navigate to Runs tab and display correctly", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ // Verify runs table is displayed
+ await dagsPage.verifyRunsTabDisplayed();
+
+ // Verify we can see run details
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+ });
+
+ test("should verify run details are displayed correctly", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+
+ // Verify first run has required fields
+ const [firstRun] = runs;
+
+ expect(firstRun.runId).toBeTruthy();
+ expect(firstRun.state).toBeTruthy();
+ });
+
+ test("should click run and navigate to details page", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+
+ const [firstRun] = runs;
+
+ await dagsPage.clickRun(firstRun.runId);
+
+ // Verify we're on the run details page
+ await dagsPage.verifyRunDetailsPage(firstRun.runId);
+ });
+
+ test("should filter runs by state", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+
+ const [firstRun] = runs;
+
+ if (firstRun === undefined) {
+ throw new Error("No runs found");
+ }
+
+ const targetState = firstRun.state;
+
+ await dagsPage.filterByState(targetState);
+
+ const filteredRuns = await dagsPage.getRunDetails();
+
+ expect(filteredRuns.length).toBeGreaterThan(0);
+ expect(filteredRuns.every((run) => run.state === targetState)).toBeTruthy();
+ });
+
+ test("should search runs", async () => {
Review Comment:
I think we do not need this test, this can be covered in filtering test. when we apply filter with run_id it does same thing
##########
airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts:
##########
@@ -84,3 +84,142 @@ test.describe("Dag Details Tab", () => {
await dagsPage.verifyDagDetails(testDagId);
});
});
+
+/*
+ * Dag Runs Tab E2E Tests
+ */
+test.describe("Dag Runs Tab", () => {
+ let dagsPage: DagsPage;
+
+ const testDagId = testConfig.testDag.id;
+
+ test.beforeEach(async ({ page }) => {
+ dagsPage = new DagsPage(page);
+ await dagsPage.triggerDag(testDagId);
+ });
+
+ test("should navigate to Runs tab and display correctly", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ // Verify runs table is displayed
+ await dagsPage.verifyRunsTabDisplayed();
+
+ // Verify we can see run details
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+ });
+
+ test("should verify run details are displayed correctly", async () => {
Review Comment:
This test looks redundant to me
##########
airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts:
##########
@@ -84,3 +84,142 @@ test.describe("Dag Details Tab", () => {
await dagsPage.verifyDagDetails(testDagId);
});
});
+
+/*
+ * Dag Runs Tab E2E Tests
+ */
+test.describe("Dag Runs Tab", () => {
+ let dagsPage: DagsPage;
+
+ const testDagId = testConfig.testDag.id;
+
+ test.beforeEach(async ({ page }) => {
+ dagsPage = new DagsPage(page);
+ await dagsPage.triggerDag(testDagId);
+ });
+
+ test("should navigate to Runs tab and display correctly", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ // Verify runs table is displayed
+ await dagsPage.verifyRunsTabDisplayed();
+
+ // Verify we can see run details
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+ });
+
+ test("should verify run details are displayed correctly", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+
+ // Verify first run has required fields
+ const [firstRun] = runs;
+
+ expect(firstRun.runId).toBeTruthy();
+ expect(firstRun.state).toBeTruthy();
+ });
+
+ test("should click run and navigate to details page", async () => {
Review Comment:
Rename test to `verify run details page navigation`
##########
airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts:
##########
@@ -84,3 +84,142 @@ test.describe("Dag Details Tab", () => {
await dagsPage.verifyDagDetails(testDagId);
});
});
Review Comment:
Do not add these test to dags-list.spec.ts add these to dag-runs.spec.ts
##########
airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts:
##########
@@ -84,3 +84,142 @@ test.describe("Dag Details Tab", () => {
await dagsPage.verifyDagDetails(testDagId);
});
});
+
+/*
+ * Dag Runs Tab E2E Tests
+ */
+test.describe("Dag Runs Tab", () => {
+ let dagsPage: DagsPage;
+
+ const testDagId = testConfig.testDag.id;
+
+ test.beforeEach(async ({ page }) => {
+ dagsPage = new DagsPage(page);
+ await dagsPage.triggerDag(testDagId);
+ });
+
+ test("should navigate to Runs tab and display correctly", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ // Verify runs table is displayed
+ await dagsPage.verifyRunsTabDisplayed();
+
+ // Verify we can see run details
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+ });
+
+ test("should verify run details are displayed correctly", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+
+ // Verify first run has required fields
+ const [firstRun] = runs;
+
+ expect(firstRun.runId).toBeTruthy();
+ expect(firstRun.state).toBeTruthy();
+ });
+
+ test("should click run and navigate to details page", async () => {
+ await dagsPage.navigateToRunsTab(testDagId);
+
+ const runs = await dagsPage.getRunDetails();
+
+ expect(runs.length).toBeGreaterThan(0);
+
+ const [firstRun] = runs;
+
+ await dagsPage.clickRun(firstRun.runId);
+
+ // Verify we're on the run details page
+ await dagsPage.verifyRunDetailsPage(firstRun.runId);
+ });
+
+ test("should filter runs by state", async () => {
Review Comment:
Rename test to `verify filtering`. Also, we should filter with different type like state, run_id, run_type.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on PR #59754:
URL: https://github.com/apache/airflow/pull/59754#issuecomment-3689368971
Thanks for the PR @Sahil-Shadwal I will review soon
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add E2E tests for DAG Runs tab [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on PR #59754:
URL: https://github.com/apache/airflow/pull/59754#issuecomment-3698574961
@Sahil-Shadwal All of dag run tab test failing can you check?
<img width="1228" height="507" alt="image" src="https://github.com/user-attachments/assets/377212f7-dd72-45a4-9d97-485f26749406" />
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org