blob: 1ff750eb2ac17aace91d8c4eec112483e9aacd14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import FootnoteDefinitionWrapper from '~/content_editor/components/wrappers/footnote_definition.vue';
describe('content/components/wrappers/footnote_definition', () => {
let wrapper;
const createWrapper = async (node = {}) => {
wrapper = shallowMountExtended(FootnoteDefinitionWrapper, {
propsData: {
node,
},
});
};
afterEach(() => {
wrapper.destroy();
});
it('renders footnote label as a readyonly element', () => {
const label = 'footnote';
createWrapper({
attrs: {
label,
},
});
expect(wrapper.text()).toContain(label);
expect(wrapper.findByTestId('footnote-label').attributes().contenteditable).toBe('false');
});
});
|