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 98ad78ffdc3 Feat : Verify Configuration Page functionality(#60572) 
(#62293)
98ad78ffdc3 is described below

commit 98ad78ffdc355fa2711677a1bc8f8a35bb31245e
Author: Harsh Thakur <[email protected]>
AuthorDate: Wed Feb 25 13:21:44 2026 +0530

    Feat : Verify Configuration Page functionality(#60572) (#62293)
---
 .../ui/tests/e2e/pages/ConfigurationPage.ts        | 85 ++++++++++++++++++++++
 .../ui/tests/e2e/specs/Configuration.spec.ts       | 46 ++++++++++++
 .../airflow_breeze/commands/testing_commands.py    |  1 +
 3 files changed, 132 insertions(+)

diff --git a/airflow-core/src/airflow/ui/tests/e2e/pages/ConfigurationPage.ts 
b/airflow-core/src/airflow/ui/tests/e2e/pages/ConfigurationPage.ts
new file mode 100644
index 00000000000..0e393040fd8
--- /dev/null
+++ b/airflow-core/src/airflow/ui/tests/e2e/pages/ConfigurationPage.ts
@@ -0,0 +1,85 @@
+/*!
+ * 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.
+ */
+import type { Locator, Page } from "@playwright/test";
+
+import { BasePage } from "./BasePage";
+
+export class ConfigurationPage extends BasePage {
+  public readonly heading: Locator;
+  public readonly rows: Locator;
+  public readonly table: Locator;
+
+  public constructor(page: Page) {
+    super(page);
+
+    this.heading = page.getByRole("heading", {
+      name: /config/i,
+    });
+    this.table = page.getByTestId("table-list");
+    this.rows = this.table.locator("tbody tr").filter({
+      has: page.locator("td"),
+    });
+  }
+
+  public async getRowCount(): Promise<number> {
+    return this.rows.count();
+  }
+
+  public async getRowDetails(index: number) {
+    const row = this.rows.nth(index);
+    const cells = row.locator("td");
+
+    const section = await cells.nth(0).textContent();
+    const key = await cells.nth(1).textContent();
+    const value = await cells.nth(2).textContent();
+
+    return {
+      key: (key ?? "").trim(),
+      section: (section ?? "").trim(),
+      value: (value ?? "").trim(),
+    };
+  }
+
+  public async navigate(): Promise<void> {
+    await this.navigateTo("/configs");
+  }
+
+  public async waitForLoad(): Promise<void> {
+    await this.table.waitFor({ state: "visible", timeout: 30_000 });
+    await this.waitForTableData();
+  }
+
+  private async waitForTableData(): Promise<void> {
+    await this.page.waitForFunction(
+      () => {
+        const table = document.querySelector('[data-testid="table-list"]');
+
+        if (!table) {
+          return false;
+        }
+
+        const cells = table.querySelectorAll("tbody tr td");
+
+        return cells.length > 0;
+      },
+      undefined,
+      { timeout: 30_000 },
+    );
+  }
+}
diff --git a/airflow-core/src/airflow/ui/tests/e2e/specs/Configuration.spec.ts 
b/airflow-core/src/airflow/ui/tests/e2e/specs/Configuration.spec.ts
new file mode 100644
index 00000000000..ea75fe21f4c
--- /dev/null
+++ b/airflow-core/src/airflow/ui/tests/e2e/specs/Configuration.spec.ts
@@ -0,0 +1,46 @@
+/*!
+ * 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.
+ */
+import { expect, test } from "@playwright/test";
+
+import { ConfigurationPage } from "../pages/ConfigurationPage";
+
+test.describe("Configuration Page", () => {
+  let configPage: ConfigurationPage;
+
+  test.beforeEach(async ({ page }) => {
+    configPage = new ConfigurationPage(page);
+    await configPage.navigate();
+    await configPage.waitForLoad();
+  });
+
+  test("verify configuration displays", async () => {
+    await expect(configPage.heading).toBeVisible();
+    await expect(configPage.table).toBeVisible();
+
+    const count = await configPage.getRowCount();
+
+    expect(count).toBeGreaterThan(0);
+
+    const { key, section, value } = await configPage.getRowDetails(0);
+
+    expect(section.length).toBeGreaterThan(0);
+    expect(key.length).toBeGreaterThan(0);
+    expect(value.length).toBeGreaterThan(0);
+  });
+});
diff --git a/dev/breeze/src/airflow_breeze/commands/testing_commands.py 
b/dev/breeze/src/airflow_breeze/commands/testing_commands.py
index bd878e90b10..c8cad6db6c3 100644
--- a/dev/breeze/src/airflow_breeze/commands/testing_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/testing_commands.py
@@ -1518,6 +1518,7 @@ def ui_e2e_tests(
         env_vars = {
             "AIRFLOW_UID": str(os.getuid()),
             "AIRFLOW__CORE__LOAD_EXAMPLES": "true",
+            "AIRFLOW__API__EXPOSE_CONFIG": "true",
             "AIRFLOW_IMAGE_NAME": image_name,
         }
 

Reply via email to