web/satellite: node packages updated
WHAT: node packages updated to be up to date Change-Id: Ic5a44c548562f16b23da59d3c39c4634572f7b35
This commit is contained in:
parent
d199daa907
commit
3bbf08917c
8243
web/satellite/package-lock.json
generated
8243
web/satellite/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -10,51 +10,53 @@
|
||||
"dev": "vue-cli-service build --mode development"
|
||||
},
|
||||
"dependencies": {
|
||||
"apollo-cache-inmemory": "1.6.5",
|
||||
"apollo-client": "2.6.8",
|
||||
"apollo-link": "1.2.13",
|
||||
"apollo-link-context": "1.0.19",
|
||||
"apollo-link-error": "1.1.12",
|
||||
"apollo-link-http": "1.5.16",
|
||||
"graphql": "14.5.8",
|
||||
"graphql-tag": "2.10.1",
|
||||
"apollo-cache-inmemory": "1.6.6",
|
||||
"apollo-client": "2.6.10",
|
||||
"apollo-link": "1.2.14",
|
||||
"apollo-link-context": "1.0.20",
|
||||
"apollo-link-error": "1.1.13",
|
||||
"apollo-link-http": "1.5.17",
|
||||
"graphql": "15.3.0",
|
||||
"graphql-tag": "2.11.0",
|
||||
"load-script": "1.0.0",
|
||||
"stripe": "7.14.0",
|
||||
"vue": "2.6.11",
|
||||
"stripe": "8.96.0",
|
||||
"vue": "2.6.12",
|
||||
"vue-class-component": "7.2.5",
|
||||
"vue-clipboard2": "0.3.1",
|
||||
"vue-property-decorator": "8.3.0",
|
||||
"vue-router": "3.1.3",
|
||||
"vuex": "3.1.2"
|
||||
"vue-property-decorator": "9.0.0",
|
||||
"vue-router": "3.4.3",
|
||||
"vuex": "3.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.7.7",
|
||||
"@babel/plugin-proposal-object-rest-spread": "7.7.7",
|
||||
"@babel/core": "7.11.6",
|
||||
"@babel/plugin-proposal-object-rest-spread": "7.11.0",
|
||||
"@types/segment-analytics": "0.0.32",
|
||||
"@vue/cli-plugin-babel": "4.1.1",
|
||||
"@vue/cli-plugin-typescript": "4.1.1",
|
||||
"@vue/cli-plugin-unit-jest": "4.1.1",
|
||||
"@vue/cli-service": "4.1.1",
|
||||
"@vue/test-utils": "1.0.0-beta.30",
|
||||
"@types/node": "13.11.1",
|
||||
"@vue/cli-plugin-babel": "4.5.6",
|
||||
"@vue/cli-plugin-typescript": "4.5.6",
|
||||
"@vue/cli-plugin-unit-jest": "4.5.6",
|
||||
"@vue/cli-service": "4.5.6",
|
||||
"@vue/test-utils": "1.1.0",
|
||||
"babel-core": "7.0.0-bridge.0",
|
||||
"compression-webpack-plugin": "3.0.1",
|
||||
"jest-fetch-mock": "3.0.0",
|
||||
"node-sass": "4.13.1",
|
||||
"sass-loader": "8.0.0",
|
||||
"sinon": "7.5.0",
|
||||
"stylelint": "12.0.1",
|
||||
"stylelint-config-standard": "19.0.0",
|
||||
"stylelint-scss": "3.13.0",
|
||||
"stylelint-webpack-plugin": "1.1.2",
|
||||
"ts-jest": "24.2.0",
|
||||
"tslint": "5.20.1",
|
||||
"compression-webpack-plugin": "6.0.0",
|
||||
"jest-fetch-mock": "3.0.3",
|
||||
"node-sass": "4.14.1",
|
||||
"sass-loader": "10.0.2",
|
||||
"sinon": "9.0.3",
|
||||
"stylelint": "13.7.1",
|
||||
"stylelint-config-standard": "20.0.0",
|
||||
"stylelint-scss": "3.18.0",
|
||||
"stylelint-webpack-plugin": "2.1.0",
|
||||
"ts-jest": "26.3.0",
|
||||
"tslint": "6.1.3",
|
||||
"tslint-consistent-codestyle": "1.16.0",
|
||||
"tslint-loader": "3.5.4",
|
||||
"typescript": "3.7.4",
|
||||
"vue-svg-loader": "0.15.0",
|
||||
"vue-template-compiler": "2.6.11",
|
||||
"typescript": "4.0.2",
|
||||
"vue-svg-loader": "0.16.0",
|
||||
"vue-template-compiler": "2.6.12",
|
||||
"vue-tslint": "0.3.2",
|
||||
"vue-tslint-loader": "3.5.6",
|
||||
"webpack": "4.41.5"
|
||||
"webpack": "4.44.1"
|
||||
},
|
||||
"postcss": {
|
||||
"plugins": {
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<template>
|
||||
<div class="history-area">
|
||||
<div class="history-area__back-area" @click="onBackToBillingClick">
|
||||
<div class="history-area__back-area" @click.stop="onBackToBillingClick">
|
||||
<BackImage/>
|
||||
<p class="history-area__back-area__title">Back to Billing</p>
|
||||
</div>
|
||||
|
@ -137,7 +137,7 @@ export default class PeriodSelection extends Vue {
|
||||
/**
|
||||
* Sets billing state to previous billing period.
|
||||
*/
|
||||
private async onPreviousPeriodClick(): Promise<void> {
|
||||
public async onPreviousPeriodClick(): Promise<void> {
|
||||
try {
|
||||
await this.$store.dispatch(PAYMENTS_ACTIONS.GET_PROJECT_USAGE_AND_CHARGES_PREVIOUS_ROLLUP);
|
||||
this.$segment.track(SegmentEvent.REPORT_VIEWED, {
|
||||
@ -153,7 +153,7 @@ export default class PeriodSelection extends Vue {
|
||||
/**
|
||||
* Sets billing state to current billing period.
|
||||
*/
|
||||
private async onCurrentPeriodClick(): Promise<void> {
|
||||
public async onCurrentPeriodClick(): Promise<void> {
|
||||
try {
|
||||
await this.$store.dispatch(PAYMENTS_ACTIONS.GET_PROJECT_USAGE_AND_CHARGES_CURRENT_ROLLUP);
|
||||
this.$segment.track(SegmentEvent.REPORT_VIEWED, {
|
||||
|
@ -5,7 +5,7 @@
|
||||
<div class="deposit-area" v-if="depositHistoryItems.length > 0">
|
||||
<div class="deposit-area__header">
|
||||
<h1 class="deposit-area__header__title">Short Balance History</h1>
|
||||
<div class="button" @click="onViewAllClick">View All</div>
|
||||
<div class="deposit-area__header__button" @click.stop="onViewAllClick">View All</div>
|
||||
</div>
|
||||
<SortingHeader/>
|
||||
<PaymentsItem
|
||||
@ -75,7 +75,7 @@ export default class SmallDepositHistory extends Vue {
|
||||
line-height: 42px;
|
||||
}
|
||||
|
||||
.button {
|
||||
&__button {
|
||||
display: flex;
|
||||
width: 120px;
|
||||
height: 48px;
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<template>
|
||||
<div class="credit-history">
|
||||
<div class="credit-history__back-area" @click="onBackToBillingClick">
|
||||
<div class="credit-history__back-area" @click.stop="onBackToBillingClick">
|
||||
<BackImage/>
|
||||
<p class="credit-history__back-area__title">Back to Billing</p>
|
||||
</div>
|
||||
|
@ -74,7 +74,7 @@ export default class VSearch extends Vue {
|
||||
this.inputWidth = '56px';
|
||||
}
|
||||
|
||||
private async processSearchQuery() {
|
||||
public async processSearchQuery() {
|
||||
await this.search(this.searchQuery);
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,12 @@
|
||||
// Copyright (C) 2020 Storj Labs, Inc.
|
||||
// See LICENSE for copying information.
|
||||
|
||||
import sinon from 'sinon';
|
||||
import { VNode } from 'vue';
|
||||
import { DirectiveBinding } from 'vue/types/options';
|
||||
|
||||
import HistoryDropdown from '@/components/account/billing/HistoryDropdown.vue';
|
||||
|
||||
import { RouteConfig } from '@/router';
|
||||
import { RouteConfig, router } from '@/router';
|
||||
import { createLocalVue, mount } from '@vue/test-utils';
|
||||
|
||||
const localVue = createLocalVue();
|
||||
@ -40,7 +39,7 @@ describe('HistoryDropdown', (): void => {
|
||||
localVue,
|
||||
propsData: {
|
||||
label: 'Credits History',
|
||||
link: creditsHistory,
|
||||
route: creditsHistory,
|
||||
},
|
||||
});
|
||||
|
||||
@ -53,24 +52,26 @@ describe('HistoryDropdown', (): void => {
|
||||
localVue,
|
||||
propsData: {
|
||||
label: 'Balance History',
|
||||
link: balanceHistory,
|
||||
route: balanceHistory,
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('clicks work correctly', async (): Promise<void> => {
|
||||
const clickSpy = sinon.spy();
|
||||
it('click works correctly', async (): Promise<void> => {
|
||||
const balanceHistory: string = RouteConfig.Account.with(RouteConfig.DepositHistory).path;
|
||||
const wrapper = mount(HistoryDropdown, {
|
||||
localVue,
|
||||
methods: {
|
||||
redirect: clickSpy,
|
||||
propsData: {
|
||||
label: 'Balance History',
|
||||
route: balanceHistory,
|
||||
},
|
||||
router,
|
||||
});
|
||||
|
||||
await wrapper.find('.history-dropdown__link-container').trigger('click');
|
||||
|
||||
expect(clickSpy.callCount).toBe(1);
|
||||
expect(wrapper.vm.$route.name).toBe(RouteConfig.DepositHistory.name);
|
||||
});
|
||||
});
|
||||
|
@ -1,13 +1,13 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`HistoryDropdown renders correctly if balance history 1`] = `
|
||||
<div class="history-dropdown" link="/account/deposit-history">
|
||||
<div class="history-dropdown">
|
||||
<div class="history-dropdown__link-container"><span class="history-dropdown__link-container__link">Balance History</span></div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`HistoryDropdown renders correctly if credit history 1`] = `
|
||||
<div class="history-dropdown" link="/account/credits-history">
|
||||
<div class="history-dropdown">
|
||||
<div class="history-dropdown__link-container"><span class="history-dropdown__link-container__link">Credits History</span></div>
|
||||
</div>
|
||||
`;
|
||||
|
@ -12,7 +12,7 @@ import { makePaymentsModule, PAYMENTS_MUTATIONS } from '@/store/modules/payments
|
||||
import { makeProjectsModule, PROJECTS_MUTATIONS } from '@/store/modules/projects';
|
||||
import { PaymentsHistoryItem, PaymentsHistoryItemType } from '@/types/payments';
|
||||
import { Project } from '@/types/projects';
|
||||
import { createLocalVue, shallowMount } from '@vue/test-utils';
|
||||
import { createLocalVue, mount, shallowMount } from '@vue/test-utils';
|
||||
|
||||
import { ProjectsApiMock } from '../../../mock/api/projects';
|
||||
|
||||
@ -26,7 +26,6 @@ const itemCharge = new PaymentsHistoryItem('testId1', 'Charge', 500, 500, 'test'
|
||||
const itemTransaction = new PaymentsHistoryItem('testId2', 'Transaction', 500, 500, 'test', 'test', new Date(1), new Date(1), PaymentsHistoryItemType.Transaction);
|
||||
const itemTransaction1 = new PaymentsHistoryItem('testId3', 'Transaction', 500, 500, 'test', 'test', new Date(1), new Date(1), PaymentsHistoryItemType.Transaction);
|
||||
const project = new Project('id', 'projectName', 'projectDescription', 'test', 'testOwnerId', false);
|
||||
const clickSpy = sinon.spy();
|
||||
|
||||
localVue.use(Vuex);
|
||||
|
||||
@ -57,37 +56,16 @@ describe('DetailedHistory', (): void => {
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
// TODO: use when vue-test-utils $route mocking feature is implemented.
|
||||
// it('renders correctly with billing items', (): void => {
|
||||
// const $route = {
|
||||
// path: RouteConfig.BillingHistory.path,
|
||||
// };
|
||||
//
|
||||
// store.commit(PAYMENTS_MUTATIONS.CLEAR);
|
||||
// store.commit(PAYMENTS_MUTATIONS.SET_PAYMENTS_HISTORY, [itemCharge, itemInvoice]);
|
||||
//
|
||||
// const wrapper = shallowMount(DetailedHistory, {
|
||||
// localVue,
|
||||
// store,
|
||||
// router,
|
||||
// mocks: {
|
||||
// $route,
|
||||
// },
|
||||
// });
|
||||
//
|
||||
// expect(wrapper).toMatchSnapshot();
|
||||
// });
|
||||
|
||||
it('click on back works correctly', async (): Promise<void> => {
|
||||
const wrapper = shallowMount(DetailedHistory, {
|
||||
const clickSpy = sinon.spy();
|
||||
const wrapper = mount(DetailedHistory, {
|
||||
localVue,
|
||||
store,
|
||||
router,
|
||||
methods: {
|
||||
onBackToBillingClick: clickSpy,
|
||||
},
|
||||
});
|
||||
|
||||
wrapper.vm.onBackToBillingClick = clickSpy;
|
||||
|
||||
await wrapper.find('.history-area__back-area').trigger('click');
|
||||
|
||||
expect(clickSpy.callCount).toBe(1);
|
||||
|
@ -74,13 +74,12 @@ describe('PeriodSelection', (): void => {
|
||||
const wrapper = mount(PeriodSelection, {
|
||||
localVue,
|
||||
store,
|
||||
methods: {
|
||||
onCurrentPeriodClick: currentClickSpy,
|
||||
onPreviousPeriodClick: previousClickSpy,
|
||||
redirect: historyClickSpy,
|
||||
},
|
||||
});
|
||||
|
||||
wrapper.vm.onCurrentPeriodClick = currentClickSpy;
|
||||
wrapper.vm.onPreviousPeriodClick = previousClickSpy;
|
||||
wrapper.vm.redirect = historyClickSpy;
|
||||
|
||||
await wrapper.find('.period-selection').trigger('click');
|
||||
await wrapper.findAll('.period-selection__dropdown__item').at(0).trigger('click');
|
||||
|
||||
|
@ -51,12 +51,11 @@ describe('SmallDepositHistory', (): void => {
|
||||
const wrapper = shallowMount(SmallDepositHistory, {
|
||||
localVue,
|
||||
store,
|
||||
methods: {
|
||||
onViewAllClick: clickSpy,
|
||||
},
|
||||
});
|
||||
|
||||
await wrapper.find('.button').trigger('click');
|
||||
wrapper.vm.onViewAllClick = clickSpy;
|
||||
|
||||
await wrapper.find('.deposit-area__header__button').trigger('click');
|
||||
|
||||
expect(clickSpy.callCount).toBe(1);
|
||||
});
|
||||
|
@ -13,7 +13,8 @@ exports[`PeriodSelection renders correctly 1`] = `
|
||||
<selectedicon-stub class="selected-image"></selectedicon-stub> <span class="period-selection__dropdown__item__label">Current Billing Period</span>
|
||||
</div>
|
||||
<div class="period-selection__dropdown__item">
|
||||
<!----> <span class="period-selection__dropdown__item__label">Previous Billing Period</span></div>
|
||||
<!----> <span class="period-selection__dropdown__item__label">Previous Billing Period</span>
|
||||
</div>
|
||||
<div class="period-selection__dropdown__link-container"><span class="period-selection__dropdown__link-container__link">Billing History</span></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -34,7 +35,8 @@ exports[`PeriodSelection renders correctly with dropdown 1`] = `
|
||||
<path d="M6.87406 9.53082C6.21353 10.1564 5.14259 10.1564 4.48206 9.53082C3.82153 8.90524 3.82153 7.89098 4.48206 7.26541L11.6581 0.469182C12.3186 -0.156394 13.3895 -0.156394 14.0501 0.469182C14.7106 1.09476 14.7106 2.10902 14.0501 2.73459L6.87406 9.53082Z" fill="#2683FF"></path>
|
||||
</svg> <span class="period-selection__dropdown__item__label">Current Billing Period</span></div>
|
||||
<div class="period-selection__dropdown__item">
|
||||
<!----> <span class="period-selection__dropdown__item__label">Previous Billing Period</span></div>
|
||||
<!----> <span class="period-selection__dropdown__item__label">Previous Billing Period</span>
|
||||
</div>
|
||||
<div class="period-selection__dropdown__link-container"><span class="period-selection__dropdown__link-container__link">Billing History</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -4,7 +4,7 @@ exports[`SmallDepositHistory renders correctly with items 1`] = `
|
||||
<div class="deposit-area">
|
||||
<div class="deposit-area__header">
|
||||
<h1 class="deposit-area__header__title">Short Balance History</h1>
|
||||
<div class="button">View All</div>
|
||||
<div class="deposit-area__header__button">View All</div>
|
||||
</div>
|
||||
<sortingheader-stub></sortingheader-stub>
|
||||
<paymentsitem-stub billingitem="[object Object]"></paymentsitem-stub>
|
||||
|
@ -55,11 +55,10 @@ describe('CreditsHistory', (): void => {
|
||||
localVue,
|
||||
store,
|
||||
router,
|
||||
methods: {
|
||||
onBackToBillingClick: clickSpy,
|
||||
},
|
||||
});
|
||||
|
||||
wrapper.vm.onBackToBillingClick = clickSpy;
|
||||
|
||||
await wrapper.find('.credit-history__back-area').trigger('click');
|
||||
|
||||
expect(clickSpy.callCount).toBe(1);
|
||||
|
@ -91,7 +91,8 @@ exports[`PaymentMethods renders correctly after add STORJ and cancel click 2`] =
|
||||
<!---->
|
||||
<div class="add-card-button">
|
||||
<!---->
|
||||
<!----> <span>Add Card</span></div>
|
||||
<!----> <span>Add Card</span>
|
||||
</div>
|
||||
</div>
|
||||
<!---->
|
||||
<!---->
|
||||
@ -115,7 +116,8 @@ exports[`PaymentMethods renders correctly after add card and cancel click 1`] =
|
||||
<addcardform-stub></addcardform-stub>
|
||||
<div class="add-card-button button-moved">
|
||||
<!---->
|
||||
<!----> <span>Add Card</span></div>
|
||||
<!----> <span>Add Card</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="payment-methods-area__security-info-container">
|
||||
<lockimage-stub></lockimage-stub> <span class="payment-methods-area__security-info-container__info">
|
||||
@ -143,7 +145,8 @@ exports[`PaymentMethods renders correctly after add card and cancel click 2`] =
|
||||
<!---->
|
||||
<div class="add-card-button">
|
||||
<!---->
|
||||
<!----> <span>Add Card</span></div>
|
||||
<!----> <span>Add Card</span>
|
||||
</div>
|
||||
</div>
|
||||
<!---->
|
||||
<!---->
|
||||
@ -185,7 +188,8 @@ exports[`PaymentMethods renders correctly with card 1`] = `
|
||||
<!---->
|
||||
<div class="add-card-button">
|
||||
<!---->
|
||||
<!----> <span>Add Card</span></div>
|
||||
<!----> <span>Add Card</span>
|
||||
</div>
|
||||
</div>
|
||||
<!---->
|
||||
<div class="payment-methods-area__existing-cards-container">
|
||||
@ -249,7 +253,8 @@ exports[`PaymentMethods renders correctly without card 1`] = `
|
||||
<!---->
|
||||
<div class="add-card-button">
|
||||
<!---->
|
||||
<!----> <span>Add Card</span></div>
|
||||
<!----> <span>Add Card</span>
|
||||
</div>
|
||||
</div>
|
||||
<!---->
|
||||
<!---->
|
||||
|
@ -20,8 +20,8 @@ describe('HeaderedInput.vue', () => {
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
expect(wrapper.contains('textarea')).toBe(true);
|
||||
expect(wrapper.contains('input')).toBe(false);
|
||||
expect(wrapper.findAll('textarea').length).toBe(1);
|
||||
expect(wrapper.findAll('input').length).toBe(0);
|
||||
});
|
||||
|
||||
it('renders correctly with props', () => {
|
||||
@ -71,11 +71,13 @@ describe('HeaderedInput.vue', () => {
|
||||
|
||||
await wrapper.find('input').trigger('input');
|
||||
|
||||
expect(wrapper.emitted('setData').length).toEqual(1);
|
||||
let emittedSetData = wrapper.emitted('setData');
|
||||
if (emittedSetData) expect(emittedSetData.length).toEqual(1);
|
||||
|
||||
await wrapper.vm.$emit('setData', testData);
|
||||
|
||||
expect(wrapper.emitted('setData')[1][0]).toEqual(testData);
|
||||
emittedSetData = wrapper.emitted('setData');
|
||||
if (emittedSetData) expect(emittedSetData[1][0]).toEqual(testData);
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -42,11 +42,13 @@ describe('HeaderlessInput.vue', () => {
|
||||
|
||||
wrapper.find('input').trigger('input');
|
||||
|
||||
expect(wrapper.emitted('setData').length).toEqual(1);
|
||||
let emittedSetData = wrapper.emitted('setData');
|
||||
if (emittedSetData) expect(emittedSetData.length).toEqual(1);
|
||||
|
||||
wrapper.vm.$emit('setData', testData);
|
||||
|
||||
expect(wrapper.emitted('setData')[1][0]).toEqual(testData);
|
||||
emittedSetData = wrapper.emitted('setData');
|
||||
if (emittedSetData) expect(emittedSetData[1][0]).toEqual(testData);
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -7,33 +7,31 @@ import { mount, shallowMount } from '@vue/test-utils';
|
||||
|
||||
describe('Checkbox.vue', () => {
|
||||
it('renders correctly', () => {
|
||||
|
||||
const wrapper = shallowMount(Checkbox);
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('emit setData on change correctly', () => {
|
||||
|
||||
const wrapper = mount(Checkbox);
|
||||
|
||||
wrapper.find('input').trigger('change');
|
||||
wrapper.find('input').trigger('change');
|
||||
|
||||
expect(wrapper.emitted('setData').length).toEqual(2);
|
||||
const emittedSetData = wrapper.emitted('setData');
|
||||
if (emittedSetData) expect(emittedSetData.length).toEqual(2);
|
||||
});
|
||||
|
||||
it('emits with data correctly', () => {
|
||||
|
||||
const wrapper = mount(Checkbox);
|
||||
|
||||
wrapper.vm.$emit('setData', true);
|
||||
|
||||
expect(wrapper.emitted('setData')[0][0]).toEqual(true);
|
||||
const emittedSetData = wrapper.emitted('setData');
|
||||
if (emittedSetData) expect(emittedSetData[0][0]).toEqual(true);
|
||||
});
|
||||
|
||||
it('renders correctly with error', () => {
|
||||
|
||||
const wrapper = shallowMount(Checkbox, {
|
||||
propsData: {isCheckboxError: true},
|
||||
});
|
||||
|
@ -37,12 +37,9 @@ describe('SearchComponent.vue', () => {
|
||||
it('function clearSearch works correctly', () => {
|
||||
const processSearchQuerySpy = sinon.spy();
|
||||
|
||||
const wrapper = mount(SearchComponent, {
|
||||
methods: {
|
||||
processSearchQuery: processSearchQuerySpy,
|
||||
},
|
||||
});
|
||||
const wrapper = mount(SearchComponent);
|
||||
|
||||
wrapper.vm.processSearchQuery = processSearchQuerySpy;
|
||||
wrapper.vm.clearSearch();
|
||||
|
||||
expect(processSearchQuerySpy.callCount).toBe(1);
|
||||
|
@ -3,7 +3,7 @@
|
||||
exports[`VInfoBar.vue renders correctly 1`] = `
|
||||
<div class="info-bar">
|
||||
<div class="info-bar__info-area"><b class="info-bar__info-area__first-value">5GB</b> <span class="info-bar__info-area__first-description">test1</span> <b class="info-bar__info-area__second-value">5GB</b> <span class="info-bar__info-area__second-description">test2</span>
|
||||
<router-link-stub to="/" tag="a" event="click" class="info-bar__info-area__button">Details</router-link-stub>
|
||||
<router-link-stub to="/" tag="a" ariacurrentvalue="page" event="click" class="info-bar__info-area__button">Details</router-link-stub>
|
||||
</div> <a href="testlink" target="_blank" rel="noopener noreferrer" class="info-bar__link">
|
||||
label
|
||||
</a>
|
||||
|
@ -44,12 +44,11 @@ describe('AccountDropdown', () => {
|
||||
store,
|
||||
localVue,
|
||||
router,
|
||||
methods: {
|
||||
onAccountSettingsClick: routerSpy,
|
||||
onLogoutClick: routerSpy,
|
||||
},
|
||||
});
|
||||
|
||||
wrapper.vm.onAccountSettingsClick = routerSpy;
|
||||
wrapper.vm.onLogoutClick = routerSpy;
|
||||
|
||||
await router.push(RouteConfig.ProjectDashboard.path);
|
||||
await wrapper.find('.settings').trigger('click');
|
||||
|
||||
|
@ -4,19 +4,19 @@ exports[`NavigationArea snapshot not changed during onboarding tour 1`] = ``;
|
||||
|
||||
exports[`NavigationArea snapshot not changed with project 1`] = `
|
||||
<div class="navigation-area">
|
||||
<router-link-stub to="/project-dashboard" tag="a" event="click" aria-label="Dashboard" class="navigation-area__item-container">
|
||||
<router-link-stub to="/project-dashboard" tag="a" ariacurrentvalue="page" event="click" aria-label="Dashboard" class="navigation-area__item-container">
|
||||
<div class="navigation-area__item-container__link">
|
||||
<anonymous-stub></anonymous-stub>
|
||||
<h1 class="navigation-area__item-container__link__title">Dashboard</h1>
|
||||
</div>
|
||||
</router-link-stub>
|
||||
<router-link-stub to="/api-keys" tag="a" event="click" aria-label="API Keys" class="navigation-area__item-container">
|
||||
<router-link-stub to="/api-keys" tag="a" ariacurrentvalue="page" event="click" aria-label="API Keys" class="navigation-area__item-container">
|
||||
<div class="navigation-area__item-container__link">
|
||||
<anonymous-stub></anonymous-stub>
|
||||
<h1 class="navigation-area__item-container__link__title">API Keys</h1>
|
||||
</div>
|
||||
</router-link-stub>
|
||||
<router-link-stub to="/project-members" tag="a" event="click" aria-label="Users" class="navigation-area__item-container">
|
||||
<router-link-stub to="/project-members" tag="a" ariacurrentvalue="page" event="click" aria-label="Users" class="navigation-area__item-container">
|
||||
<div class="navigation-area__item-container__link">
|
||||
<anonymous-stub></anonymous-stub>
|
||||
<h1 class="navigation-area__item-container__link__title">Users</h1>
|
||||
|
@ -25,7 +25,7 @@ notificationModule.actions[NOTIFICATION_ACTIONS.DELETE] = deleteSpy;
|
||||
|
||||
const store = new Vuex.Store(notificationModule);
|
||||
|
||||
describe('Notification.vue', () => {
|
||||
describe('NotificationItem', () => {
|
||||
|
||||
it('renders correctly', () => {
|
||||
const wrapper = shallowMount(NotificationItem);
|
||||
@ -33,7 +33,7 @@ describe('Notification.vue', () => {
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders correctly with props', () => {
|
||||
it('renders correctly with success props', () => {
|
||||
const testMessage = 'testMessage';
|
||||
|
||||
const wrapper = mount(NotificationItem, {
|
||||
@ -48,36 +48,57 @@ describe('Notification.vue', () => {
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
expect(wrapper.find('.notification-wrap__text-area__message').text()).toMatch(testMessage);
|
||||
});
|
||||
|
||||
wrapper.setProps({
|
||||
notification: new DelayedNotification(
|
||||
jest.fn(),
|
||||
NOTIFICATION_TYPES.ERROR,
|
||||
testMessage,
|
||||
),
|
||||
it('renders correctly with error props', () => {
|
||||
const testMessage = 'testMessage';
|
||||
|
||||
const wrapper = mount(NotificationItem, {
|
||||
propsData: {
|
||||
notification: new DelayedNotification(
|
||||
jest.fn(),
|
||||
NOTIFICATION_TYPES.ERROR,
|
||||
testMessage,
|
||||
),
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
expect(wrapper.find('.notification-wrap__text-area__message').text()).toMatch(testMessage);
|
||||
});
|
||||
|
||||
wrapper.setProps({
|
||||
notification: new DelayedNotification(
|
||||
jest.fn(),
|
||||
NOTIFICATION_TYPES.NOTIFICATION,
|
||||
testMessage,
|
||||
),
|
||||
it('renders correctly with notification props', () => {
|
||||
const testMessage = 'testMessage';
|
||||
|
||||
const wrapper = mount(NotificationItem, {
|
||||
propsData: {
|
||||
notification: new DelayedNotification(
|
||||
jest.fn(),
|
||||
NOTIFICATION_TYPES.NOTIFICATION,
|
||||
testMessage,
|
||||
),
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
expect(wrapper.find('.notification-wrap__text-area__message').text()).toMatch(testMessage);
|
||||
});
|
||||
|
||||
wrapper.setProps({
|
||||
notification: new DelayedNotification(
|
||||
jest.fn(),
|
||||
NOTIFICATION_TYPES.WARNING,
|
||||
testMessage,
|
||||
),
|
||||
it('renders correctly with warning props', () => {
|
||||
const testMessage = 'testMessage';
|
||||
|
||||
const wrapper = mount(NotificationItem, {
|
||||
propsData: {
|
||||
notification: new DelayedNotification(
|
||||
jest.fn(),
|
||||
NOTIFICATION_TYPES.WARNING,
|
||||
testMessage,
|
||||
),
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
expect(wrapper.find('.notification-wrap__text-area__message').text()).toMatch(testMessage);
|
||||
});
|
||||
|
||||
it('trigger pause correctly', () => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Notification.vue renders correctly 1`] = `
|
||||
exports[`NotificationItem renders correctly 1`] = `
|
||||
<div class="notification-wrap" style="background-color: rgb(208, 227, 254);">
|
||||
<div class="notification-wrap__text-area">
|
||||
<div class="notification-wrap__text-area__image"><svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
@ -14,7 +14,36 @@ exports[`Notification.vue renders correctly 1`] = `
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Notification.vue renders correctly with props 1`] = `
|
||||
exports[`NotificationItem renders correctly with error props 1`] = `
|
||||
<div class="notification-wrap" style="background-color: rgb(255, 212, 210);">
|
||||
<div class="notification-wrap__text-area">
|
||||
<div class="notification-wrap__text-area__image"><svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="40" height="40" rx="10" fill="#EB5757"></rect>
|
||||
<path d="M20.5 22.75C21.7676 22.75 22.8047 21.645 22.8047 20.2944V10.4556C22.8047 10.3328 22.797 10.2019 22.7816 10.0791C22.6126 8.90857 21.6523 8 20.5 8C19.2324 8 18.1953 9.10502 18.1953 10.4556V20.2862C18.1953 21.645 19.2324 22.75 20.5 22.75Z" fill="#F5F5F9"></path>
|
||||
<path d="M20.5 25.1465C18.7146 25.1465 17.2734 26.5877 17.2734 28.373C17.2734 30.1584 18.7146 31.5996 20.5 31.5996C22.2853 31.5996 23.7265 30.1584 23.7265 28.373C23.7337 26.5877 22.2925 25.1465 20.5 25.1465Z" fill="#F5F5F9"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<p class="notification-wrap__text-area__message">testMessage</p>
|
||||
</div>
|
||||
<div class="notification-wrap__buttons-group"><span class="notification-wrap__buttons-group__close"><svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.7071 9.70711C24.0976 9.31658 24.0976 8.68342 23.7071 8.29289C23.3166 7.90237 22.6834 7.90237 22.2929 8.29289L23.7071 9.70711ZM8.29289 22.2929C7.90237 22.6834 7.90237 23.3166 8.29289 23.7071C8.68342 24.0976 9.31658 24.0976 9.70711 23.7071L8.29289 22.2929ZM9.70711 8.29289C9.31658 7.90237 8.68342 7.90237 8.29289 8.29289C7.90237 8.68342 7.90237 9.31658 8.29289 9.70711L9.70711 8.29289ZM22.2929 23.7071C22.6834 24.0976 23.3166 24.0976 23.7071 23.7071C24.0976 23.3166 24.0976 22.6834 23.7071 22.2929L22.2929 23.7071ZM22.2929 8.29289L8.29289 22.2929L9.70711 23.7071L23.7071 9.70711L22.2929 8.29289ZM8.29289 9.70711L22.2929 23.7071L23.7071 22.2929L9.70711 8.29289L8.29289 9.70711Z" fill="#354049"></path></svg></span></div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`NotificationItem renders correctly with notification props 1`] = `
|
||||
<div class="notification-wrap" style="background-color: rgb(208, 227, 254);">
|
||||
<div class="notification-wrap__text-area">
|
||||
<div class="notification-wrap__text-area__image"><svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="40" height="40" rx="10" fill="#2683FF"></rect>
|
||||
<path d="M18.1489 17.043H21.9149V28H18.1489V17.043ZM20 12C20.5816 12 21.0567 12.1823 21.4255 12.5468C21.8085 12.8979 22 13.357 22 13.9241C22 14.4776 21.8085 14.9367 21.4255 15.3013C21.0567 15.6658 20.5816 15.8481 20 15.8481C19.4184 15.8481 18.9362 15.6658 18.5532 15.3013C18.1844 14.9367 18 14.4776 18 13.9241C18 13.357 18.1844 12.8979 18.5532 12.5468C18.9362 12.1823 19.4184 12 20 12Z" fill="#F5F6FA"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<p class="notification-wrap__text-area__message">testMessage</p>
|
||||
</div>
|
||||
<div class="notification-wrap__buttons-group"><span class="notification-wrap__buttons-group__close"><svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.7071 9.70711C24.0976 9.31658 24.0976 8.68342 23.7071 8.29289C23.3166 7.90237 22.6834 7.90237 22.2929 8.29289L23.7071 9.70711ZM8.29289 22.2929C7.90237 22.6834 7.90237 23.3166 8.29289 23.7071C8.68342 24.0976 9.31658 24.0976 9.70711 23.7071L8.29289 22.2929ZM9.70711 8.29289C9.31658 7.90237 8.68342 7.90237 8.29289 8.29289C7.90237 8.68342 7.90237 9.31658 8.29289 9.70711L9.70711 8.29289ZM22.2929 23.7071C22.6834 24.0976 23.3166 24.0976 23.7071 23.7071C24.0976 23.3166 24.0976 22.6834 23.7071 22.2929L22.2929 23.7071ZM22.2929 8.29289L8.29289 22.2929L9.70711 23.7071L23.7071 9.70711L22.2929 8.29289ZM8.29289 9.70711L22.2929 23.7071L23.7071 22.2929L9.70711 8.29289L8.29289 9.70711Z" fill="#354049"></path></svg></span></div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`NotificationItem renders correctly with success props 1`] = `
|
||||
<div class="notification-wrap" style="background-color: rgb(219, 241, 211);">
|
||||
<div class="notification-wrap__text-area">
|
||||
<div class="notification-wrap__text-area__image"><svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
@ -28,40 +57,11 @@ exports[`Notification.vue renders correctly with props 1`] = `
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Notification.vue renders correctly with props 2`] = `
|
||||
<div class="notification-wrap" style="background-color: rgb(219, 241, 211);">
|
||||
exports[`NotificationItem renders correctly with warning props 1`] = `
|
||||
<div class="notification-wrap" style="background-color: rgb(252, 248, 227);">
|
||||
<div class="notification-wrap__text-area">
|
||||
<div class="notification-wrap__text-area__image"><svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="40" height="40" rx="10" fill="#95D486"></rect>
|
||||
<path d="M27.7625 17.0601C28.348 16.4741 28.3475 15.5243 27.7614 14.9388C27.1753 14.3533 26.2256 14.3538 25.6401 14.9399L27.7625 17.0601ZM17.7003 25.01L16.6396 26.0707C16.921 26.3521 17.3027 26.5101 17.7007 26.51C18.0986 26.5099 18.4802 26.3517 18.7615 26.0701L17.7003 25.01ZM16.0607 21.249C15.4749 20.6633 14.5251 20.6633 13.9393 21.249C13.3536 21.8348 13.3536 22.7846 13.9393 23.3704L16.0607 21.249ZM25.6401 14.9399L16.6391 23.9499L18.7615 26.0701L27.7625 17.0601L25.6401 14.9399ZM18.761 23.9493L16.0607 21.249L13.9393 23.3704L16.6396 26.0707L18.761 23.9493Z" fill="white"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<p class="notification-wrap__text-area__message">testMessage</p>
|
||||
</div>
|
||||
<div class="notification-wrap__buttons-group"><span class="notification-wrap__buttons-group__close"><svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.7071 9.70711C24.0976 9.31658 24.0976 8.68342 23.7071 8.29289C23.3166 7.90237 22.6834 7.90237 22.2929 8.29289L23.7071 9.70711ZM8.29289 22.2929C7.90237 22.6834 7.90237 23.3166 8.29289 23.7071C8.68342 24.0976 9.31658 24.0976 9.70711 23.7071L8.29289 22.2929ZM9.70711 8.29289C9.31658 7.90237 8.68342 7.90237 8.29289 8.29289C7.90237 8.68342 7.90237 9.31658 8.29289 9.70711L9.70711 8.29289ZM22.2929 23.7071C22.6834 24.0976 23.3166 24.0976 23.7071 23.7071C24.0976 23.3166 24.0976 22.6834 23.7071 22.2929L22.2929 23.7071ZM22.2929 8.29289L8.29289 22.2929L9.70711 23.7071L23.7071 9.70711L22.2929 8.29289ZM8.29289 9.70711L22.2929 23.7071L23.7071 22.2929L9.70711 8.29289L8.29289 9.70711Z" fill="#354049"></path></svg></span></div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Notification.vue renders correctly with props 3`] = `
|
||||
<div class="notification-wrap" style="background-color: rgb(219, 241, 211);">
|
||||
<div class="notification-wrap__text-area">
|
||||
<div class="notification-wrap__text-area__image"><svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="40" height="40" rx="10" fill="#95D486"></rect>
|
||||
<path d="M27.7625 17.0601C28.348 16.4741 28.3475 15.5243 27.7614 14.9388C27.1753 14.3533 26.2256 14.3538 25.6401 14.9399L27.7625 17.0601ZM17.7003 25.01L16.6396 26.0707C16.921 26.3521 17.3027 26.5101 17.7007 26.51C18.0986 26.5099 18.4802 26.3517 18.7615 26.0701L17.7003 25.01ZM16.0607 21.249C15.4749 20.6633 14.5251 20.6633 13.9393 21.249C13.3536 21.8348 13.3536 22.7846 13.9393 23.3704L16.0607 21.249ZM25.6401 14.9399L16.6391 23.9499L18.7615 26.0701L27.7625 17.0601L25.6401 14.9399ZM18.761 23.9493L16.0607 21.249L13.9393 23.3704L16.6396 26.0707L18.761 23.9493Z" fill="white"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<p class="notification-wrap__text-area__message">testMessage</p>
|
||||
</div>
|
||||
<div class="notification-wrap__buttons-group"><span class="notification-wrap__buttons-group__close"><svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.7071 9.70711C24.0976 9.31658 24.0976 8.68342 23.7071 8.29289C23.3166 7.90237 22.6834 7.90237 22.2929 8.29289L23.7071 9.70711ZM8.29289 22.2929C7.90237 22.6834 7.90237 23.3166 8.29289 23.7071C8.68342 24.0976 9.31658 24.0976 9.70711 23.7071L8.29289 22.2929ZM9.70711 8.29289C9.31658 7.90237 8.68342 7.90237 8.29289 8.29289C7.90237 8.68342 7.90237 9.31658 8.29289 9.70711L9.70711 8.29289ZM22.2929 23.7071C22.6834 24.0976 23.3166 24.0976 23.7071 23.7071C24.0976 23.3166 24.0976 22.6834 23.7071 22.2929L22.2929 23.7071ZM22.2929 8.29289L8.29289 22.2929L9.70711 23.7071L23.7071 9.70711L22.2929 8.29289ZM8.29289 9.70711L22.2929 23.7071L23.7071 22.2929L9.70711 8.29289L8.29289 9.70711Z" fill="#354049"></path></svg></span></div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Notification.vue renders correctly with props 4`] = `
|
||||
<div class="notification-wrap" style="background-color: rgb(219, 241, 211);">
|
||||
<div class="notification-wrap__text-area">
|
||||
<div class="notification-wrap__text-area__image"><svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="40" height="40" rx="10" fill="#95D486"></rect>
|
||||
<path d="M27.7625 17.0601C28.348 16.4741 28.3475 15.5243 27.7614 14.9388C27.1753 14.3533 26.2256 14.3538 25.6401 14.9399L27.7625 17.0601ZM17.7003 25.01L16.6396 26.0707C16.921 26.3521 17.3027 26.5101 17.7007 26.51C18.0986 26.5099 18.4802 26.3517 18.7615 26.0701L17.7003 25.01ZM16.0607 21.249C15.4749 20.6633 14.5251 20.6633 13.9393 21.249C13.3536 21.8348 13.3536 22.7846 13.9393 23.3704L16.0607 21.249ZM25.6401 14.9399L16.6391 23.9499L18.7615 26.0701L27.7625 17.0601L25.6401 14.9399ZM18.761 23.9493L16.0607 21.249L13.9393 23.3704L16.6396 26.0707L18.761 23.9493Z" fill="white"></path>
|
||||
<div class="notification-wrap__text-area__image"><svg width="36" height="34" viewBox="0 0 36 34" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M35.028 27.9606C34.5358 27.0512 34.0405 26.1403 33.5467 25.2262C32.628 23.5309 31.7108 21.8356 30.7936 20.1402C29.6921 18.109 28.5936 16.0746 27.4936 14.0434C26.4311 12.0825 25.3717 10.1247 24.3093 8.16544C23.528 6.7248 22.7499 5.28264 21.9686 3.84064C21.7577 3.45002 21.5467 3.0594 21.3358 2.67188C21.1171 2.26564 20.8858 1.875 20.5546 1.54376C19.3983 0.379681 17.4796 0.156241 16.089 1.03596C15.4921 1.41408 15.0609 1.95004 14.7296 2.56408C14.2218 3.5016 13.714 4.43908 13.2062 5.37972C12.2812 7.09064 11.3546 8.8016 10.4296 10.5125C9.31555 12.5547 8.21087 14.6017 7.10151 16.6485C6.05151 18.5892 4.99995 20.5266 3.94839 22.4689C3.17963 23.8908 2.40931 25.3096 1.63903 26.7313C1.4359 27.1063 1.23279 27.4813 1.02967 27.8563C0.745289 28.3844 0.521865 28.9188 0.451545 29.5282C0.253109 31.2501 1.45935 32.947 3.12655 33.3688C3.56719 33.4813 4.00155 33.486 4.44687 33.486H31.9469H31.9906C32.8969 33.4673 33.7563 33.1267 34.4203 32.5095C35.0609 31.9157 35.4359 31.1032 35.5422 30.2438C35.6437 29.4345 35.4094 28.6688 35.0281 27.961L35.028 27.9606ZM16.4372 10.9526C16.4372 10.0776 17.1528 9.42916 17.9997 9.39012C18.8434 9.35106 19.5621 10.137 19.5621 10.9526V21.9558C19.5621 22.8308 18.8465 23.4792 17.9997 23.5183C17.1559 23.5573 16.4372 22.7714 16.4372 21.9558V10.9526ZM17.9997 28.8402C17.1215 28.8402 16.409 28.1293 16.409 27.2496C16.409 26.3714 17.1199 25.6589 17.9997 25.6589C18.8778 25.6589 19.5903 26.3698 19.5903 27.2496C19.5903 28.1277 18.8778 28.8402 17.9997 28.8402Z" fill="#F4D638"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<p class="notification-wrap__text-area__message">testMessage</p>
|
||||
|
@ -24,7 +24,8 @@ exports[`ProgressBar.vue renders correctly if paywall is disabled 1`] = `
|
||||
Create an API Key
|
||||
</span> <span class="progress-bar-container__titles-area__title">
|
||||
Upload Data
|
||||
</span></div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
|
@ -58,19 +58,4 @@ describe('CreateApiKeyStep.vue', () => {
|
||||
expect(wrapper.findAll('.disabled').length).toBe(0);
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('done click works correctly correctly', async (): Promise<void> => {
|
||||
const spy = sinon.spy();
|
||||
const wrapper = mount(CreateApiKeyStep, {
|
||||
store,
|
||||
localVue,
|
||||
methods: {
|
||||
onDoneClick: spy,
|
||||
},
|
||||
});
|
||||
|
||||
await wrapper.find('.done-button').trigger('click');
|
||||
|
||||
expect(spy.callCount).toBe(1);
|
||||
});
|
||||
});
|
||||
|
@ -37,11 +37,10 @@ describe('CreateProjectStep.vue', () => {
|
||||
const wrapper = mount(CreateProjectStep, {
|
||||
store,
|
||||
localVue,
|
||||
methods: {
|
||||
createProjectClick: clickSpy,
|
||||
},
|
||||
});
|
||||
|
||||
wrapper.vm.createProjectClick = clickSpy;
|
||||
|
||||
expect(wrapper.findAll('.disabled').length).toBe(1);
|
||||
|
||||
await wrapper.vm.setProjectName('test');
|
||||
|
@ -1,11 +1,8 @@
|
||||
// Copyright (C) 2020 Storj Labs, Inc.
|
||||
// See LICENSE for copying information.
|
||||
|
||||
import sinon from 'sinon';
|
||||
|
||||
import UploadDataStep from '@/components/onboardingTour/steps/UploadDataStep.vue';
|
||||
|
||||
import { router } from '@/router';
|
||||
import { createLocalVue, mount } from '@vue/test-utils';
|
||||
|
||||
const localVue = createLocalVue();
|
||||
@ -18,19 +15,4 @@ describe('UploadDataStep.vue', () => {
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('button click works correctly', async (): Promise<void> => {
|
||||
const clickSpy = sinon.spy();
|
||||
const wrapper = mount(UploadDataStep, {
|
||||
localVue,
|
||||
router,
|
||||
methods: {
|
||||
onButtonClick: clickSpy,
|
||||
},
|
||||
});
|
||||
|
||||
await wrapper.find('.go-to-button').trigger('click');
|
||||
|
||||
expect(clickSpy.callCount).toBe(1);
|
||||
});
|
||||
});
|
||||
|
@ -12,6 +12,7 @@ exports[`AddCardState.vue renders correctly 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
<div class="add-card-state__button">
|
||||
<!----> <span class="add-card-state__button__label">Add Payment</span></div>
|
||||
<!----> <span class="add-card-state__button__label">Add Payment</span>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
@ -12,7 +12,8 @@ exports[`AddStorjState.vue renders correctly 1`] = `
|
||||
amounts are available
|
||||
<a href="https://support.tardigrade.io/hc/en-us/requests/new?ticket_form_id=360000683212" target="_blank" rel="noopener noreferrer" class="add-storj-state__container__deposit-area__info__request-link">
|
||||
per request.
|
||||
</a></p>
|
||||
</a>
|
||||
</p>
|
||||
<payingstep-stub></payingstep-stub>
|
||||
<!---->
|
||||
<!---->
|
||||
@ -35,7 +36,8 @@ exports[`AddStorjState.vue renders correctly with completed transaction 1`] = `
|
||||
amounts are available
|
||||
<a href="https://support.tardigrade.io/hc/en-us/requests/new?ticket_form_id=360000683212" target="_blank" rel="noopener noreferrer" class="add-storj-state__container__deposit-area__info__request-link">
|
||||
per request.
|
||||
</a></p>
|
||||
</a>
|
||||
</p>
|
||||
<!---->
|
||||
<!---->
|
||||
<verifiedstep-stub></verifiedstep-stub>
|
||||
@ -58,7 +60,8 @@ exports[`AddStorjState.vue renders correctly with pending transaction 1`] = `
|
||||
amounts are available
|
||||
<a href="https://support.tardigrade.io/hc/en-us/requests/new?ticket_form_id=360000683212" target="_blank" rel="noopener noreferrer" class="add-storj-state__container__deposit-area__info__request-link">
|
||||
per request.
|
||||
</a></p>
|
||||
</a>
|
||||
</p>
|
||||
<!---->
|
||||
<verifyingstep-stub></verifyingstep-stub>
|
||||
<!---->
|
||||
|
Loading…
Reference in New Issue
Block a user