storj/web/satellite/tests/unit/account/billing/HistoryDropdown.spec.ts
Vitalii Shpital b7a5b1f3ab web/satellites: fixes for new objects flow
Fixed issue with project selection for new objects flow.
Fixed issue with navigating from objects browser when upload is in progress.
Fixed command line solution link on Encryption passphrase step.
Renamed Objects nav route to be Buckets nav route.

Change-Id: I4d838854668d6c44491cfd83302ea705ef7c26bd
2021-11-17 11:31:50 +02:00

44 lines
1.3 KiB
TypeScript

// Copyright (C) 2020 Storj Labs, Inc.
// See LICENSE for copying information.
import HistoryDropdown from '@/components/account/billing/HistoryDropdown.vue';
import { RouteConfig } from '@/router';
import { createLocalVue, mount } from '@vue/test-utils';
const localVue = createLocalVue();
describe('HistoryDropdown', (): void => {
it('renders correctly if credit history', (): void => {
const creditsHistory: string = RouteConfig.Account.with(RouteConfig.CreditsHistory).path;
const wrapper = mount(HistoryDropdown, {
localVue,
propsData: {
label: 'Credits History',
route: creditsHistory,
},
directives: {
clickOutside: {},
},
});
expect(wrapper).toMatchSnapshot();
});
it('renders correctly if balance history', (): void => {
const balanceHistory: string = RouteConfig.Account.with(RouteConfig.DepositHistory).path;
const wrapper = mount(HistoryDropdown, {
localVue,
propsData: {
label: 'Balance History',
route: balanceHistory,
},
directives: {
clickOutside: {},
},
});
expect(wrapper).toMatchSnapshot();
});
});