- fix tests
parent
fa844bda11
commit
8bfea139e4
|
@ -46,6 +46,18 @@ describe('Tag.vue', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('Tag.vue', () => {
|
||||||
|
it('should render default slot', () => {
|
||||||
|
const wrapper = mount(Tag, {
|
||||||
|
slots: {
|
||||||
|
default: h('i', { class: 'pi pi-discord' }, '')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(wrapper.html()).toBe('<span class="p-tag p-component" data-pc-name="tag" data-pc-section="root" pc5=""><!--v-if--><i class="pi pi-discord"></i></span>');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe('Tag.vue', () => {
|
describe('Tag.vue', () => {
|
||||||
it('should be rounded', () => {
|
it('should be rounded', () => {
|
||||||
const wrapper = mount(Tag, {
|
const wrapper = mount(Tag, {
|
||||||
|
@ -55,15 +67,3 @@ describe('Tag.vue', () => {
|
||||||
expect(wrapper.find('.p-tag-rounded').exists()).toBe(true);
|
expect(wrapper.find('.p-tag-rounded').exists()).toBe(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Tag.vue', () => {
|
|
||||||
it('should render default slot', () => {
|
|
||||||
const wrapper = mount(Tag, {
|
|
||||||
slots: {
|
|
||||||
default: h('i', { class: 'pi pi-discord' }, '')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(wrapper.html()).toBe('<span class="p-tag p-component" data-pc-name="tag" data-pc-section="root"><!--v-if--><i class="pi pi-discord"></i></span>');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ describe('Terminal.vue', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(wrapper.find('.p-terminal.p-component').exists()).toBe(true);
|
expect(wrapper.find('.p-terminal.p-component').exists()).toBe(true);
|
||||||
expect(wrapper.find('input.p-terminal-input').exists()).toBe(true);
|
expect(wrapper.find('input.p-terminal-prompt-value').exists()).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return invalid command', async () => {
|
it('should return invalid command', async () => {
|
||||||
|
@ -72,6 +72,6 @@ describe('Terminal.vue', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(wrapper.find('.p-terminal.p-component').exists()).toBe(true);
|
expect(wrapper.find('.p-terminal.p-component').exists()).toBe(true);
|
||||||
expect(wrapper.find('input.p-terminal-input').exists()).toBe(true);
|
expect(wrapper.find('input.p-terminal-prompt-value').exists()).toBe(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -83,7 +83,7 @@ describe('Toast.vue', () => {
|
||||||
messages: [{ severity: 'info', summary: 'Message 1', detail: 'Message 1 Content', life: 3000 }]
|
messages: [{ severity: 'info', summary: 'Message 1', detail: 'Message 1 Content', life: 3000 }]
|
||||||
});
|
});
|
||||||
|
|
||||||
const icon = wrapper.find('.p-toast-icon-close-icon');
|
const icon = wrapper.find('.p-toast-close-icon');
|
||||||
|
|
||||||
expect(icon.classes()).toContain('pi-discord');
|
expect(icon.classes()).toContain('pi-discord');
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,8 +13,8 @@ describe('ToggleSwitch.vue', () => {
|
||||||
expect(wrapper.emitted()['update:modelValue'][0]).toEqual([true]);
|
expect(wrapper.emitted()['update:modelValue'][0]).toEqual([true]);
|
||||||
|
|
||||||
await wrapper.setProps({ modelValue: true });
|
await wrapper.setProps({ modelValue: true });
|
||||||
|
//
|
||||||
expect(wrapper.vm.checked).toBe(true);
|
expect(wrapper.vm.checked).toBe(true);
|
||||||
expect(wrapper.find('.p-toggleswitch').classes()).toContain('p-highlight');
|
expect(wrapper.find('.p-toggleswitch').classes()).toContain('p-toggleswitch-checked');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue