Skip to content

Conversation

@rwood-moz
Copy link
Contributor

@rwood-moz rwood-moz commented Oct 24, 2025

Fixes #1202. Just add some starting vue.js UI component tests. These should be built out further over time.

@rwood-moz
Copy link
Contributor Author

Roberts-MacBook-Pro test % npm test components 
...
 Test Files  7 passed (7)
      Tests  22 passed (22)
   Start at  10:54:03
   Duration  1.35s (transform 556ms, setup 61ms, collect 4.22s, tests 222ms, environment 1.34s, prepare 236ms)

@rwood-moz rwood-moz force-pushed the testing/ui-component-tests branch from a9bcab2 to 9ead2b7 Compare October 28, 2025 14:55
@rwood-moz rwood-moz force-pushed the testing/ui-component-tests branch from 9ead2b7 to 47b63d1 Compare October 28, 2025 14:58
@rwood-moz rwood-moz changed the title WIP: Add some frontend vue.js component tests Add some frontend vue.js component tests Oct 28, 2025
@rwood-moz rwood-moz marked this pull request as ready for review October 28, 2025 15:00
Copy link
Contributor

@davinotdavid davinotdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it! Great work! 👏

Other than the inline comments I have two more questions / points:

  • I see that we have a package.json script for test but I just wanted to double check that it is already automagically picked up by our CI to be ran or if there's anything else needed there?

  • (Nit) The actual component file names are written as TabBar instead of tab-bar. I wonder if we should keep the file naming consistent here or is this a limitation of sorts for testing purposes?

Oh also there are some conflicts on the package-lock.json file to be resolved before merge!

@rwood-moz
Copy link
Contributor Author

Thanks for the review and input!

I see that we have a `package.json` script for `test` but I just wanted to double check that it is already automagically picked up by our CI to be ran or if there's anything else needed there?

Yes the tests that I am adding run with the other pre-existing frontend tests which already run in CI; the github validate frontend job does an npm install that uses the frontend/package.json which includes the test dependencies.

(Nit) The actual component file names are written as `TabBar` instead of `tab-bar`. I wonder if we should keep the file naming consistent here or is this a limitation of sorts for testing purposes?

Ah yes, I noticed that too but decided to keep the same naming format as the already existing tests in https://github.com/thunderbird/appointment/tree/main/frontend/test/stores, however I see the stores are actually named with store-name.ts so that's why. I'll change my new tests names to match the component TabBar format, makes sense.

Oh also there are some conflicts on the package-lock.json file to be resolved before merge!

Ok thanks I didn't see this locally but I'll have a look.

@rwood-moz
Copy link
Contributor Author

Thanks for the review @davinotdavid, updates are complete and ready for another review whenever you have some time.

Roberts-MacBook-Pro test % npm test components 
...
 Test Files  7 passed (7)
      Tests  22 passed (22)
   Start at  14:45:42
   Duration  1.43s (transform 580ms, setup 59ms, c

Copy link
Contributor

@davinotdavid davinotdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thank you so much for the research / investigations as well, TIL!

@rwood-moz rwood-moz merged commit 321ff9d into main Oct 28, 2025
8 checks passed
@rwood-moz rwood-moz deleted the testing/ui-component-tests branch October 28, 2025 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add some vue.js front-end UI component tests (and run in CI)

3 participants