diff --git a/test/VButton.spec.ts b/test/VButton.spec.ts index 425b83c..2f6208c 100644 --- a/test/VButton.spec.ts +++ b/test/VButton.spec.ts @@ -92,4 +92,45 @@ describe('VButton', () => { // check that the onClck function hasn't been called expect(onClick).not.toHaveBeenCalled() }) + + test('small button', () => { + const wrapper = mount(VButton, { + props: { + title: 'button', + label: 'label', + size: 'sm' + } + }) + const button = wrapper.find('button') + expect(button.classes()).toContain('p-button-sm') + expect(button.classes()).not.toContain('p-button-lg') + expect(button.classes().some(c => c.includes('text-body-SM'))).toBe(true) + }) + + test('large button', () => { + const wrapper = mount(VButton, { + props: { + title: 'button', + label: 'label', + size: 'lg' + } + }) + const button = wrapper.find('button') + expect(button.classes()).toContain('p-button-lg') + expect(button.classes()).not.toContain('p-button-sm') + expect(button.classes().some(c => c.includes('text-body-LG'))).toBe(true) + }) + + test('medium button', () => { + const wrapper = mount(VButton, { + props: { + title: 'button', + label: 'label', + } + }) + const button = wrapper.find('button') + expect(button.classes()).not.toContain('p-button-lg') + expect(button.classes()).not.toContain('p-button-sm') + expect(button.classes().some(c => c.includes('text-body-MD'))).toBe(true) + }) })