mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 16:28:31 +00:00
Update the nuxt3 version. Co-authored-by: Jonathan Adeline <jonathan@baserow.io> Co-authored-by: Bram Wiepjes <bramw@protonmail.com> Co-authored-by: Cezary <cezary@baserow.io> Co-authored-by: Tsering Paljor <tsering@baserow.io> Co-authored-by: Przemyslaw Kukulski <przemyslaw+gh@baserow.io> Co-authored-by: Bram <bram2w@users.noreply.github.com>
35 lines
756 B
JavaScript
35 lines
756 B
JavaScript
import { mount } from '@vue/test-utils'
|
|
import Tab from '@baserow/modules/core/components/Tab'
|
|
|
|
describe('Tab.vue', () => {
|
|
it('renders the tab content when isActive is true', async () => {
|
|
const wrapper = await mount(Tab, {
|
|
data() {
|
|
return {
|
|
isActive: true,
|
|
}
|
|
},
|
|
slots: {
|
|
default: 'Test Content',
|
|
},
|
|
})
|
|
|
|
expect(wrapper.text()).toContain('Test Content')
|
|
})
|
|
|
|
it('does not render the tab content when isActive is false', async () => {
|
|
const wrapper = await mount(Tab, {
|
|
data() {
|
|
return {
|
|
isActive: false,
|
|
}
|
|
},
|
|
slots: {
|
|
default: 'Test Content',
|
|
},
|
|
})
|
|
|
|
expect(wrapper.text()).not.toContain('Test Content')
|
|
})
|
|
})
|