This commit is contained in:
ogerly 2022-10-28 13:16:20 +02:00
parent c0bab3cd50
commit 2532dae733
2 changed files with 8 additions and 2 deletions

View File

@ -72,7 +72,9 @@ describe('CategoriesFilter.vue', () => {
describe('click on an "catetories-buttons" button', () => {
it('calls TOGGLE_CATEGORY when clicked', () => {
environmentAndNatureButton = wrapper.findAll('.categories-filter .item-category .base-button').at(0)
environmentAndNatureButton = wrapper
.findAll('.categories-filter .item-category .base-button')
.at(0)
environmentAndNatureButton.trigger('click')
expect(mutations['posts/TOGGLE_CATEGORY']).toHaveBeenCalledWith({}, 'cat4')
})

View File

@ -35,7 +35,11 @@ describe('FollowingFilter', () => {
it('sets "filter-by-followed" button attribute `filled`', () => {
getters['posts/filteredByUsersFollowed'] = jest.fn(() => true)
const wrapper = Wrapper()
expect(wrapper.find('.following-filter .filter-list .follower-item .base-button').classes('--filled')).toBe(true)
expect(
wrapper
.find('.following-filter .filter-list .follower-item .base-button')
.classes('--filled'),
).toBe(true)
})
describe('click "filter-by-followed" button', () => {