mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
follow @mattwr18 code review
This commit is contained in:
parent
1b127f1efb
commit
150d04080b
@ -310,6 +310,7 @@ $z-index-page-submenu: 2500;
|
|||||||
$z-index-page-header: 2000;
|
$z-index-page-header: 2000;
|
||||||
$z-index-page-sidebar: 1500;
|
$z-index-page-sidebar: 1500;
|
||||||
$z-index-sticky: 100;
|
$z-index-sticky: 100;
|
||||||
|
$z-index-post-card-link: 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @tokens Media Query
|
* @tokens Media Query
|
||||||
|
|||||||
@ -56,7 +56,7 @@ export default {
|
|||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
|
||||||
> .counter-icon {
|
> .counter-icon {
|
||||||
margin-right: 12px;
|
margin-right: $space-small;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -127,19 +127,19 @@ describe('FilterPosts.vue', () => {
|
|||||||
expect(spanishButton.attributes().class).toContain('--filled')
|
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)
|
getters['posts/filteredByUsersFollowed'] = jest.fn(() => true)
|
||||||
const wrapper = openFilterPosts()
|
const wrapper = openFilterPosts()
|
||||||
expect(
|
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)
|
).toBe(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('click "filter-by-followed-authors-only" button', () => {
|
describe('click "filter-by-followed" button', () => {
|
||||||
let wrapper
|
let wrapper
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
wrapper = openFilterPosts()
|
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', () => {
|
it('calls TOGGLE_FILTER_BY_FOLLOWED', () => {
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
<ds-flex-item width="100%">
|
<ds-flex-item width="100%">
|
||||||
<div class="follow-filter-button">
|
<div class="follow-filter-button">
|
||||||
<base-button
|
<base-button
|
||||||
name="filter-by-followed-authors-only"
|
data-test="filter-by-followed"
|
||||||
icon="user-plus"
|
icon="user-plus"
|
||||||
circle
|
circle
|
||||||
:filled="filteredByUsersFollowed"
|
:filled="filteredByUsersFollowed"
|
||||||
|
|||||||
@ -177,7 +177,7 @@ export default {
|
|||||||
|
|
||||||
.content-menu {
|
.content-menu {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 99;
|
z-index: $z-index-post-card-link;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-left: $space-xx-small;
|
margin-left: $space-xx-small;
|
||||||
margin-right: -$space-x-small;
|
margin-right: -$space-x-small;
|
||||||
|
|||||||
@ -61,7 +61,7 @@ export default {
|
|||||||
buttonClass() {
|
buttonClass() {
|
||||||
let buttonClass = 'base-button'
|
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.circle) buttonClass += ' --circle'
|
||||||
if (this.danger) buttonClass += ' --danger'
|
if (this.danger) buttonClass += ' --danger'
|
||||||
if (this.loading) buttonClass += ' --loading'
|
if (this.loading) buttonClass += ' --loading'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user