Skip to content

UI: Add unit tests for errorHandling helpers#64647

Closed
liamkernan wants to merge 4 commits intoapache:mainfrom
liamkernan:ui-add-error-handling-tests
Closed

UI: Add unit tests for errorHandling helpers#64647
liamkernan wants to merge 4 commits intoapache:mainfrom
liamkernan:ui-add-error-handling-tests

Conversation

@liamkernan
Copy link
Copy Markdown
Contributor

@liamkernan liamkernan commented Apr 2, 2026

Summary

Adds Vitest coverage for getErrorStatus and createErrorToaster in src/utils/errorHandling.ts, including the contract that 403 responses do not trigger the shared error toaster (handled by MutationCache).

Testing

npm exec vitest run src/utils/errorHandling.test.ts (from airflow-core/src/airflow/ui)


Was generative AI tooling used to co-author this PR?
  • No
  • Yes

Made with Cursor

Cover getErrorStatus and createErrorToaster behavior for 403 vs other errors.

Signed-off-by: Liam <liamkernan0@gmail.com>
@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Apr 2, 2026
Signed-off-by: Liam <liamkernan0@gmail.com>
@choo121600 choo121600 marked this pull request as draft April 3, 2026 12:37
@choo121600
Copy link
Copy Markdown
Member

@liamkernan This PR has been converted to draft because it does not yet meet our Pull Request quality criteria.

Issues found:

  • Pre-commit / static checks: Failing: CI image checks / Static checks. Run prek run --from-ref main locally to find and fix issues. See Pre-commit / static checks docs.
  • Other failing CI checks: Failing: Additional PROD image tests / Test e2e integration tests with PROD image / Regular e2e test. Run prek run --from-ref main locally to reproduce. See static checks docs.

What to do next:

  • The comment informs you what you need to do.
  • Fix each issue, then mark the PR as "Ready for review" in the GitHub UI - but only after making sure that all the issues are fixed.
  • There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates.
  • Maintainers will then proceed with a normal review.

Converting a PR to draft is not a rejection — it is an invitation to bring the PR up to the project's standards so that maintainer review time is spent productively. There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the Airflow Slack.

Keep the new errorHandling unit test passing local UI checks so the PR can move forward without pre-commit rewriting the file.

Made-with: Cursor
@liamkernan liamkernan marked this pull request as ready for review April 3, 2026 23:38
@potiuk potiuk closed this Apr 4, 2026
@potiuk
Copy link
Copy Markdown
Member

potiuk commented Apr 4, 2026

Please follow.our quality expectations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants