Skip to content

Add Angular explorer integration tests#1380

Open
josemontespg wants to merge 4 commits intogoogle:mainfrom
josemontespg:fix-angular-modal
Open

Add Angular explorer integration tests#1380
josemontespg wants to merge 4 commits intogoogle:mainfrom
josemontespg:fix-angular-modal

Conversation

@josemontespg
Copy link
Copy Markdown
Collaborator

@josemontespg josemontespg commented May 8, 2026

This PR adds a new suite of integration tests for the Angular explorer, exercising the full pipeline from a JSON A2UI payload to the rendered DOM.

Also, added these tests to the CI, to run automatically on every commit.

What

These tests act as integration tests that verify all the code between a JSON A2UI payload and the rendered DOM.
This includes core_web, angular renderer, and the explorer demo app.
The tests use standard DOM queries to check expectations, which is more likely to be stable over time than screenshot/golden tests. Some tests are interactive, and click buttons, type on input boxes, open modals, etc.

Why

The motivation for these tests is http://b/511068435#comment3 because we were missing a test for the modal component. I found that we were missing tests for the explorer app, which is already a great sample app to exercise many different features and edge cases.

gemini-code-assist[bot]

This comment was marked as outdated.

@josemontespg josemontespg changed the title Fix Angular Modal dismiss button and add sample Create Modal Sample for Basic Catalog May 8, 2026
@josemontespg josemontespg changed the title Create Modal Sample for Basic Catalog Refactor and expand Angular explorer tests, optimize runtime May 9, 2026
@josemontespg josemontespg changed the title Refactor and expand Angular explorer tests, optimize runtime Add Angular explorer integration tests and optimize runtime May 9, 2026
@josemontespg josemontespg force-pushed the fix-angular-modal branch 3 times, most recently from 5c0337d to 6426455 Compare May 9, 2026 01:37
@josemontespg josemontespg changed the title Add Angular explorer integration tests and optimize runtime Add Angular explorer integration tests May 9, 2026
This PR adds a new suite of integration tests for the Angular explorer, exercising the full pipeline from a JSON A2UI payload to the rendered DOM.

These tests act as integration tests that verify all the code between a JSON A2UI payload and the rendered DOM. They use standard DOM queries to check expectations, which is more likely to be stable over time than screenshot/golden tests.

- **Split `it` blocks**: Used one `it` block per button or logical check for better granularity and isolation.
- **Removed redundant comments**: Cleaned up comments that merely repeated the `it` block description.
- **Removed `any`**: Applied a safer DOM querying pattern and removed `any` types from tests.
- **Added `wait` util**: Introduced a centralized `wait` helper in `test_utils.ts`.
- **Expanded coverage**: Added tests for tab switching in `recipe-card`, two-way binding in `live-invitation-builder`, and field validation in `advanced-form-validator`.
- **Optimized runtime**: Reduced fixed wait times in `loadExample` and specific tests, resulting in a ~4x speedup (from ~18s to ~10s).

TAG=agy
CONV=bcb155b6-386a-44b8-a05a-82139bb0fdc6
@josemontespg josemontespg requested review from andrewkolos and ditman May 9, 2026 01:54
@josemontespg josemontespg marked this pull request as ready for review May 9, 2026 01:54
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@josemontespg josemontespg enabled auto-merge (squash) May 9, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant