Skip to content

Commit 5a5a5fa

Browse files
committed
fix: unit test
-e Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
1 parent 701bb8e commit 5a5a5fa

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

core/src/tests/components/AppMenu.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ async function openPopover(wrapper: ReturnType<typeof mount>) {
109109
}
110110

111111
describe('core: AppMenu', () => {
112-
it('renders one AppItem per app in the list', async () => {
112+
it('renders one AppItem per app in the list, plus the "App store" tile for non-admins', async () => {
113113
const wrapper = mount(AppMenu, { attachTo: document.body })
114114
await openPopover(wrapper)
115115

116116
const items = document.querySelectorAll('[role="menuitem"]')
117-
expect(items).toHaveLength(3)
117+
expect(items).toHaveLength(4)
118118
const labels = Array.from(items).map((el) => el.querySelector('.app-item__label')?.textContent?.trim() ?? '')
119-
expect(labels).toEqual(['Files', 'Mail', 'Calendar'])
119+
expect(labels).toEqual(['Files', 'Mail', 'Calendar', 'App store'])
120120
})
121121

122122
it('renders the "More apps" tile when the current user is an admin', async () => {

0 commit comments

Comments
 (0)