test: added the IconRight props test

This commit is contained in:
Paul Valerie GOMA 2025-07-21 13:09:44 +02:00
parent 020ac1bc8d
commit 8e3e422d14

View File

@ -42,4 +42,17 @@ describe('VLink', () => {
expect(clickHandler).not.toHaveBeenCalled();
});
test('places icon on the right when `iconRight` is true', () => {
const wrapper = mount(VLink, {
props: {
label: 'link',
icon: "ri-external-link-line",
iconRight: true,
}
})
const icon = wrapper.find('.p-button-icon-right');
expect(icon.exists()).toBe(true);
expect(icon.classes()).toContain('ri-external-link-line');
})
})