storj/web/satellite/tests/unit/project/usage/UsageArea.spec.ts
Vitalii Shpital ed28fa3ff9 web/satellite: added loaders across all the UI. Removed most of the requests from initial load
Added loader spinners across all of the UI to be visible while data is being fetched.
Removed most of the requests from the initial load of the satellite dashboard.
Removed useless requests after creating of new projects.
This should make user's experience much more better since load time of the app is much lower than it was before.

Change-Id: Ib0941ad4eee6b3caf781d132062b55cb17703fe7
2021-06-10 15:16:52 +00:00

40 lines
1.1 KiB
TypeScript

// Copyright (C) 2020 Storj Labs, Inc.
// See LICENSE for copying information.
import UsageArea from '@/components/project/usage/UsageArea.vue';
import { createLocalVue, shallowMount } from '@vue/test-utils';
const localVue = createLocalVue();
describe('UsageArea.vue', () => {
it('renders correctly', (): void => {
const wrapper = shallowMount(UsageArea, {
localVue,
propsData: {
title: 'test Title',
used: 500000000,
limit: 1000000000,
isDataFetching: false,
},
});
expect(wrapper).toMatchSnapshot();
});
it('renders correctly if used > limit', (): void => {
const wrapper = shallowMount(UsageArea, {
localVue,
propsData: {
title: 'test Title',
used: 1000000000,
limit: 500000000,
isDataFetching: false,
},
});
expect(wrapper).toMatchSnapshot();
expect(wrapper.find('.usage-area__remaining').text()).toMatch('0 Bytes Remaining');
});
});