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

Frontend: fix vitest warnings #3812

Merged
merged 3 commits into from
Sep 23, 2023
Merged

Conversation

BacLuc
Copy link
Contributor

@BacLuc BacLuc commented Sep 19, 2023

These were introduced before the switch to vitest, and not fixed in #3268.

…mocked vue data

This fixes
stderr | src/views/camp/__tests__/Dashboard.spec.js > Dashboard view > Renders View
[Vue warn]: The computed property "loggedInUser" is already defined in data.
This fixes the following warnings:
[Vue warn]: Invalid prop: type check failed for prop "label". Expected String, got Undefined
found in
---> <BooleanFilter>
       <ContentCard>
         <Dashboard> at /home/lucius/projects/ecamp/ecamp3/main/frontend/src/views/camp/Dashboard.vue
           <Root>
[Vue warn]: Invalid prop: type check failed for prop "label". Expected String, got Undefined
found in
---> <SelectFilter>
       <ContentCard>
         <Dashboard> at /home/lucius/projects/ecamp/ecamp3/main/frontend/src/views/camp/Dashboard.vue
           <Root>
[Vue warn]: Invalid prop: type check failed for prop "label". Expected String, got Undefined
found in
---> <SelectFilter>
       <ContentCard>
         <Dashboard> at /home/lucius/projects/ecamp/ecamp3/main/frontend/src/views/camp/Dashboard.vue
           <Root>
[Vue warn]: Invalid prop: type check failed for prop "label". Expected String, got Undefined
found in
---> <SelectFilter>
       <ContentCard>
         <Dashboard> at /home/lucius/projects/ecamp/ecamp3/main/frontend/src/views/camp/Dashboard.vue
           <Root>
This fixes the warnings happening in querySyncHelper.js:
[Vue warn]: Error in mounted hook (Promise/async): "TypeError: Cannot read properties of undefined (reading 'allItems')"

found in

---> <Dashboard> at /home/lucius/projects/ecamp/ecamp3/main/frontend/src/views/camp/Dashboard.vue
       <Root>
TypeError: Cannot read properties of undefined (reading 'allItems')
    at /home/lucius/projects/ecamp/ecamp3/main/frontend/src/helpers/querySyncHelper.js:146:37
    at Array.map (<anonymous>)
    at Module.loadAndProcessCollections (/home/lucius/projects/ecamp/ecamp3/main/frontend/src/helpers/querySyncHelper.js:146:6)
    at VueComponent.mounted (/home/lucius/projects/ecamp/ecamp3/main/frontend/src/views/camp/Dashboard.vue:373:1)
Copy link
Member

@carlobeltrame carlobeltrame left a comment

Choose a reason for hiding this comment

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

Thanks!

@usu usu added this pull request to the merge queue Sep 23, 2023
Merged via the queue into ecamp:devel with commit f90e05d Sep 23, 2023
22 checks passed
@BacLuc BacLuc deleted the frontend-fix-vitest-warnings branch September 23, 2023 10:21
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