fix(NcAppNavigationSpacer): Adjust order to make the spacer work again
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Родитель
6b7fc711a9
Коммит
cef2ee4811
|
@ -0,0 +1,26 @@
|
|||
import { h } from 'vue'
|
||||
|
||||
import NcAppNavigation from '../../src/components/NcAppNavigation/NcAppNavigation.vue'
|
||||
import NcAppNavigationItem from '../../src/components/NcAppNavigationItem/NcAppNavigationItem.vue'
|
||||
import NcAppNavigationSpacer from '../../src/components/NcAppNavigationSpacer/NcAppNavigationSpacer.vue'
|
||||
|
||||
describe('NcAppNavigationSpacer', () => {
|
||||
it('works', () => {
|
||||
cy.mount({
|
||||
render: () => h(NcAppNavigation, null, {
|
||||
list: () => [
|
||||
h(NcAppNavigationItem, { name: 'First' }),
|
||||
h(NcAppNavigationSpacer),
|
||||
h(NcAppNavigationItem, { name: 'Second' }),
|
||||
],
|
||||
}),
|
||||
})
|
||||
|
||||
cy.contains('li', 'First').should('exist').then(($first) => {
|
||||
cy.contains('li', 'Second').should('exist').then(($second) => {
|
||||
// Check that the second element is at least 22px below the first one (thats our spacer)
|
||||
expect($second.offset()!.top - 22).gte($first.offset()!.top + $first.height()!)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
|
@ -32,7 +32,6 @@ export default {
|
|||
<style scoped>
|
||||
.app-navigation-spacer {
|
||||
flex-shrink: 0;
|
||||
order: 1;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче