701474acd5
WHAT: updated overview step of onboarding tour. It shows upload data methods instead of tour steps now WHY: new onboarding tour Change-Id: I7ffe9b2b91c2e17dd0c27e5e80a15301f6de16aa
34 lines
1021 B
TypeScript
34 lines
1021 B
TypeScript
// Copyright (C) 2020 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
import Vuex from 'vuex';
|
|
|
|
import OverviewStep from '@/components/onboardingTour/steps/OverviewStep.vue';
|
|
|
|
import { PaymentsHttpApi } from '@/api/payments';
|
|
import { router } from '@/router';
|
|
import { makePaymentsModule, PAYMENTS_MUTATIONS } from '@/store/modules/payments';
|
|
import { mount } from '@vue/test-utils';
|
|
|
|
const paymentsApi = new PaymentsHttpApi();
|
|
const paymentsModule = makePaymentsModule(paymentsApi);
|
|
|
|
const store = new Vuex.Store({ modules: { paymentsModule }});
|
|
|
|
describe('OverviewStep.vue', (): void => {
|
|
it('renders correctly', async (): Promise<void> => {
|
|
const wrapper = mount(OverviewStep, {
|
|
router,
|
|
store,
|
|
});
|
|
|
|
await store.commit(PAYMENTS_MUTATIONS.SET_PAYWALL_ENABLED_STATUS, true);
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
|
|
await store.commit(PAYMENTS_MUTATIONS.SET_PAYWALL_ENABLED_STATUS, false);
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
});
|