shashbha14 opened a new pull request, #61080:
URL: https://github.com/apache/airflow/pull/61080
Add E2E tests to verify the Variables page (/variables) functionality
including list display, CRUD operations, search, pagination, sorting, and
import.
Fixes #60565
Test Coverage
This PR adds 14 comprehensive E2E tests covering all requirements:
Display & CRUD Operations
✅ Verify variables list displays correctly
✅ Create variable (regular)
✅ Create encrypted variable
✅ Edit variable (value and description)
✅ Delete single variable
✅ Delete multiple variables (bulk operation)
Search Functionality
✅ Search variables by exact key pattern
✅ Search variables with wildcard pattern
Import Functionality
✅ Import variables from JSON file
Pagination
✅ Verify pagination works (navigation between pages)
Sorting
✅ Sort variables by Key (ascending)
✅ Sort variables by Key (descending)
✅ Sort variables by Value
✅ Sort variables by Description
Implementation Details
Page Object Model Architecture
BasePage.ts (74 lines) - Base class with common page interactions
LoginPage.ts (61 lines) - Authentication handling
VariablesPage.ts (377 lines) - Comprehensive Variables page object with:
CRUD operations (create, edit, delete single/bulk)
Search functionality
Import from file
Pagination controls
Sorting capabilities
Helper methods for verification
Test Specifications
variables.spec.ts (378 lines) - 14 test cases with:
Dynamic test data generation using timestamps
Proper setup in beforeAll (creates 35 baseline variables for pagination)
Proper cleanup in afterAll (batch deletion of test data)
Fresh login in beforeEach
Configuration
testConfig.ts (32 lines) - Centralized configuration with environment
variable support
playwright.config.ts - Cross-browser configuration (Chromium, Firefox,
WebKit)
README.md (144 lines) - Comprehensive E2E testing documentation
Acceptance Criteria
All acceptance criteria from issue #60565 have been met:
All tests follow Page Object Model (POM) pattern
Tests use testConfig for configuration
Tests create/cleanup their own test data in beforeAll/afterAll
Tests work across Chromium, Firefox, and WebKit browsers
No hardcoded values - use dynamic data where possible
Files Added
airflow/ui/tests/e2e/pages/BasePage.ts
airflow/ui/tests/e2e/pages/LoginPage.ts
airflow/ui/tests/e2e/pages/VariablesPage.ts
airflow/ui/tests/e2e/specs/variables.spec.ts
airflow/ui/tests/e2e/testConfig.ts
airflow/ui/tests/e2e/README.md
airflow/ui/playwright.config.ts
airflow/ui/.gitignore
How to Run Tests
bash
# Prerequisites
cd airflow/ui
pnpm install
pnpm exec playwright install
# Ensure Airflow is running at http://localhost:8080
# Then run tests:
# All E2E tests
pnpm test:e2e
# Interactive UI mode
pnpm test:e2e:ui
# Specific browser
pnpm test:e2e:chromium
pnpm test:e2e:firefox
pnpm test:e2e:webkit
Related Issues
Parent: #59028 (UI E2E Test Scenarios - Implementation Meta issue)
Implements: #60565 (UI E2E Test || ADMIN-001: Verify Variables Page
functionality)
Replaces: #60632 (closed due to merge conflicts)
--
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]