replace last instance of ds-button with base-button

This commit is contained in:
Alina Beck 2020-01-15 16:13:47 +03:00
parent fcbe6125f3
commit eaf738c12b
4 changed files with 10 additions and 9 deletions

View File

@ -150,7 +150,7 @@ describe('FilterPosts.vue', () => {
describe('click on an "emotions-buttons" button', () => {
it('calls TOGGLE_EMOTION when clicked', () => {
const wrapper = openFilterPosts()
happyEmotionButton = wrapper.findAll('button.emotions-buttons').at(1)
happyEmotionButton = wrapper.findAll('.emotion-button .base-button').at(1)
happyEmotionButton.trigger('click')
expect(mutations['posts/TOGGLE_EMOTION']).toHaveBeenCalledWith({}, 'happy')
})
@ -158,7 +158,7 @@ describe('FilterPosts.vue', () => {
it('sets the attribute `src` to colorized image', () => {
getters['posts/filteredByEmotions'] = jest.fn(() => ['happy'])
const wrapper = openFilterPosts()
happyEmotionButton = wrapper.findAll('button.emotions-buttons').at(1)
happyEmotionButton = wrapper.findAll('.emotion-button .base-button').at(1)
const happyEmotionButtonImage = happyEmotionButton.find('img')
expect(happyEmotionButtonImage.attributes().src).toEqual('/img/svg/emoji/happy_color.svg')
})

View File

@ -32,7 +32,7 @@ describe('SearchableInput.vue', () => {
}
describe('mount', () => {
let select, dropdown
let select
beforeEach(() => {
select = wrapper.find('.ds-select')

View File

@ -1,9 +1,5 @@
<template>
<div
class="searchable-input"
aria-label="search"
role="search"
>
<div class="searchable-input" aria-label="search" role="search">
<ds-select
type="search"
icon="search"

View File

@ -12,7 +12,12 @@
>
<aside v-show="post.imageBlurred" class="blur-toggle">
<img v-show="blurred" :src="post.image | proxyApiUrl" class="preview" />
<ds-button :icon="blurred ? 'eye' : 'eye-slash'" primary @click="blurred = !blurred" />
<base-button
:icon="blurred ? 'eye' : 'eye-slash'"
filled
circle
@click="blurred = !blurred"
/>
</aside>
<hc-user :user="post.author" :date-time="post.createdAt">
<template v-slot:dateTime>