Skip to content

Commit

Permalink
Fix TableList test
Browse files Browse the repository at this point in the history
  • Loading branch information
Bettelstab committed Jul 11, 2024
1 parent e08603f commit 1b6062d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions frontend/src/components/tablesDrawer/TableList.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,17 @@ describe('TableList', () => {
expect(wrapper.element).toMatchSnapshot()
})

it('renders list', () => {
expect(wrapper.find('.v-list--density-default').exists()).toBe(true)
})

it('sets active room', async () => {
const setActiveRoomSpy = vi.spyOn(useActiveRoomStore(), 'setActiveRoom')
await wrapper.find('.table').trigger('click')
await wrapper.find('.table .action').trigger('click')

expect(setActiveRoomSpy).toHaveBeenCalledWith(testTables[0].joinLink)
})

describe('when a table is clicked', () => {
beforeEach(async () => {
wrapper = Wrapper()
await wrapper.find('.table').trigger('click')
await wrapper.find('.table .action').trigger('click')
await flushPromises()
})

Expand Down

0 comments on commit 1b6062d

Please sign in to comment.