mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Merge pull request #6093 from Ocelot-Social-Community/5967-user-profil-show-more-following-user
fix(webapp): error in user profil on the 'show x more' button
This commit is contained in:
commit
dad1764a62
@ -74,7 +74,9 @@ describe('FollowList.vue', () => {
|
|||||||
|
|
||||||
expect(wrapper.vm.allConnectionsCount).toBe(user.followingCount)
|
expect(wrapper.vm.allConnectionsCount).toBe(user.followingCount)
|
||||||
expect(wrapper.findAll('.user-teaser')).toHaveLength(user.following.length)
|
expect(wrapper.findAll('.user-teaser')).toHaveLength(user.following.length)
|
||||||
expect(wrapper.emitted('fetchAllConnections')).toEqual([['following']])
|
expect(wrapper.emitted('fetchAllConnections')).toEqual([
|
||||||
|
['following', user.followingCount],
|
||||||
|
])
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -85,7 +87,9 @@ describe('FollowList.vue', () => {
|
|||||||
|
|
||||||
expect(wrapper.vm.allConnectionsCount).toBe(user.followedByCount)
|
expect(wrapper.vm.allConnectionsCount).toBe(user.followedByCount)
|
||||||
expect(wrapper.findAll('.user-teaser')).toHaveLength(user.followedBy.length)
|
expect(wrapper.findAll('.user-teaser')).toHaveLength(user.followedBy.length)
|
||||||
expect(wrapper.emitted('fetchAllConnections')).toEqual([['followedBy']])
|
expect(wrapper.emitted('fetchAllConnections')).toEqual([
|
||||||
|
['followedBy', user.followedByCount],
|
||||||
|
])
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
:allProfilesCount="allConnectionsCount"
|
:allProfilesCount="allConnectionsCount"
|
||||||
:profiles="connections"
|
:profiles="connections"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@fetchAllProfiles="$emit('fetchAllConnections', type)"
|
@fetchAllProfiles="$emit('fetchAllConnections', type, allConnectionsCount)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@ -384,9 +384,9 @@ export default {
|
|||||||
this.user.followedByCurrentUser = followedByCurrentUser
|
this.user.followedByCurrentUser = followedByCurrentUser
|
||||||
this.user.followedBy = followedBy
|
this.user.followedBy = followedBy
|
||||||
},
|
},
|
||||||
fetchAllConnections(type) {
|
fetchAllConnections(type, count) {
|
||||||
if (type === 'following') this.followingCount = Infinity
|
if (type === 'following') this.followingCount = count
|
||||||
if (type === 'followedBy') this.followedByCount = Infinity
|
if (type === 'followedBy') this.followedByCount = count
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
apollo: {
|
apollo: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user