Skip to content

test(renderers/angular): add vitest browser testing#410

Closed
43081j wants to merge 2 commits intogoogle:mainfrom
43081j:angular-tests
Closed

test(renderers/angular): add vitest browser testing#410
43081j wants to merge 2 commits intogoogle:mainfrom
43081j:angular-tests

Conversation

@43081j
Copy link

@43081j 43081j commented Dec 30, 2025

There's no real test setup in the angular renderer project yet.

I was roaming around the codebase and figured I'd push this PR. It has the following:

  • Drop karma/jasmine
  • Switch to build:unit-test
  • Use chromium so component tests run in a real browser
  • Add missing rxjs dependency
  • add 2 basic test files

Note i haven't touched angular in a long time, so a bunch of the tests may not be best practice. If there are better ways to do any of this, do let me know so i can update and learn.

It seems like we should also have some shared test utils file somewhere for things like the mock theme. Where would be sensible to put that?

Similarly, this waitForSelector function is a shame. I needed it because the default catalog uses dynamic imports and whenStable isn't aware of these. whenStable completes long before the dynamic import, but i can't seem to find anything built-in we can wait for other than polling for the DOM.

If you planned on having a different test setup, feel free to throw this PR away! It has been good to learn the codebase either way.

@43081j 43081j changed the title test(renderers): add vitest browser testing test(renderers/angular): add vitest browser testing Dec 30, 2025
@github-project-automation github-project-automation bot moved this to Todo in A2UI Jan 20, 2026
@zeroasterisk
Copy link
Collaborator

Thanks for adding vitest browser testing to the Angular renderer, @43081j! Better testing infrastructure is always valuable. 🙏

The Angular renderer has been completely restructured with v0.9 work, and the test setup has been updated as part of #878 (Angular v0.9 Renderer). The @angular/build:unit-test builder is now in the config. Closing as superseded — your approach was right and it happened to land via a different PR!

@github-project-automation github-project-automation bot moved this from Todo to Done in A2UI Mar 19, 2026
@43081j 43081j deleted the angular-tests branch March 19, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants