test: Added disabled link and anchor tag test

This commit is contained in:
Paul Valerie GOMA 2025-07-21 12:44:38 +02:00
parent 13dd052554
commit 672e5ec36c

View File

@ -21,4 +21,16 @@ describe('VLink', () => {
expect(a.exists()).toBe(true);
expect(a.attributes('href')).toBe('https://example.com');
})
test('disables the link when `disabled` is true', () => {
const wrapper = mount(VLink, {
props: {label: 'Disabled', disabled: true }
})
const button = wrapper.find('.p-button');
expect(button.classes()).toContain('disabled');
expect(button.attributes('aria-disabled')).toBe('true');
});
})