import { mount } from '@vue/test-utils';
import ApplicationCard from '@shell/components/cards/ApplicationCard.vue';
describe('component: ApplicationCard', () => {
const wrapper = mount(ApplicationCard, {
slots: {
cardIcon: '',
'top-left': '
Routes
',
}
});
it.each([
'cardIcon',
'top-left',
'top-right',
'resourcesCount',
])('should have a populated %p slot', (slot) => {
const content = 'text
';
const ele = mount(ApplicationCard, { slots: { [slot]: content } });
expect(ele.find(`[data-testid="${ slot }-section`).find('div').html()).toContain(content);
});
it('should have card-icon slot with an icon', () => {
expect(wrapper.find('[data-testid="cardIcon-section"]').find('i').classes()).toContain('icon-epinio');
});
});