Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-02-12 Thread via GitHub


vatsrahul1001 merged PR #60738:
URL: https://github.com/apache/airflow/pull/60738


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



Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-02-12 Thread via GitHub


vatsrahul1001 commented on PR #60738:
URL: https://github.com/apache/airflow/pull/60738#issuecomment-3891258662

   Nice!. 


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



Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-02-12 Thread via GitHub


vishakha1411 commented on PR #60738:
URL: https://github.com/apache/airflow/pull/60738#issuecomment-3890969018

   @vatsrahul1001 I have fixed the failing tests and have removed the 
pagination and sorting tests as suggested. PTAL. Thanks.


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



Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-02-11 Thread via GitHub


vatsrahul1001 commented on PR #60738:
URL: https://github.com/apache/airflow/pull/60738#issuecomment-3888681651

   @vishakha1411 can you look at failing tests?  Also lets remove pagination 
and sorting test as discussed in 
[comment](https://github.com/apache/airflow/issues/59028#issuecomment-3885458548).
 We will cover all testing behaviour in react unit 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: [email protected]

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



Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-02-11 Thread via GitHub


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


##
airflow-core/src/airflow/ui/tests/e2e/pages/ConnectionsPage.ts:
##
@@ -0,0 +1,622 @@
+/*!
+ * 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, type Locator, type Page } from "@playwright/test";
+import { BasePage } from "tests/e2e/pages/BasePage";
+
+type ConnectionDetails = {
+  conn_type: string;
+  connection_id: string;
+  description?: string;
+  extra?: string;
+  host?: string;
+  login?: string;
+  password?: string;
+  port?: number | string;
+  schema?: string;
+};
+
+export class ConnectionsPage extends BasePage {
+  // Page URLs
+  public static get connectionsListUrl(): string {
+return "/connections";
+  }
+
+  public readonly addButton: Locator;
+  public readonly confirmDeleteButton: Locator;
+  public readonly connectionForm: Locator;
+  public readonly connectionIdHeader: Locator;
+  public readonly connectionIdInput: Locator;
+  // Core page elements
+  public readonly connectionsTable: Locator;
+  public readonly connectionTypeHeader: Locator;
+  public readonly connectionTypeSelect: Locator;
+  public readonly descriptionInput: Locator;
+  public readonly emptyState: Locator;
+  public readonly hostHeader: Locator;
+  public readonly hostInput: Locator;
+  public readonly loginInput: Locator;
+
+  // Pagination elements
+  public readonly paginationNextButton: Locator;
+  public readonly paginationPrevButton: Locator;
+  public readonly passwordInput: Locator;
+
+  public readonly portInput: Locator;
+  public readonly rowsPerPageSelect: Locator;
+  public readonly saveButton: Locator;
+
+  public readonly schemaInput: Locator;
+  public readonly searchInput: Locator;
+  public readonly successAlert: Locator;
+  // Sorting and filtering
+  public readonly tableHeader: Locator;
+  public readonly testConnectionButton: Locator;
+
+  public constructor(page: Page) {
+super(page);
+// Table elements (Chakra UI DataTable)
+this.connectionsTable = page.locator('[role="grid"], table');
+this.emptyState = page.locator("text=/No connection found!/i");
+
+// Action buttons
+this.addButton = page.getByRole("button", { name: "Add Connection" });
+this.testConnectionButton = page.locator('button:has-text("Test")');
+this.saveButton = page.getByRole("button", { name: /^save$/i });
+
+// Form inputs (Chakra UI inputs)
+this.connectionForm = 
page.locator('[data-scope="dialog"][data-part="content"]');
+this.connectionIdInput = 
page.locator('input[name="connection_id"]').first();
+this.connectionTypeSelect = page.getByRole("combobox").first();
+this.hostInput = page.locator('input[name="host"]').first();
+this.portInput = page.locator('input[name="port"]').first();
+this.loginInput = page.locator('input[name="login"]').first();
+this.passwordInput = page.locator('input[name="password"], 
input[type="password"]').first();
+this.schemaInput = page.locator('input[name="schema"]').first();
+// Try multiple possible selectors
+this.descriptionInput = page.locator('[name="description"]').first();
+
+// Alerts
+this.successAlert = page.locator('[data-scope="toast"][data-part="root"]');
+
+// Delete confirmation dialog
+this.confirmDeleteButton = 
page.locator('button:has-text("Delete")').first();
+
+// Pagination
+this.paginationNextButton = page.locator('[data-testid="next"]');
+this.paginationPrevButton = page.locator('[data-testid="prev"]');
+this.rowsPerPageSelect = page.locator("select");
+
+// Sorting and filtering
+this.tableHeader = page.locator('[role="columnheader"]').first();
+this.connectionIdHeader = 
page.locator('[role="columnheader"]:has-text("Connection ID")').first();
+this.connectionTypeHeader = 
page.locator('[role="columnheader"]:has-text("Connection Type")').first();
+this.hostHeader = 
page.locator('[role="columnheader"]:has-text("Host")').first();
+this.searchInput = page.locator('input[placeholder*="Search"], 
input[placeholder*="search"]').first();
+  }
+
+  // Click the Add button to create a new connection
+  public async clickAddButton

Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-02-11 Thread via GitHub


vishakha1411 commented on code in PR #60738:
URL: https://github.com/apache/airflow/pull/60738#discussion_r2794771378


##
airflow-core/src/airflow/ui/tests/e2e/specs/connections.spec.ts:
##
@@ -0,0 +1,558 @@
+/*!
+ * 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 { testConfig, AUTH_FILE } from "playwright.config";
+import { ConnectionsPage } from "tests/e2e/pages/ConnectionsPage";
+
+test.describe("Connections Page - List and Display", () => {
+  let connectionsPage: ConnectionsPage;
+  const { baseUrl } = testConfig.connection;
+
+  test.beforeEach(({ page }) => {
+connectionsPage = new ConnectionsPage(page);
+  });
+  test.beforeAll(async ({ browser }) => {
+const context = await browser.newContext({ storageState: AUTH_FILE });
+const page = await context.newPage();
+
+await page.request.post(`${baseUrl}/api/v2/connections`, {
+  data: {
+conn_type: "http",
+connection_id: "list_seed_conn",
+host: "seed.example.com",
+  },
+});
+  });
+
+  test.afterAll(async ({ browser }) => {
+const context = await browser.newContext({ storageState: AUTH_FILE });
+const page = await context.newPage();
+
+await page.request.delete(`${baseUrl}/api/v2/connections/list_seed_conn`);
+  });
+
+  test("should display connections list page", async () => {
+await connectionsPage.navigate();
+
+// Verify the page is loaded
+expect(connectionsPage.page.url()).toContain("/connections");
+
+// Verify table or list is visible
+expect(await connectionsPage.connectionsTable.isVisible()).toBeTruthy();
+  });
+
+  test("should display connections with correct columns", async () => {
+await connectionsPage.navigate();
+
+// Check that we have at least one row
+const count = await connectionsPage.getConnectionCount();
+
+expect(count).toBeGreaterThanOrEqual(0);
+
+if (count > 0) {
+  // Verify connections are listed with expected information
+  const connectionIds = await connectionsPage.getConnectionIds();
+
+  expect(connectionIds.length).toBeGreaterThan(0);
+}
+  });
+
+  test("should have Add button visible", async () => {
+await connectionsPage.navigate();
+expect(await connectionsPage.addButton.isVisible()).toBeTruthy();
+  });
+});
+
+test.describe("Connections Page - CRUD Operations", () => {
+  let connectionsPage: ConnectionsPage;
+  const { baseUrl } = testConfig.connection;
+  const timestamp = Date.now();
+
+  // Test connection details - using dynamic data
+  const testConnection = {
+conn_type: "postgres", // Adjust based on available connection types in 
your Airflow instance
+connection_id: `test_conn_${timestamp}`,
+description: `Test connection created at ${new Date().toISOString()}`,
+extra: JSON.stringify({
+  options: "-c statement_timeout=5000",
+  sslmode: "require",
+}),
+host: `test-host-${timestamp}.example.com`,
+login: `test_user_${timestamp}`,
+password: `test_password_${timestamp}`,
+port: 5432,
+schema: "test_db",
+  };
+
+  const updatedConnection = {
+description: `Updated test connection at ${new Date().toISOString()}`,
+host: `updated-host-${timestamp}.example.com`,
+login: `updated_user_${timestamp}`,
+port: 5433,
+  };
+
+  test.beforeEach(({ page }) => {
+connectionsPage = new ConnectionsPage(page);
+  });
+
+  test.afterAll(async ({ browser }) => {
+// Cleanup: Delete test connections via API
+const context = await browser.newContext({ storageState: AUTH_FILE });
+const page = await context.newPage();
+
+// Delete the test connection
+const deleteResponse = await page.request.delete(
+  `${baseUrl}/api/v2/connections/${testConnection.connection_id}`,
+);
+
+expect([204, 404]).toContain(deleteResponse.status());
+  });
+
+  test("should create a new connection with all fields", async () => {
+test.setTimeout(60_000); // 1 minute for slower browsers like Firefox
+await connectionsPage.navigate();
+
+// Click add button
+await connectionsPage.createConnection(testConnection);
+// Verify the connection was created
+const exi

Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-02-11 Thread via GitHub


vishakha1411 commented on code in PR #60738:
URL: https://github.com/apache/airflow/pull/60738#discussion_r2794754999


##
airflow-core/src/airflow/ui/tests/e2e/pages/ConnectionsPage.ts:
##
@@ -0,0 +1,622 @@
+/*!
+ * 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, type Locator, type Page } from "@playwright/test";
+import { BasePage } from "tests/e2e/pages/BasePage";
+
+type ConnectionDetails = {
+  conn_type: string;
+  connection_id: string;
+  description?: string;
+  extra?: string;
+  host?: string;
+  login?: string;
+  password?: string;
+  port?: number | string;
+  schema?: string;
+};
+
+export class ConnectionsPage extends BasePage {
+  // Page URLs
+  public static get connectionsListUrl(): string {
+return "/connections";
+  }
+
+  public readonly addButton: Locator;
+  public readonly confirmDeleteButton: Locator;
+  public readonly connectionForm: Locator;
+  public readonly connectionIdHeader: Locator;
+  public readonly connectionIdInput: Locator;
+  // Core page elements
+  public readonly connectionsTable: Locator;
+  public readonly connectionTypeHeader: Locator;
+  public readonly connectionTypeSelect: Locator;
+  public readonly descriptionInput: Locator;
+  public readonly emptyState: Locator;
+  public readonly hostHeader: Locator;
+  public readonly hostInput: Locator;
+  public readonly loginInput: Locator;
+
+  // Pagination elements
+  public readonly paginationNextButton: Locator;
+  public readonly paginationPrevButton: Locator;
+  public readonly passwordInput: Locator;
+
+  public readonly portInput: Locator;
+  public readonly rowsPerPageSelect: Locator;
+  public readonly saveButton: Locator;
+
+  public readonly schemaInput: Locator;
+  public readonly searchInput: Locator;
+  public readonly successAlert: Locator;
+  // Sorting and filtering
+  public readonly tableHeader: Locator;
+  public readonly testConnectionButton: Locator;
+
+  public constructor(page: Page) {
+super(page);
+// Table elements (Chakra UI DataTable)
+this.connectionsTable = page.locator('[role="grid"], table');
+this.emptyState = page.locator("text=/No connection found!/i");
+
+// Action buttons
+this.addButton = page.getByRole("button", { name: "Add Connection" });
+this.testConnectionButton = page.locator('button:has-text("Test")');
+this.saveButton = page.getByRole("button", { name: /^save$/i });
+
+// Form inputs (Chakra UI inputs)
+this.connectionForm = 
page.locator('[data-scope="dialog"][data-part="content"]');
+this.connectionIdInput = 
page.locator('input[name="connection_id"]').first();
+this.connectionTypeSelect = page.getByRole("combobox").first();
+this.hostInput = page.locator('input[name="host"]').first();
+this.portInput = page.locator('input[name="port"]').first();
+this.loginInput = page.locator('input[name="login"]').first();
+this.passwordInput = page.locator('input[name="password"], 
input[type="password"]').first();
+this.schemaInput = page.locator('input[name="schema"]').first();
+// Try multiple possible selectors
+this.descriptionInput = page.locator('[name="description"]').first();
+
+// Alerts
+this.successAlert = page.locator('[data-scope="toast"][data-part="root"]');
+
+// Delete confirmation dialog
+this.confirmDeleteButton = 
page.locator('button:has-text("Delete")').first();
+
+// Pagination
+this.paginationNextButton = page.locator('[data-testid="next"]');
+this.paginationPrevButton = page.locator('[data-testid="prev"]');
+this.rowsPerPageSelect = page.locator("select");
+
+// Sorting and filtering
+this.tableHeader = page.locator('[role="columnheader"]').first();
+this.connectionIdHeader = 
page.locator('[role="columnheader"]:has-text("Connection ID")').first();
+this.connectionTypeHeader = 
page.locator('[role="columnheader"]:has-text("Connection Type")').first();
+this.hostHeader = 
page.locator('[role="columnheader"]:has-text("Host")').first();
+this.searchInput = page.locator('input[placeholder*="Search"], 
input[placeholder*="search"]').first();
+  }
+
+  // Click the Add button to create a new connection
+  public async clickAddButton(

Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-02-11 Thread via GitHub


vishakha1411 commented on code in PR #60738:
URL: https://github.com/apache/airflow/pull/60738#discussion_r2794750855


##
airflow-core/src/airflow/ui/tests/e2e/pages/ConnectionsPage.ts:
##
@@ -0,0 +1,622 @@
+/*!
+ * 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, type Locator, type Page } from "@playwright/test";
+import { BasePage } from "tests/e2e/pages/BasePage";
+
+type ConnectionDetails = {
+  conn_type: string;
+  connection_id: string;
+  description?: string;
+  extra?: string;
+  host?: string;
+  login?: string;
+  password?: string;
+  port?: number | string;
+  schema?: string;
+};
+
+export class ConnectionsPage extends BasePage {
+  // Page URLs
+  public static get connectionsListUrl(): string {
+return "/connections";
+  }
+
+  public readonly addButton: Locator;
+  public readonly confirmDeleteButton: Locator;
+  public readonly connectionForm: Locator;
+  public readonly connectionIdHeader: Locator;
+  public readonly connectionIdInput: Locator;
+  // Core page elements
+  public readonly connectionsTable: Locator;
+  public readonly connectionTypeHeader: Locator;
+  public readonly connectionTypeSelect: Locator;
+  public readonly descriptionInput: Locator;
+  public readonly emptyState: Locator;
+  public readonly hostHeader: Locator;
+  public readonly hostInput: Locator;
+  public readonly loginInput: Locator;
+
+  // Pagination elements
+  public readonly paginationNextButton: Locator;
+  public readonly paginationPrevButton: Locator;
+  public readonly passwordInput: Locator;
+
+  public readonly portInput: Locator;
+  public readonly rowsPerPageSelect: Locator;
+  public readonly saveButton: Locator;
+
+  public readonly schemaInput: Locator;
+  public readonly searchInput: Locator;
+  public readonly successAlert: Locator;
+  // Sorting and filtering
+  public readonly tableHeader: Locator;
+  public readonly testConnectionButton: Locator;
+
+  public constructor(page: Page) {
+super(page);
+// Table elements (Chakra UI DataTable)
+this.connectionsTable = page.locator('[role="grid"], table');
+this.emptyState = page.locator("text=/No connection found!/i");
+
+// Action buttons
+this.addButton = page.getByRole("button", { name: "Add Connection" });
+this.testConnectionButton = page.locator('button:has-text("Test")');
+this.saveButton = page.getByRole("button", { name: /^save$/i });
+
+// Form inputs (Chakra UI inputs)
+this.connectionForm = 
page.locator('[data-scope="dialog"][data-part="content"]');
+this.connectionIdInput = 
page.locator('input[name="connection_id"]').first();
+this.connectionTypeSelect = page.getByRole("combobox").first();
+this.hostInput = page.locator('input[name="host"]').first();
+this.portInput = page.locator('input[name="port"]').first();
+this.loginInput = page.locator('input[name="login"]').first();
+this.passwordInput = page.locator('input[name="password"], 
input[type="password"]').first();
+this.schemaInput = page.locator('input[name="schema"]').first();
+// Try multiple possible selectors
+this.descriptionInput = page.locator('[name="description"]').first();
+
+// Alerts
+this.successAlert = page.locator('[data-scope="toast"][data-part="root"]');
+
+// Delete confirmation dialog
+this.confirmDeleteButton = 
page.locator('button:has-text("Delete")').first();
+
+// Pagination
+this.paginationNextButton = page.locator('[data-testid="next"]');
+this.paginationPrevButton = page.locator('[data-testid="prev"]');
+this.rowsPerPageSelect = page.locator("select");
+
+// Sorting and filtering
+this.tableHeader = page.locator('[role="columnheader"]').first();
+this.connectionIdHeader = 
page.locator('[role="columnheader"]:has-text("Connection ID")').first();
+this.connectionTypeHeader = 
page.locator('[role="columnheader"]:has-text("Connection Type")').first();
+this.hostHeader = 
page.locator('[role="columnheader"]:has-text("Host")').first();
+this.searchInput = page.locator('input[placeholder*="Search"], 
input[placeholder*="search"]').first();
+  }
+
+  // Click the Add button to create a new connection
+  public async clickAddButton(

Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-02-11 Thread via GitHub


vishakha1411 commented on code in PR #60738:
URL: https://github.com/apache/airflow/pull/60738#discussion_r2794724317


##
airflow-core/src/airflow/ui/tests/e2e/pages/ConnectionsPage.ts:
##
@@ -0,0 +1,622 @@
+/*!
+ * 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, type Locator, type Page } from "@playwright/test";
+import { BasePage } from "tests/e2e/pages/BasePage";
+
+type ConnectionDetails = {
+  conn_type: string;
+  connection_id: string;
+  description?: string;
+  extra?: string;
+  host?: string;
+  login?: string;
+  password?: string;
+  port?: number | string;
+  schema?: string;
+};
+
+export class ConnectionsPage extends BasePage {
+  // Page URLs
+  public static get connectionsListUrl(): string {
+return "/connections";
+  }
+
+  public readonly addButton: Locator;
+  public readonly confirmDeleteButton: Locator;
+  public readonly connectionForm: Locator;
+  public readonly connectionIdHeader: Locator;
+  public readonly connectionIdInput: Locator;
+  // Core page elements
+  public readonly connectionsTable: Locator;
+  public readonly connectionTypeHeader: Locator;
+  public readonly connectionTypeSelect: Locator;
+  public readonly descriptionInput: Locator;
+  public readonly emptyState: Locator;
+  public readonly hostHeader: Locator;
+  public readonly hostInput: Locator;
+  public readonly loginInput: Locator;
+
+  // Pagination elements
+  public readonly paginationNextButton: Locator;
+  public readonly paginationPrevButton: Locator;
+  public readonly passwordInput: Locator;
+
+  public readonly portInput: Locator;
+  public readonly rowsPerPageSelect: Locator;
+  public readonly saveButton: Locator;
+
+  public readonly schemaInput: Locator;
+  public readonly searchInput: Locator;
+  public readonly successAlert: Locator;
+  // Sorting and filtering
+  public readonly tableHeader: Locator;
+  public readonly testConnectionButton: Locator;
+
+  public constructor(page: Page) {
+super(page);
+// Table elements (Chakra UI DataTable)
+this.connectionsTable = page.locator('[role="grid"], table');
+this.emptyState = page.locator("text=/No connection found!/i");
+
+// Action buttons
+this.addButton = page.getByRole("button", { name: "Add Connection" });
+this.testConnectionButton = page.locator('button:has-text("Test")');
+this.saveButton = page.getByRole("button", { name: /^save$/i });
+
+// Form inputs (Chakra UI inputs)
+this.connectionForm = 
page.locator('[data-scope="dialog"][data-part="content"]');
+this.connectionIdInput = 
page.locator('input[name="connection_id"]').first();
+this.connectionTypeSelect = page.getByRole("combobox").first();
+this.hostInput = page.locator('input[name="host"]').first();
+this.portInput = page.locator('input[name="port"]').first();
+this.loginInput = page.locator('input[name="login"]').first();
+this.passwordInput = page.locator('input[name="password"], 
input[type="password"]').first();
+this.schemaInput = page.locator('input[name="schema"]').first();
+// Try multiple possible selectors
+this.descriptionInput = page.locator('[name="description"]').first();
+
+// Alerts
+this.successAlert = page.locator('[data-scope="toast"][data-part="root"]');
+
+// Delete confirmation dialog
+this.confirmDeleteButton = 
page.locator('button:has-text("Delete")').first();
+
+// Pagination
+this.paginationNextButton = page.locator('[data-testid="next"]');
+this.paginationPrevButton = page.locator('[data-testid="prev"]');
+this.rowsPerPageSelect = page.locator("select");
+
+// Sorting and filtering
+this.tableHeader = page.locator('[role="columnheader"]').first();
+this.connectionIdHeader = 
page.locator('[role="columnheader"]:has-text("Connection ID")').first();
+this.connectionTypeHeader = 
page.locator('[role="columnheader"]:has-text("Connection Type")').first();
+this.hostHeader = 
page.locator('[role="columnheader"]:has-text("Host")').first();
+this.searchInput = page.locator('input[placeholder*="Search"], 
input[placeholder*="search"]').first();
+  }
+
+  // Click the Add button to create a new connection
+  public async clickAddButton(

Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-02-11 Thread via GitHub


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


##
airflow-core/src/airflow/ui/tests/e2e/specs/connections.spec.ts:
##
@@ -0,0 +1,558 @@
+/*!
+ * 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 { testConfig, AUTH_FILE } from "playwright.config";
+import { ConnectionsPage } from "tests/e2e/pages/ConnectionsPage";
+
+test.describe("Connections Page - List and Display", () => {
+  let connectionsPage: ConnectionsPage;
+  const { baseUrl } = testConfig.connection;
+
+  test.beforeEach(({ page }) => {
+connectionsPage = new ConnectionsPage(page);
+  });
+  test.beforeAll(async ({ browser }) => {
+const context = await browser.newContext({ storageState: AUTH_FILE });
+const page = await context.newPage();
+
+await page.request.post(`${baseUrl}/api/v2/connections`, {
+  data: {
+conn_type: "http",
+connection_id: "list_seed_conn",
+host: "seed.example.com",
+  },
+});
+  });
+
+  test.afterAll(async ({ browser }) => {
+const context = await browser.newContext({ storageState: AUTH_FILE });
+const page = await context.newPage();
+
+await page.request.delete(`${baseUrl}/api/v2/connections/list_seed_conn`);
+  });
+
+  test("should display connections list page", async () => {
+await connectionsPage.navigate();
+
+// Verify the page is loaded
+expect(connectionsPage.page.url()).toContain("/connections");
+
+// Verify table or list is visible
+expect(await connectionsPage.connectionsTable.isVisible()).toBeTruthy();
+  });
+
+  test("should display connections with correct columns", async () => {
+await connectionsPage.navigate();
+
+// Check that we have at least one row
+const count = await connectionsPage.getConnectionCount();
+
+expect(count).toBeGreaterThanOrEqual(0);
+
+if (count > 0) {
+  // Verify connections are listed with expected information
+  const connectionIds = await connectionsPage.getConnectionIds();
+
+  expect(connectionIds.length).toBeGreaterThan(0);
+}
+  });
+
+  test("should have Add button visible", async () => {
+await connectionsPage.navigate();
+expect(await connectionsPage.addButton.isVisible()).toBeTruthy();
+  });
+});
+
+test.describe("Connections Page - CRUD Operations", () => {
+  let connectionsPage: ConnectionsPage;
+  const { baseUrl } = testConfig.connection;
+  const timestamp = Date.now();
+
+  // Test connection details - using dynamic data
+  const testConnection = {
+conn_type: "postgres", // Adjust based on available connection types in 
your Airflow instance
+connection_id: `test_conn_${timestamp}`,
+description: `Test connection created at ${new Date().toISOString()}`,
+extra: JSON.stringify({
+  options: "-c statement_timeout=5000",
+  sslmode: "require",
+}),
+host: `test-host-${timestamp}.example.com`,
+login: `test_user_${timestamp}`,
+password: `test_password_${timestamp}`,
+port: 5432,
+schema: "test_db",
+  };
+
+  const updatedConnection = {
+description: `Updated test connection at ${new Date().toISOString()}`,
+host: `updated-host-${timestamp}.example.com`,
+login: `updated_user_${timestamp}`,
+port: 5433,
+  };
+
+  test.beforeEach(({ page }) => {
+connectionsPage = new ConnectionsPage(page);
+  });
+
+  test.afterAll(async ({ browser }) => {
+// Cleanup: Delete test connections via API
+const context = await browser.newContext({ storageState: AUTH_FILE });
+const page = await context.newPage();
+
+// Delete the test connection
+const deleteResponse = await page.request.delete(
+  `${baseUrl}/api/v2/connections/${testConnection.connection_id}`,
+);
+
+expect([204, 404]).toContain(deleteResponse.status());
+  });
+
+  test("should create a new connection with all fields", async () => {
+test.setTimeout(60_000); // 1 minute for slower browsers like Firefox
+await connectionsPage.navigate();
+
+// Click add button
+await connectionsPage.createConnection(testConnection);
+// Verify the connection was created
+const ex

Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-02-05 Thread via GitHub


vatsrahul1001 commented on PR #60738:
URL: https://github.com/apache/airflow/pull/60738#issuecomment-3852245249

   > > @vishakha1411 How are we progressing on this?
   > 
   > @vatsrahul1001 I made a few fixes to address the flaky tests. All the 
tests pass now. Please review and let me know if any changes are required.
   
   Thanks @vishakha1411 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: [email protected]

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



Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-02-01 Thread via GitHub


vishakha1411 commented on PR #60738:
URL: https://github.com/apache/airflow/pull/60738#issuecomment-3833421219

   > @vishakha1411 How are we progressing on this?
   
   @vatsrahul1001 I made a few fixes to address the flaky tests. All the tests 
pass now. Please review and let me know if any changes are required.


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



Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-02-01 Thread via GitHub


vatsrahul1001 commented on PR #60738:
URL: https://github.com/apache/airflow/pull/60738#issuecomment-3833226492

   @vishakha1411 How are we progressing on this?


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



Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-01-29 Thread via GitHub


vatsrahul1001 commented on PR #60738:
URL: https://github.com/apache/airflow/pull/60738#issuecomment-3816733830

   > @vatsrahul1001 @choo121600 I noticed that a few CRUD tests are failing on 
Chromium in CI, while the same tests pass on Firefox and WebKit. All tests are 
also passing locally for all browsers. It seems like CI is sometimes unable to 
locate elements within the timeout in Chromium. Could you please suggest the 
best way to handle this? Would increasing timeouts be acceptable here, or is 
there a preferred approach for this? Also, please let me know if any other 
changes are required in the code.
   
   @vishakha1411 As per the stacktrace from 
[failure](https://github.com/apache/airflow/actions/runs/21434504965/job/61725112861?pr=60738)
 I see even after clicking on edit button edit form is not visible as per 
failure screenshot
   https://github.com/user-attachments/assets/f2e3f098-1ce7-4643-bf19-4bcb937fb962";
 />
   
   ```
 131 | await expect(editButton).toBeVisible({ timeout: 5000 });
 132 | await editButton.click();
   > 133 | await expect(this.connectionIdInput).toBeVisible({ timeout: 3000 
});
 |  ^
 134 |   }
   ```
   
   For debugging purposes, always try to look at the failure report. You can 
download the report from upload result 
[steps](https://github.com/apache/airflow/actions/runs/21434504965/job/61725112861?pr=60738).
   
   There could be two issues here: either the edit button is not getting 
clicked correctly, or it's taking time to open the edit button. Yes, you can 
try increasing the timeout, and also confirm if the edit button is getting 
clicked correctly or not.
   
   As you mentioned, it works locally fine, but I still suggest trying running 
test in UI mode, you can --ui-mode in breeze test command arg. It helps a lot 
in debugging


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



Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-01-28 Thread via GitHub


vishakha1411 commented on PR #60738:
URL: https://github.com/apache/airflow/pull/60738#issuecomment-3811171533

   @vatsrahul1001 @choo121600 I noticed that a few CRUD tests are failing on 
Chromium in CI, while the same tests pass on Firefox and WebKit. All tests are 
also passing locally for all browsers.
   It seems like CI is sometimes unable to locate elements within the timeout 
in Chromium. Could you please suggest the best way to handle this? Would 
increasing timeouts be acceptable here, or is there a preferred approach for 
this?
   Also, please let me know if any other changes are required in the code.


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



Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-01-28 Thread via GitHub


vishakha1411 commented on code in PR #60738:
URL: https://github.com/apache/airflow/pull/60738#discussion_r2735961948


##
airflow-core/src/airflow/ui/tests/e2e/pages/ConnectionsPage.ts:
##
@@ -0,0 +1,478 @@
+/*!
+ * 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, type Locator, type Page } from "@playwright/test";
+import { BasePage } from "tests/e2e/pages/BasePage";
+
+type ConnectionDetails = {
+  conn_type: string;
+  connection_id: string;
+  description?: string;
+  extra?: string;
+  host?: string;
+  login?: string;
+  password?: string;
+  port?: number | string;
+  schema?: string;
+};
+
+export class ConnectionsPage extends BasePage {
+  // Page URLs
+  public static get connectionsListUrl(): string {
+return "/connections";
+  }
+
+  public readonly addButton: Locator;
+  public readonly cancelDeleteButton: Locator;
+  public readonly confirmDeleteButton: Locator;
+  public readonly connectionIdHeader: Locator;
+  public readonly connectionIdInput: Locator;
+  // Core page elements
+  public readonly connectionsTable: Locator;
+  public readonly connectionTypeHeader: Locator;
+  public readonly connectionTypeSelect: Locator;
+  public readonly descriptionInput: Locator;
+  public readonly emptyState: Locator;
+  public readonly hostHeader: Locator;
+  public readonly hostInput: Locator;
+  public readonly loginInput: Locator;
+
+  // Pagination elements
+  public readonly paginationNextButton: Locator;
+  public readonly paginationPrevButton: Locator;
+  public readonly passwordInput: Locator;
+
+  public readonly portInput: Locator;
+  public readonly rowsPerPageSelect: Locator;
+  public readonly saveButton: Locator;
+
+  public readonly schemaInput: Locator;
+  public readonly searchInput: Locator;
+  public readonly successAlert: Locator;
+  // Sorting and filtering
+  public readonly tableHeader: Locator;
+  public readonly testConnectionButton: Locator;
+
+  public constructor(page: Page) {
+super(page);
+// Table elements (Chakra UI DataTable)
+this.connectionsTable = page.locator('[role="grid"], table');
+this.emptyState = page.locator("text=/No connection found!/i");
+
+// Action buttons
+this.addButton = page.getByRole("button", { name: "Add Connection" });
+this.testConnectionButton = page.locator('button:has-text("Test")');
+this.saveButton = page.getByRole("button", { name: /^save$/i });
+
+// Form inputs (Chakra UI inputs)
+this.connectionIdInput = 
page.locator('input[name="connection_id"]').first();
+this.connectionTypeSelect = page.getByRole("combobox").first();
+this.hostInput = page.locator('input[name="host"]').first();
+this.portInput = page.locator('input[name="port"]').first();
+this.loginInput = page.locator('input[name="login"]').first();
+this.passwordInput = page.locator('input[name="password"], 
input[type="password"]').first();
+this.schemaInput = page.locator('input[name="schema"]').first();
+// Try multiple possible selectors
+this.descriptionInput = page.locator('[name="description"]').first();
+
+// Alerts
+this.successAlert = page.locator('[data-scope="toast"][data-part="root"]');
+
+// Delete confirmation dialog
+this.confirmDeleteButton = 
page.locator('button:has-text("Delete")').first();
+this.cancelDeleteButton = 
page.locator('button:[aria-label*="Cancel"]').first();
+
+// Pagination
+this.paginationNextButton = page.locator('[data-testid="next"]');
+this.paginationPrevButton = page.locator('[data-testid="prev"]');
+this.rowsPerPageSelect = page.locator("select");
+
+// Sorting and filtering
+this.tableHeader = page.locator('[role="columnheader"]').first();
+this.connectionIdHeader = 
page.locator('[role="columnheader"]:has-text("Connection ID")').first();
+this.connectionTypeHeader = 
page.locator('[role="columnheader"]:has-text("Connection Type")').first();
+this.hostHeader = 
page.locator('[role="columnheader"]:has-text("Host")').first();
+this.searchInput = page.locator('input[placeholder*="Search"], 
input[placeholder*="search"]').first();
+  }
+
+  // Click the Add button to create a new connection
+  public async clickAddButt

Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-01-28 Thread via GitHub


choo121600 commented on code in PR #60738:
URL: https://github.com/apache/airflow/pull/60738#discussion_r2735507029


##
airflow-core/src/airflow/ui/tests/e2e/pages/ConnectionsPage.ts:
##
@@ -0,0 +1,478 @@
+/*!
+ * 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, type Locator, type Page } from "@playwright/test";
+import { BasePage } from "tests/e2e/pages/BasePage";
+
+type ConnectionDetails = {
+  conn_type: string;
+  connection_id: string;
+  description?: string;
+  extra?: string;
+  host?: string;
+  login?: string;
+  password?: string;
+  port?: number | string;
+  schema?: string;
+};
+
+export class ConnectionsPage extends BasePage {
+  // Page URLs
+  public static get connectionsListUrl(): string {
+return "/connections";
+  }
+
+  public readonly addButton: Locator;
+  public readonly cancelDeleteButton: Locator;
+  public readonly confirmDeleteButton: Locator;
+  public readonly connectionIdHeader: Locator;
+  public readonly connectionIdInput: Locator;
+  // Core page elements
+  public readonly connectionsTable: Locator;
+  public readonly connectionTypeHeader: Locator;
+  public readonly connectionTypeSelect: Locator;
+  public readonly descriptionInput: Locator;
+  public readonly emptyState: Locator;
+  public readonly hostHeader: Locator;
+  public readonly hostInput: Locator;
+  public readonly loginInput: Locator;
+
+  // Pagination elements
+  public readonly paginationNextButton: Locator;
+  public readonly paginationPrevButton: Locator;
+  public readonly passwordInput: Locator;
+
+  public readonly portInput: Locator;
+  public readonly rowsPerPageSelect: Locator;
+  public readonly saveButton: Locator;
+
+  public readonly schemaInput: Locator;
+  public readonly searchInput: Locator;
+  public readonly successAlert: Locator;
+  // Sorting and filtering
+  public readonly tableHeader: Locator;
+  public readonly testConnectionButton: Locator;
+
+  public constructor(page: Page) {
+super(page);
+// Table elements (Chakra UI DataTable)
+this.connectionsTable = page.locator('[role="grid"], table');
+this.emptyState = page.locator("text=/No connection found!/i");
+
+// Action buttons
+this.addButton = page.getByRole("button", { name: "Add Connection" });
+this.testConnectionButton = page.locator('button:has-text("Test")');
+this.saveButton = page.getByRole("button", { name: /^save$/i });
+
+// Form inputs (Chakra UI inputs)
+this.connectionIdInput = 
page.locator('input[name="connection_id"]').first();
+this.connectionTypeSelect = page.getByRole("combobox").first();
+this.hostInput = page.locator('input[name="host"]').first();
+this.portInput = page.locator('input[name="port"]').first();
+this.loginInput = page.locator('input[name="login"]').first();
+this.passwordInput = page.locator('input[name="password"], 
input[type="password"]').first();
+this.schemaInput = page.locator('input[name="schema"]').first();
+// Try multiple possible selectors
+this.descriptionInput = page.locator('[name="description"]').first();
+
+// Alerts
+this.successAlert = page.locator('[data-scope="toast"][data-part="root"]');
+
+// Delete confirmation dialog
+this.confirmDeleteButton = 
page.locator('button:has-text("Delete")').first();
+this.cancelDeleteButton = 
page.locator('button:[aria-label*="Cancel"]').first();
+
+// Pagination
+this.paginationNextButton = page.locator('[data-testid="next"]');
+this.paginationPrevButton = page.locator('[data-testid="prev"]');
+this.rowsPerPageSelect = page.locator("select");
+
+// Sorting and filtering
+this.tableHeader = page.locator('[role="columnheader"]').first();
+this.connectionIdHeader = 
page.locator('[role="columnheader"]:has-text("Connection ID")').first();
+this.connectionTypeHeader = 
page.locator('[role="columnheader"]:has-text("Connection Type")').first();
+this.hostHeader = 
page.locator('[role="columnheader"]:has-text("Host")').first();
+this.searchInput = page.locator('input[placeholder*="Search"], 
input[placeholder*="search"]').first();
+  }
+
+  // Click the Add button to create a new connection
+  public async clickAddButton

Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-01-28 Thread via GitHub


vishakha1411 commented on PR #60738:
URL: https://github.com/apache/airflow/pull/60738#issuecomment-3809789352

   @vatsrahul1001 I have made the changes you pointed out.
   
   ### Key Changes
   - **Removed all waitForTimeout calls** - replaced with expect.poll() and 
explicit element waits
   - **Removed console logs** 
   - **Improved pagination test** - formatted according to already existing 
tests
   - **Fixed filtering 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: [email protected]

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



Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-01-26 Thread via GitHub


vatsrahul1001 commented on PR #60738:
URL: https://github.com/apache/airflow/pull/60738#issuecomment-3798989379

   @vishakha1411 Great first PR! there are several alignment issues with our 
existing patterns that need to be addressed specifically in pagination and 
filter/search tests. I suggest to you look at how these are implemented for 
other pages.
   


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



Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-01-26 Thread via GitHub


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


##
airflow-core/src/airflow/ui/tests/e2e/pages/ConnectionsPage.ts:
##
@@ -0,0 +1,506 @@
+/*!
+ * 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, type Locator, type Page } from "@playwright/test";
+import { BasePage } from "tests/e2e/pages/BasePage";
+
+type ConnectionDetails = {
+  conn_type: string;
+  connection_id: string;
+  description?: string;
+  extra?: string;
+  host?: string;
+  login?: string;
+  password?: string;
+  port?: number | string;
+  schema?: string;
+};
+
+export class ConnectionsPage extends BasePage {
+  // Page URLs
+  public static get connectionsListUrl(): string {
+return "/connections";
+  }
+
+  public readonly addButton: Locator;
+  public readonly cancelDeleteButton: Locator;
+  public readonly confirmDeleteButton: Locator;
+  public readonly connectionIdHeader: Locator;
+  public readonly connectionIdInput: Locator;
+  // Core page elements
+  public readonly connectionsTable: Locator;
+  public readonly connectionTypeHeader: Locator;
+  public readonly connectionTypeSelect: Locator;
+  public readonly descriptionInput: Locator;
+  public readonly hostHeader: Locator;
+  public readonly hostInput: Locator;
+  public readonly loginInput: Locator;
+
+  // Pagination elements
+  public readonly paginationNextButton: Locator;
+  public readonly paginationPrevButton: Locator;
+  public readonly passwordInput: Locator;
+
+  public readonly portInput: Locator;
+  public readonly rowsPerPageSelect: Locator;
+  public readonly saveButton: Locator;
+
+  public readonly schemaInput: Locator;
+  public readonly searchInput: Locator;
+  public readonly successAlert: Locator;
+  // Sorting and filtering
+  public readonly tableHeader: Locator;
+  public readonly testConnectionButton: Locator;
+
+  public constructor(page: Page) {
+super(page);
+// Table elements (Chakra UI DataTable)
+this.connectionsTable = page.locator('[role="grid"], table');
+
+// Action buttons
+this.addButton = page.getByRole("button", { name: "Add Connection" });
+this.testConnectionButton = page.locator('button:has-text("Test")');
+this.saveButton = page.getByRole("button", { name: /^save$/i });
+
+// Form inputs (Chakra UI inputs)
+this.connectionIdInput = 
page.locator('input[name="connection_id"]').first();
+this.connectionTypeSelect = page.getByRole("combobox").first();
+this.hostInput = page.locator('input[name="host"]').first();
+this.portInput = page.locator('input[name="port"]').first();
+this.loginInput = page.locator('input[name="login"]').first();
+this.passwordInput = page.locator('input[name="password"], 
input[type="password"]').first();
+this.schemaInput = page.locator('input[name="schema"]').first();
+// Try multiple possible selectors
+this.descriptionInput = page.locator('[name="description"]').first();
+
+// Alerts
+this.successAlert = page.locator('[data-scope="toast"][data-part="root"]');
+
+// Delete confirmation dialog
+this.confirmDeleteButton = 
page.locator('button:has-text("Delete")').first();
+this.cancelDeleteButton = 
page.locator('button:[aria-label*="Cancel"]').first();
+
+// Pagination
+this.paginationNextButton = page.locator('button[aria-label*="next 
page"]').first();
+this.paginationPrevButton = page.locator('button[aria-label*="previous 
page"]').first();
+this.rowsPerPageSelect = page.locator("select");
+
+// Sorting and filtering
+this.tableHeader = page.locator('[role="columnheader"]').first();
+this.connectionIdHeader = 
page.locator('[role="columnheader"]:has-text("Connection ID")').first();
+this.connectionTypeHeader = 
page.locator('[role="columnheader"]:has-text("Connection Type")').first();
+this.hostHeader = 
page.locator('[role="columnheader"]:has-text("Host")').first();
+this.searchInput = page.locator('input[placeholder*="Search"], 
input[placeholder*="search"]').first();
+  }
+
+  // Click the Add button to create a new connection
+  public async clickAddButton(): Promise {
+await expect(this.addButton).toBeVisible({ 

Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-01-24 Thread via GitHub


vishakha1411 commented on PR #60738:
URL: https://github.com/apache/airflow/pull/60738#issuecomment-3795116750

   @vatsrahul1001 I noticed some static checks failed. I tried to fix them by 
explicitly handling nullable string values, changing null to undefined for 
consistency, and fixing naming conventions. Hope it works now, please check! 


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



Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-01-23 Thread via GitHub


vatsrahul1001 commented on PR #60738:
URL: https://github.com/apache/airflow/pull/60738#issuecomment-3789759494

   > I fixed the failing errors and removed redundant cross-browser 
compatibility tests. Since Playwright already executes the full test suite 
across all supported browsers, these tests were unnecessary. Please check now.
   
   Thanks @vishakha1411 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: [email protected]

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



Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-01-18 Thread via GitHub


vishakha1411 commented on PR #60738:
URL: https://github.com/apache/airflow/pull/60738#issuecomment-3766872094

   I fixed the failing errors and removed redundant cross-browser compatibility 
tests. Since Playwright already executes the full test suite across all 
supported browsers, these tests were unnecessary. Please check now.


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



Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-01-18 Thread via GitHub


vatsrahul1001 commented on PR #60738:
URL: https://github.com/apache/airflow/pull/60738#issuecomment-3765629611

   @vishakha1411 Thanks for the PR. 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: [email protected]

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



Re: [PR] added UI E2E Tests for Connections Page #60569 [airflow]

2026-01-17 Thread via GitHub


boring-cyborg[bot] commented on PR #60738:
URL: https://github.com/apache/airflow/pull/60738#issuecomment-3764981553

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

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