Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Component / Composable testing #1015

Merged
merged 13 commits into from
Nov 23, 2024

Conversation

cquinn540
Copy link
Contributor

Contributor checklist


Description

This adds some happy path tests for a composable for fetching images based on the color mode and the sign-in flow.

This also solves some issues where Nuxt plugins don't work in a vitest environment by default, so I have re-injected them into the vitest environment and mocked them where necessary.

Currently there is a limitation with Nuxt's endpoint mocking that you cannot change the status code, preventing me from testing errors. I think I can set up a test server to get around that, but I think that would make this pull request too big, and would be good as a separate issue.

Related issue

Copy link

netlify bot commented Nov 20, 2024

Deploy Preview for activist-org ready!

Name Link
🔨 Latest commit 1c8580c
🔍 Latest deploy log https://app.netlify.com/sites/activist-org/deploys/674216f4eba1a10008c84592
😎 Deploy Preview https://deploy-preview-1015--activist-org.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

github-actions bot commented Nov 20, 2024

Thank you for the pull request!

The activist team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and Development rooms once you're in. Also consider joining our bi-weekly Saturday dev syncs. It'd be great to have you!

Maintainer checklist

  • The TypeScript and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The Playwright end to end and Zap penetration tests have been ran and are passing (if necessary)

  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

@andrewtavis andrewtavis self-requested a review November 20, 2024 19:07
@cquinn540
Copy link
Contributor Author

I noticed the Organizations page doesn't seem to be working for me. I'm not sure if I broke it, my computer is just slow, or it got broken in main.

Let me know if you want to get on a call tomorrow or sometime soon to see what is happening

Copy link
Member

@andrewtavis andrewtavis left a comment

Choose a reason for hiding this comment

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

All's working great, @cquinn540! Thanks so much for getting us started with component testing! 🚀 Really is amazing to finally see this up and running 😊

@andrewtavis andrewtavis merged commit 75d9188 into activist-org:main Nov 23, 2024
6 checks passed
@cquinn540 cquinn540 deleted the component-testing branch November 24, 2024 01:25
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.

2 participants