storj/web/satellite/tests/unit/ignore/common/VBar.spec.ts
NickolaiYurchenko 235e9be208 web/satellite: VBar, VBanner migrated to use composition api
composables folder created (same as react hooks) for functionality reusage;
related test moved to ignored folder;

Change-Id: I494aa27079aa5694bee7b18511eeadd56ced59e9
2022-12-14 11:21:11 +00:00

34 lines
822 B
TypeScript

// Copyright (C) 2020 Storj Labs, Inc.
// See LICENSE for copying information.
import { mount } from '@vue/test-utils';
import VBar from '@/components/common/VBar.vue';
describe('VBar.vue', () => {
it('renders correctly', () => {
const wrapper = mount(VBar, {
propsData: {
current: 500,
max: 1000,
},
});
expect(wrapper).toMatchSnapshot();
});
it('renders correctly if current > max', () => {
const wrapper = mount(VBar, {
propsData: {
current: 1000,
max: 500,
},
});
expect(wrapper).toMatchSnapshot();
const el = wrapper.find('.bar-container__fill').element as HTMLElement;
expect(el.style.width).toMatch('100%');
});
});