Add Angular explorer integration tests#1380
Open
josemontespg wants to merge 4 commits intogoogle:mainfrom
Open
Add Angular explorer integration tests#1380josemontespg wants to merge 4 commits intogoogle:mainfrom
josemontespg wants to merge 4 commits intogoogle:mainfrom
Conversation
5c0337d to
6426455
Compare
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
6426455 to
6e5e14f
Compare
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.