2ec9de94ba
WHAT: 1. payment step added to overview screen 2. pricing modal added to payment screen 3. info bar with payment info added to be shown before adding first payment method 4. message on verifying coin payment transaction screen was updated 5. coin payment transaction checkout button added to verifying screen WHY: better User experience Change-Id: Ia3b12a3f7f6c874f19a9414b61afc6ba5a29970b
59 lines
1.8 KiB
TypeScript
59 lines
1.8 KiB
TypeScript
// Copyright (C) 2020 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
import ProgressBar from '@/components/onboardingTour/ProgressBar.vue';
|
|
|
|
import { mount } from '@vue/test-utils';
|
|
|
|
describe('ProgressBar.vue', () => {
|
|
it('renders correctly', (): void => {
|
|
const wrapper = mount(ProgressBar);
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
|
|
it('renders correctly if add payment step is completed', (): void => {
|
|
const wrapper = mount(ProgressBar, {
|
|
propsData: {
|
|
isAddPaymentStep: true,
|
|
},
|
|
});
|
|
|
|
expect(wrapper.findAll('.completed-step').length).toBe(1);
|
|
expect(wrapper.findAll('.completed-font-color').length).toBe(1);
|
|
});
|
|
|
|
it('renders correctly if create project step is completed', (): void => {
|
|
const wrapper = mount(ProgressBar, {
|
|
propsData: {
|
|
isCreateProjectStep: true,
|
|
},
|
|
});
|
|
|
|
expect(wrapper.findAll('.completed-step').length).toBe(3);
|
|
expect(wrapper.findAll('.completed-font-color').length).toBe(2);
|
|
});
|
|
|
|
it('renders correctly if create api key step is completed', (): void => {
|
|
const wrapper = mount(ProgressBar, {
|
|
propsData: {
|
|
isCreateApiKeyStep: true,
|
|
},
|
|
});
|
|
|
|
expect(wrapper.findAll('.completed-step').length).toBe(5);
|
|
expect(wrapper.findAll('.completed-font-color').length).toBe(3);
|
|
});
|
|
|
|
it('renders correctly if upload data step is completed', (): void => {
|
|
const wrapper = mount(ProgressBar, {
|
|
propsData: {
|
|
isUploadDataStep: true,
|
|
},
|
|
});
|
|
|
|
expect(wrapper.findAll('.completed-step').length).toBe(7);
|
|
expect(wrapper.findAll('.completed-font-color').length).toBe(4);
|
|
});
|
|
});
|