Fix frontend after rebasing the backend

This commit is contained in:
Robert Schäfer 2019-06-05 18:46:07 +02:00
parent 16dc7328e7
commit 6bbaa78fa9
2 changed files with 4 additions and 4 deletions

View File

@ -36,9 +36,9 @@ describe('FilterMenu.vue', () => {
expect(wrapper.emitted('changeFilterBubble')).toBeTruthy()
})
it('toggles filterBubble.author.followed property', () => {
it('toggles filterBubble.author property', () => {
wrapper.find({ name: 'filter-by-followed-authors-only' }).trigger('click')
expect(wrapper.emitted('changeFilterBubble')[0]).toEqual([{ author: 'followed' }])
expect(wrapper.emitted('changeFilterBubble')[0]).toEqual([{ author: 'following' }])
wrapper.find({ name: 'filter-by-followed-authors-only' }).trigger('click')
expect(wrapper.emitted('changeFilterBubble')[1]).toEqual([{ author: 'all' }])
})

View File

@ -33,12 +33,12 @@ export default {
},
computed: {
onlyFollowed() {
return this.filterBubble.author === 'followed'
return this.filterBubble.author === 'following'
},
},
methods: {
toggleOnlyFollowed() {
this.filterBubble.author = this.onlyFollowed ? 'all' : 'followed'
this.filterBubble.author = this.onlyFollowed ? 'all' : 'following'
this.$emit('changeFilterBubble', this.filterBubble)
},
},