This is an automated email from the ASF dual-hosted git repository.
eladkal 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 06c98cf15ce Add docs for when to do E2E tests (#65143)
06c98cf15ce is described below
commit 06c98cf15ceca927cf59018ea0b3e34ccbbf4745
Author: Brent Bovenzi <[email protected]>
AuthorDate: Mon Apr 13 13:06:35 2026 -0400
Add docs for when to do E2E tests (#65143)
---
airflow-core/src/airflow/ui/tests/e2e/README.md | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/airflow-core/src/airflow/ui/tests/e2e/README.md
b/airflow-core/src/airflow/ui/tests/e2e/README.md
index da7597ec716..6f28bafee48 100644
--- a/airflow-core/src/airflow/ui/tests/e2e/README.md
+++ b/airflow-core/src/airflow/ui/tests/e2e/README.md
@@ -142,6 +142,16 @@ Common options:
This framework uses the **Page Object Model (POM)** pattern. Each page's
elements and interactions are encapsulated in a page class.
+### When to write an E2E test
+
+E2E tests are slow and expensive to run. Before adding a new E2E test,
consider whether the behavior can be covered by a faster alternative:
+
+- **Prefer a Vitest unit test** for component logic, conditional rendering,
state transitions, and anything that can be tested with mocked data. See
`src/components/**/*.test.tsx` for examples.
+- **Prefer a Vitest integration test** (using React Testing Library) for
multi-component interactions, form submissions, and API-driven rendering that
doesn't require a real browser.
+- **Write an E2E test only when** the behavior requires a real browser and a
running Airflow backend — for example, full authentication flows, cross-page
navigation state, or interactions that depend on live scheduler/API behavior.
+
+When submitting a PR that adds new E2E coverage, briefly explain in the PR
description why the behavior cannot be covered at the unit or integration test
level.
+
### Steps to Add a New Test
1. **Create a page object** (if needed) in `pages/`