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

Test/mygallery component #69

Merged
merged 3 commits into from
Sep 6, 2024
Merged

Test/mygallery component #69

merged 3 commits into from
Sep 6, 2024

Conversation

capetillo
Copy link
Collaborator

TEST: MyGallery integration test

This test tests the way the component handles the api calls and how it handles the responses. I remount the component in every test so that there's no cross contamination between tests. In other words, to reset the state to a blank slate.
Here are the tests that I'm running

  • renders a loading indicator on mounted (not an api related test)
  • fetches thumbnails for each session on mount
  • renders sessions with thumbnails after loading
  • renders sessions in the correct descending order
  • does not render sessions without thumbnails

Copy link

@jnation3406 jnation3406 left a comment

Choose a reason for hiding this comment

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

Looks good! I feel like I understand component testing a bit more now.

package.json Outdated
@@ -15,9 +15,11 @@
"@fortawesome/free-solid-svg-icons": "^6.5.2",
"@fortawesome/pro-regular-svg-icons": "^6.6.0",
"@fortawesome/vue-fontawesome": "^3.0.6",
"@vitejs/plugin-vue": "^5.1.2",

Choose a reason for hiding this comment

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

should this be a dev dependency?

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, probably should be

src/components/Images/MyGallery.vue Outdated Show resolved Hide resolved
src/tests/integration/components/myGallery.test.js Outdated Show resolved Hide resolved
@capetillo capetillo requested a review from jnation3406 August 30, 2024 18:03
package.json Outdated
@@ -15,9 +15,11 @@
"@fortawesome/free-solid-svg-icons": "^6.5.2",
"@fortawesome/pro-regular-svg-icons": "^6.6.0",
"@fortawesome/vue-fontawesome": "^3.0.6",
"@vitejs/plugin-vue": "^5.1.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, probably should be

@capetillo capetillo merged commit 1e31795 into main Sep 6, 2024
1 check passed
@capetillo capetillo deleted the test/mygallery-component branch September 17, 2024 17:15
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.

3 participants