mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix tests in webapp
This commit is contained in:
parent
f534d1cd40
commit
5a9d9f9da8
@ -1,9 +1,12 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import { config, mount } from '@vue/test-utils'
|
||||
import GroupContentMenu from './GroupContentMenu.vue'
|
||||
|
||||
const localVue = global.localVue
|
||||
|
||||
config.stubs['router-link'] = '<span><slot /></span>'
|
||||
|
||||
const propsData = {
|
||||
usage: 'groupTeaser',
|
||||
resource: {},
|
||||
group: {},
|
||||
resourceType: 'group',
|
||||
@ -29,7 +32,7 @@ describe('GroupContentMenu', () => {
|
||||
})
|
||||
|
||||
it('renders', () => {
|
||||
expect(wrapper.findAll('.group-menu')).toHaveLength(1)
|
||||
expect(wrapper.findAll('.group-content-menu')).toHaveLength(1)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -6,7 +6,7 @@ const localVue = global.localVue
|
||||
localVue.filter('date', (d) => d)
|
||||
|
||||
config.stubs['client-only'] = '<span><slot /></span>'
|
||||
// config.stubs['v-popover'] = '<span><slot /></span>'
|
||||
config.stubs['v-popover'] = '<span><slot /></span>'
|
||||
config.stubs['nuxt-link'] = '<span><slot /></span>'
|
||||
// config.stubs['infinite-loading'] = '<span><slot /></span>'
|
||||
// config.stubs['follow-list'] = '<span><slot /></span>'
|
||||
@ -237,6 +237,10 @@ describe('GroupProfileSlug', () => {
|
||||
expect(wrapper.find('.profile-avatar').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('has GroupContentMenu', () => {
|
||||
expect(wrapper.find('.group-content-menu').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('has group slug', () => {
|
||||
expect(wrapper.find('[data-test="at"]').exists()).toBe(true)
|
||||
expect(wrapper.text()).toContain('yoga-practice')
|
||||
@ -385,6 +389,10 @@ describe('GroupProfileSlug', () => {
|
||||
expect(wrapper.find('.profile-avatar').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('has not(!) GroupContentMenu', () => {
|
||||
expect(wrapper.find('.group-content-menu').exists()).toBe(false)
|
||||
})
|
||||
|
||||
it('has group slug', () => {
|
||||
expect(wrapper.find('[data-test="at"]').exists()).toBe(true)
|
||||
expect(wrapper.text()).toContain('yoga-practice')
|
||||
@ -493,6 +501,10 @@ describe('GroupProfileSlug', () => {
|
||||
expect(wrapper.find('.profile-avatar').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('has not(!) GroupContentMenu', () => {
|
||||
expect(wrapper.find('.group-content-menu').exists()).toBe(false)
|
||||
})
|
||||
|
||||
it('has group slug', () => {
|
||||
expect(wrapper.find('[data-test="at"]').exists()).toBe(true)
|
||||
expect(wrapper.text()).toContain('yoga-practice')
|
||||
@ -601,6 +613,10 @@ describe('GroupProfileSlug', () => {
|
||||
expect(wrapper.find('.profile-avatar').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('has not(!) GroupContentMenu', () => {
|
||||
expect(wrapper.find('.group-content-menu').exists()).toBe(false)
|
||||
})
|
||||
|
||||
it('has group slug', () => {
|
||||
expect(wrapper.find('[data-test="at"]').exists()).toBe(true)
|
||||
expect(wrapper.text()).toContain('yoga-practice')
|
||||
@ -713,6 +729,10 @@ describe('GroupProfileSlug', () => {
|
||||
expect(wrapper.find('.profile-avatar').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('has GroupContentMenu', () => {
|
||||
expect(wrapper.find('.group-content-menu').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('has group slug', () => {
|
||||
expect(wrapper.find('[data-test="at"]').exists()).toBe(true)
|
||||
expect(wrapper.text()).toContain('school-for-citizens')
|
||||
@ -825,6 +845,10 @@ describe('GroupProfileSlug', () => {
|
||||
expect(wrapper.find('.profile-avatar').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('has not(!) GroupContentMenu', () => {
|
||||
expect(wrapper.find('.group-content-menu').exists()).toBe(false)
|
||||
})
|
||||
|
||||
it('has group slug', () => {
|
||||
expect(wrapper.find('[data-test="at"]').exists()).toBe(true)
|
||||
expect(wrapper.text()).toContain('school-for-citizens')
|
||||
@ -937,6 +961,10 @@ describe('GroupProfileSlug', () => {
|
||||
expect(wrapper.find('.profile-avatar').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('has not(!) GroupContentMenu', () => {
|
||||
expect(wrapper.find('.group-content-menu').exists()).toBe(false)
|
||||
})
|
||||
|
||||
it('has group slug', () => {
|
||||
expect(wrapper.find('[data-test="at"]').exists()).toBe(true)
|
||||
expect(wrapper.text()).toContain('school-for-citizens')
|
||||
@ -1049,6 +1077,10 @@ describe('GroupProfileSlug', () => {
|
||||
expect(wrapper.find('.profile-avatar').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('has not(!) GroupContentMenu', () => {
|
||||
expect(wrapper.find('.group-content-menu').exists()).toBe(false)
|
||||
})
|
||||
|
||||
it('has group slug', () => {
|
||||
expect(wrapper.find('[data-test="at"]').exists()).toBe(true)
|
||||
expect(wrapper.text()).toContain('school-for-citizens')
|
||||
@ -1165,6 +1197,10 @@ describe('GroupProfileSlug', () => {
|
||||
expect(wrapper.find('.profile-avatar').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('has GroupContentMenu', () => {
|
||||
expect(wrapper.find('.group-content-menu').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('has group slug', () => {
|
||||
expect(wrapper.find('[data-test="at"]').exists()).toBe(true)
|
||||
expect(wrapper.text()).toContain('investigative-journalism')
|
||||
@ -1280,6 +1316,10 @@ describe('GroupProfileSlug', () => {
|
||||
expect(wrapper.find('.profile-avatar').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('has not(!) GroupContentMenu', () => {
|
||||
expect(wrapper.find('.group-content-menu').exists()).toBe(false)
|
||||
})
|
||||
|
||||
it('has group slug', () => {
|
||||
expect(wrapper.find('[data-test="at"]').exists()).toBe(true)
|
||||
expect(wrapper.text()).toContain('investigative-journalism')
|
||||
@ -1395,6 +1435,10 @@ describe('GroupProfileSlug', () => {
|
||||
expect(wrapper.find('.profile-avatar').exists()).toBe(false)
|
||||
})
|
||||
|
||||
it('has not(!) GroupContentMenu', () => {
|
||||
expect(wrapper.find('.group-content-menu').exists()).toBe(false)
|
||||
})
|
||||
|
||||
it('has no(!) group slug', () => {
|
||||
expect(wrapper.find('[data-test="at"]').exists()).toBe(false)
|
||||
expect(wrapper.text()).not.toContain('investigative-journalism')
|
||||
@ -1498,6 +1542,10 @@ describe('GroupProfileSlug', () => {
|
||||
expect(wrapper.find('.profile-avatar').exists()).toBe(false)
|
||||
})
|
||||
|
||||
it('has not(!) GroupContentMenu', () => {
|
||||
expect(wrapper.find('.group-content-menu').exists()).toBe(false)
|
||||
})
|
||||
|
||||
it('has no(!) group slug', () => {
|
||||
expect(wrapper.find('[data-test="at"]').exists()).toBe(false)
|
||||
expect(wrapper.text()).not.toContain('investigative-journalism')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user