vatsrahul1001 commented on code in PR #59374:
URL: https://github.com/apache/airflow/pull/59374#discussion_r2629424876


##########
airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts:
##########
@@ -98,3 +99,289 @@ test.describe("Dag Trigger Workflow", () => {
     }
   });
 });
+
+/**
+ * DAGS-001: Verify Dags List Displays
+ *
+ * This test verifies that the Dags list page displays correctly after login,
+ * including the presence of the Dags table and at least one Dag entry.
+ */
+
+test.describe("Dags List Display", () => {
+  let loginPage: LoginPage;
+  let dagsPage: DagsPage;
+
+  // Test configuration from centralized config
+  const testCredentials = testConfig.credentials;
+
+  test.beforeEach(({ page }, testInfo) => {
+    loginPage = new LoginPage(page);
+    dagsPage = new DagsPage(page);
+    testInfo.setTimeout(2 * 60 * 1000);
+  });
+
+  test("should display Dags list after successful login", async () => {
+    // Step 1: Login to Airflow
+    await loginPage.navigateAndLogin(testCredentials.username, 
testCredentials.password);
+
+    // Step 2: Verify login was successful
+    await loginPage.expectLoginSuccess();
+
+    // Step 3: Navigate to Dags list page
+    await dagsPage.navigate();
+
+    // Step 4: Verify Dags list/table is visible
+    await dagsPage.verifyDagsListVisible();
+
+    // Step 5: Verify at least one Dag is displayed
+    const dagsCount = await dagsPage.getDagsCount();
+
+    expect(dagsCount).toBeGreaterThan(0);
+  });
+
+  test("should display Dag links correctly", async () => {
+    // Step 1: Login to Airflow
+    await loginPage.navigateAndLogin(testCredentials.username, 
testCredentials.password);
+
+    await loginPage.expectLoginSuccess();
+
+    // Step 2: Navigate to Dags list page
+    await dagsPage.navigate();
+
+    // Step 3: Verify Dags list is visible
+    await dagsPage.verifyDagsListVisible();
+
+    // Step 4: Get all Dag links
+    const dagLinks = await dagsPage.getDagLinks();
+
+    // Step 5: Verify links exist and have correct format
+    expect(dagLinks.length).toBeGreaterThan(0);
+
+    // Verify each link has the correct format (/dags/{dag_id})
+    for (const link of dagLinks) {
+      expect(link).toMatch(/\/dags\/.+/);
+    }
+  });
+
+  test("should display test Dag in the list", async () => {
+    const testDagId = testConfig.testDag.id;
+
+    // Step 1: Login to Airflow
+    await loginPage.navigateAndLogin(testCredentials.username, 
testCredentials.password);
+
+    await loginPage.expectLoginSuccess();
+
+    // Step 2: Navigate to Dags list page
+    await dagsPage.navigate();
+
+    // Step 3: Verify Dags list is visible
+    await dagsPage.verifyDagsListVisible();
+
+    // Step 4: Verify the test Dag exists in the list
+    const dagExists = await dagsPage.verifyDagExists(testDagId);
+
+    expect(dagExists).toBe(true);
+  });
+});
+
+/**
+ * Card/Table View Toggle Tests
+ */
+
+test.describe("Dags View Toggle", () => {
+  let loginPage: LoginPage;
+  let dagsPage: DagsPage;
+
+  const testCredentials = testConfig.credentials;
+
+  test.beforeEach(({ page }, testInfo) => {
+    loginPage = new LoginPage(page);
+    dagsPage = new DagsPage(page);
+    testInfo.setTimeout(2 * 60 * 1000);
+  });
+
+  test("should toggle between card view and table view", async () => {
+
+    // Step 1: Login to Airflow
+    await loginPage.navigateAndLogin(testCredentials.username, 
testCredentials.password);
+
+    await loginPage.expectLoginSuccess();
+
+    // Step 2: Navigate to Dags list page
+    await dagsPage.navigate();
+
+    // Step 3: Verify Dags list is visible
+    await dagsPage.verifyDagsListVisible();
+
+    // Step 4: Switch to card view
+    await dagsPage.switchToCardView();
+
+    // Step 5: Verify card view is displayed
+    const cardViewVisible = await dagsPage.verifyCardViewVisible();

Review Comment:
   Can we also check if DAGs are also visible in card view?



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