import { shallowMount } from '@vue/test-utils';
|
|
import { describe, expect, it, vi } from 'vitest';
|
|
import SourcePage from '../index.vue';
|
import pageSource from '../index.vue?raw';
|
|
vi.mock('../../fields/SourceWorkspace.vue', () => ({
|
default: {
|
name: 'SourceWorkspace',
|
template: '<div data-test="source-workspace" />',
|
},
|
}));
|
|
describe('eLN LIMS source page', () => {
|
it('hosts source maintenance in a standalone page workspace', () => {
|
const wrapper = shallowMount(SourcePage);
|
|
expect(pageSource).toContain('<div class="jnpf-content-wrapper">');
|
expect(wrapper.findComponent({ name: 'SourceWorkspace' }).exists()).toBe(true);
|
expect(wrapper.findComponent({ name: 'SourceWorkspace' }).props('fieldDataType')).toBeUndefined();
|
expect(pageSource).not.toContain('BasicModal');
|
expect(pageSource).not.toContain('BasicDrawer');
|
});
|
});
|