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

Commits on Sep 19, 2023

  1. Dashboard.spec.js: remove unecessary and duplicate loggedInUser from …

    …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.
    BacLuc committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    a2a983a View commit details
    Browse the repository at this point in the history
  2. Dashboard.spec.js: fix $tc mock implementation

    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>
    BacLuc committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    6af8a06 View commit details
    Browse the repository at this point in the history
  3. Dashboard.spec.js: fix mock in createCampWithRole

    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)
    BacLuc committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    9dc24a2 View commit details
    Browse the repository at this point in the history