amankum2004 opened a new pull request, #61908:
URL: https://github.com/apache/airflow/pull/61908
# PR Description: Add E2E Coverage for Configuration Page
## Summary
- Adds end-to-end coverage for Configuration page behavior in the new UI.
- Introduces a dedicated Page Object for the Config page.
- Makes assertions configurable through `testConfig` so tests are reusable
across environments.
## What Changed
- Added `ConfigsPage` page object:
- `airflow-core/src/airflow/ui/tests/e2e/pages/ConfigsPage.ts`
- Encapsulates Config page selectors and helpers (`navigate`,
`waitForLoad`, row parsing, section/key matching).
- Added Config E2E spec:
- `airflow-core/src/airflow/ui/tests/e2e/specs/configs.spec.ts`
- Covers page render, Admin menu navigation, and row validations.
- Handles both supported runtime states:
- Config table exposed.
- Config values hidden with `403 Forbidden` message.
- Extended Playwright `testConfig`:
- `airflow-core/src/airflow/ui/playwright.config.ts`
- Added `configPage` options:
- `path`
- `expectedHeading`
- `expectsTableData`
- `expectedSection`
- `expectedKey`
- `forbiddenMessage`
- Updated E2E docs:
- `airflow-core/src/airflow/ui/tests/e2e/README.md`
- Documented new Config-page-related env vars.
## Test Coverage Added
- `verify configuration displays`
- `verify configuration page is accessible via Admin menu`
- `verify configuration section and key are rendered` (when
`TEST_CONFIG_PAGE_EXPECTS_TABLE_DATA=true`)
- `verify section, key and value are populated in configuration rows` (when
`TEST_CONFIG_PAGE_EXPECTS_TABLE_DATA=true`)
## Acceptance Criteria Mapping
- Page Object Model pattern: Met (`ConfigsPage` + spec uses page object
methods).
- Tests use `testConfig`: Met (`testConfig.configPage` drives path and
assertions).
- Works across Chromium, Firefox, WebKit: Met by Playwright project
configuration and spec compatibility.
## Notes
- The UI route under test is `/configs` (plural).
- By default, tests assume many environments hide config values for security:
- `TEST_CONFIG_PAGE_EXPECTS_TABLE_DATA=false` (default) validates the `403
Forbidden` state.
- To validate table content in an environment that exposes configuration
values:
- Set `TEST_CONFIG_PAGE_EXPECTS_TABLE_DATA=true`
- Optionally override `TEST_CONFIG_PAGE_SECTION` and
`TEST_CONFIG_PAGE_KEY`.
--
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]