follow @mattwr18 code review

This commit is contained in:
Alina Beck 2020-01-15 11:55:27 +03:00
parent 1b127f1efb
commit 150d04080b
6 changed files with 9 additions and 8 deletions

View File

@ -310,6 +310,7 @@ $z-index-page-submenu: 2500;
$z-index-page-header: 2000;
$z-index-page-sidebar: 1500;
$z-index-sticky: 100;
$z-index-post-card-link: 5;
/**
* @tokens Media Query

View File

@ -56,7 +56,7 @@ export default {
margin-top: 0;
> .counter-icon {
margin-right: 12px;
margin-right: $space-small;
}
}
}

View File

@ -127,19 +127,19 @@ describe('FilterPosts.vue', () => {
expect(spanishButton.attributes().class).toContain('--filled')
})
it('sets "filter-by-followed-authors-only" button attribute `filled`', () => {
it('sets "filter-by-followed" button attribute `filled`', () => {
getters['posts/filteredByUsersFollowed'] = jest.fn(() => true)
const wrapper = openFilterPosts()
expect(
wrapper.find('.base-button[name="filter-by-followed-authors-only"]').classes('--filled'),
wrapper.find('.base-button[data-test="filter-by-followed"]').classes('--filled'),
).toBe(true)
})
describe('click "filter-by-followed-authors-only" button', () => {
describe('click "filter-by-followed" button', () => {
let wrapper
beforeEach(() => {
wrapper = openFilterPosts()
wrapper.find('.base-button[name="filter-by-followed-authors-only"]').trigger('click')
wrapper.find('.base-button[data-test="filter-by-followed"]').trigger('click')
})
it('calls TOGGLE_FILTER_BY_FOLLOWED', () => {

View File

@ -15,7 +15,7 @@
<ds-flex-item width="100%">
<div class="follow-filter-button">
<base-button
name="filter-by-followed-authors-only"
data-test="filter-by-followed"
icon="user-plus"
circle
:filled="filteredByUsersFollowed"

View File

@ -177,7 +177,7 @@ export default {
.content-menu {
position: relative;
z-index: 99;
z-index: $z-index-post-card-link;
display: inline-block;
margin-left: $space-xx-small;
margin-right: -$space-x-small;

View File

@ -61,7 +61,7 @@ export default {
buttonClass() {
let buttonClass = 'base-button'
if (this.$slots.default == null) buttonClass += ' --icon-only'
if (this.$slots.default === undefined) buttonClass += ' --icon-only'
if (this.circle) buttonClass += ' --circle'
if (this.danger) buttonClass += ' --danger'
if (this.loading) buttonClass += ' --loading'