storj/web/satellite/tests/unit/project/summary/SummaryItem.spec.ts
VitaliiShpital 8499323ac5 web/satellite: project summary added to dashboard page
WHAT:
new project summary (details) section added to project dashboard page.
v1 shows team size, API keys amount, buckets amount, estimated charges for selected project for current month.

WHY:
redesign. Better user experience?

Change-Id: I31204a3e68db49486bad1e1a0eedd238eba6b84e
2020-09-29 11:16:50 +00:00

47 lines
1.2 KiB
TypeScript

// Copyright (C) 2020 Storj Labs, Inc.
// See LICENSE for copying information.
import SummaryItem from '@/components/project/summary/SummaryItem.vue';
import { createLocalVue, mount } from '@vue/test-utils';
const localVue = createLocalVue();
localVue.filter('centsToDollars', (cents: number): string => {
return `$${(cents / 100).toFixed(2)}`;
});
describe('SummaryItem.vue', (): void => {
it('renders correctly if not money', (): void => {
const wrapper = mount(SummaryItem, {
localVue,
propsData: {
backgroundColor: '#fff',
titleColor: '#1b2533',
valueColor: '#000',
title: 'test',
value: 100,
isMoney: false,
},
});
expect(wrapper).toMatchSnapshot();
});
it('renders correctly if money', (): void => {
const wrapper = mount(SummaryItem, {
localVue,
propsData: {
backgroundColor: '#fff',
titleColor: '#1b2533',
valueColor: '#000',
title: 'test',
value: 100,
isMoney: true,
},
});
expect(wrapper).toMatchSnapshot();
});
});