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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to