diff --git a/tests/unit/specs/pages/ProjectView.spec.js b/tests/unit/specs/pages/ProjectView.spec.js deleted file mode 100644 index a2088334a1..0000000000 --- a/tests/unit/specs/pages/ProjectView.spec.js +++ /dev/null @@ -1,53 +0,0 @@ -import { mount } from '@vue/test-utils' - -import CoreSetup from '~tests/unit/CoreSetup' -import ProjectView from '@/pages/ProjectView' - -describe('ProjectView.vue', () => { - let core - - beforeEach(() => { - core = CoreSetup.init() - .useAll() - .useRouter([ - { - name: 'project.view.insights', - path: '/insights' - }, - { - name: 'project.view.edit', - path: '/edit' - } - ]) - // Ensure the local-datashare project can be found - core.config.set('projects', [{ name: 'local-datashare', label: 'Default', sourcePath: '/' }]) - }) - - afterAll(() => { - vi.clearAllMocks() - }) - - it('contains an edit link in LOCAL mode', async () => { - core.config.set('mode', 'LOCAL') - const props = { name: 'local-datashare' } - const wrapper = mount(ProjectView, { global: { plugins: core.plugins }, props }) - await wrapper.vm.$nextTick() - expect(wrapper.find('.project-view__tab--edit').exists()).toBe(true) - }) - - it('contains an edit link in EMBEDDED mode', async () => { - core.config.set('mode', 'EMBEDDED') - const props = { name: 'local-datashare' } - const wrapper = mount(ProjectView, { global: { plugins: core.plugins }, props }) - await wrapper.vm.$nextTick() - expect(wrapper.find('.project-view__tab--edit').exists()).toBe(true) - }) - - it('not contains an edit link in SERVER mode', async () => { - core.config.set('mode', 'SERVER') - const props = { name: 'local-datashare' } - const wrapper = mount(ProjectView, { global: { plugins: core.plugins }, props }) - await wrapper.vm.$nextTick() - expect(wrapper.find('.project-view__tab--edit').exists()).toBe(false) - }) -}) diff --git a/tests/unit/specs/pages/UserHistory.spec.js b/tests/unit/specs/pages/UserHistory.spec.js index 4545241020..ec22493e84 100644 --- a/tests/unit/specs/pages/UserHistory.spec.js +++ b/tests/unit/specs/pages/UserHistory.spec.js @@ -32,13 +32,6 @@ describe('UserHistory.vue', () => { expect(wrapper.find('page-header-stub').exists()).toBeTruthy() }) - it('should load the document history page by default', async () => { - await core.router.replace({ name: 'user-history' }) - const wrapper = mount(UserHistory, { global: { plugins: core.plugins } }) - await flushPromises() - expect(wrapper.vm.$route.name).toBe('user-history.document.list') - }) - it('should call get user history when page is loaded', async () => { await core.router.replace({ name: 'user-history.document.list' }) shallowMount(UserHistory, { global: { plugins: core.plugins } })