This is an automated email from the ASF dual-hosted git repository.

choo121600 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 6886e5bd8ad Remove unused isLoggedIn and expectLoginSuccess from UI 
e2e page objects (#67267)
6886e5bd8ad is described below

commit 6886e5bd8add36168a27022dc70e20e760053275
Author: Haseeb Malik <[email protected]>
AuthorDate: Thu May 21 23:48:24 2026 -0400

    Remove unused isLoggedIn and expectLoginSuccess from UI e2e page objects 
(#67267)
---
 airflow-core/src/airflow/ui/tests/e2e/pages/BasePage.ts  | 10 ----------
 airflow-core/src/airflow/ui/tests/e2e/pages/LoginPage.ts | 11 -----------
 2 files changed, 21 deletions(-)

diff --git a/airflow-core/src/airflow/ui/tests/e2e/pages/BasePage.ts 
b/airflow-core/src/airflow/ui/tests/e2e/pages/BasePage.ts
index 4eedd090928..0862afec92c 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/pages/BasePage.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/pages/BasePage.ts
@@ -34,16 +34,6 @@ export class BasePage {
     });
   }
 
-  public async isLoggedIn(): Promise<boolean> {
-    try {
-      await expect(this.welcomeHeading).toBeVisible({ timeout: 30_000 });
-
-      return true;
-    } catch {
-      return !this.page.url().includes("/login");
-    }
-  }
-
   public async maximizeBrowser(): Promise<void> {
     try {
       await this.page.setViewportSize({ height: 1080, width: 1920 });
diff --git a/airflow-core/src/airflow/ui/tests/e2e/pages/LoginPage.ts 
b/airflow-core/src/airflow/ui/tests/e2e/pages/LoginPage.ts
index e4e9cb0ee0b..8f753aa3001 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/pages/LoginPage.ts
+++ b/airflow-core/src/airflow/ui/tests/e2e/pages/LoginPage.ts
@@ -43,17 +43,6 @@ export class LoginPage extends BasePage {
     this.errorMessage = page.getByText("Invalid credentials");
   }
 
-  public async expectLoginSuccess(): Promise<void> {
-    const currentUrl: string = this.page.url();
-
-    if (currentUrl.includes("/login")) {
-      throw new Error(`Expected to be redirected after login, but still on: 
${currentUrl}`);
-    }
-
-    const isLoggedIn: boolean = await this.isLoggedIn();
-
-    expect(isLoggedIn).toBe(true);
-  }
   public async login(username: string, password: string): Promise<void> {
     await this.usernameInput.fill(username);
     await this.passwordInput.fill(password);

Reply via email to