1import { mount } from '@vue/test-utils';
2import TableCellCount from '@/components/Global/TableCellCount';
3
4describe('TableCellCount.vue', () => {
5  const wrapper = mount(TableCellCount, {
6    propsData: {
7      filteredItemsCount: 5,
8      totalNumberOfCells: 100,
9    },
10    mocks: {
11      $t: (key) => key,
12    },
13  });
14  it('should exist', () => {
15    expect(wrapper.exists()).toBe(true);
16  });
17  it('should render filtered and totalnumber of items', () => {
18    expect(wrapper.text()).toContain('global.table.selectedItems');
19  });
20  it('should render only totalnumber of items', async () => {
21    await wrapper.setProps({ filteredItemsCount: 5, totalNumberOfCells: 5 });
22    expect(wrapper.text()).toContain('global.table.items');
23  });
24  it('should render correctly', () => {
25    expect(wrapper.element).toMatchSnapshot();
26  });
27});
28