-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5286 from nextcloud-libraries/fix/app-nav-spacer
- Loading branch information
Showing
4 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
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) => h(NcAppNavigation, { | ||
scopedSlots: { | ||
list: () => [ | ||
h(NcAppNavigationItem, { props: { name: 'First' } }), | ||
h(NcAppNavigationSpacer), | ||
h(NcAppNavigationItem, { props: { 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()!) | ||
}) | ||
}) | ||
}) | ||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,6 @@ export default { | |
<style scoped> | ||
.app-navigation-spacer { | ||
flex-shrink: 0; | ||
order: 1; | ||
height: 22px; | ||
} | ||
|
||
|