storj/web/satellite/tests/unit/common/VBar.spec.ts
VitaliiShpital 506582e208 web/satellite: project overview page removed, dashboard page implemented
Change-Id: Id56425fe38296250e5814a0f02a554cdd73b2330
2020-03-26 17:15:14 +00:00

32 lines
783 B
TypeScript

// Copyright (C) 2020 Storj Labs, Inc.
// See LICENSE for copying information.
import VBar from '@/components/common/VBar.vue';
import { mount } from '@vue/test-utils';
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();
expect(wrapper.find('.bar-container__fill').element.style.width).toMatch('100%');
});
});