diff --git a/web/satellite/src/components/account/billing/paymentMethods/TokenDepositSelection.vue b/web/satellite/src/components/account/billing/paymentMethods/TokenDepositSelection.vue index 6c118fa97..5bbf28f5a 100644 --- a/web/satellite/src/components/account/billing/paymentMethods/TokenDepositSelection.vue +++ b/web/satellite/src/components/account/billing/paymentMethods/TokenDepositSelection.vue @@ -199,7 +199,7 @@ export default class TokenDepositSelection extends Vue { * Indicates if app state is in onboarding tour state. */ private get isOnboardingTour(): boolean { - return this.$route.name === RouteConfig.OnboardingTour.name; + return this.$route.path.includes(RouteConfig.OnboardingTour.path); } } diff --git a/web/satellite/src/components/header/projectsDropdown/ProjectSelection.vue b/web/satellite/src/components/header/projectsDropdown/ProjectSelection.vue index 42aa6b229..d146b95e8 100644 --- a/web/satellite/src/components/header/projectsDropdown/ProjectSelection.vue +++ b/web/satellite/src/components/header/projectsDropdown/ProjectSelection.vue @@ -60,7 +60,7 @@ export default class ProjectSelection extends Vue { * Indicates if current route is onboarding tour. */ public get isOnboardingTour(): boolean { - return this.$route.name === RouteConfig.OnboardingTour.name; + return this.$route.path.includes(RouteConfig.OnboardingTour.path); } /** diff --git a/web/satellite/src/components/header/resourcesDropdown/ResourcesDropdown.vue b/web/satellite/src/components/header/resourcesDropdown/ResourcesDropdown.vue index 75f389a3e..57642ccc1 100644 --- a/web/satellite/src/components/header/resourcesDropdown/ResourcesDropdown.vue +++ b/web/satellite/src/components/header/resourcesDropdown/ResourcesDropdown.vue @@ -24,7 +24,7 @@ export default class ResourcesDropdown extends Vue { * Indicates if current route is onboarding tour. */ public get isOnboardingTour(): boolean { - return this.$route.name === RouteConfig.OnboardingTour.name; + return this.$route.path.includes(RouteConfig.OnboardingTour.path); } } diff --git a/web/satellite/src/components/header/resourcesDropdown/ResourcesSelection.vue b/web/satellite/src/components/header/resourcesDropdown/ResourcesSelection.vue index bdb8481a0..f2603eaac 100644 --- a/web/satellite/src/components/header/resourcesDropdown/ResourcesSelection.vue +++ b/web/satellite/src/components/header/resourcesDropdown/ResourcesSelection.vue @@ -43,7 +43,7 @@ export default class ResourcesSelection extends Vue { * Indicates if current route is onboarding tour. */ public get isOnboardingTour(): boolean { - return this.$route.name === RouteConfig.OnboardingTour.name; + return this.$route.path.includes(RouteConfig.OnboardingTour.path); } /** diff --git a/web/satellite/src/components/header/settingsDropdown/SettingsSelection.vue b/web/satellite/src/components/header/settingsDropdown/SettingsSelection.vue index 7774f5158..b618fbe55 100644 --- a/web/satellite/src/components/header/settingsDropdown/SettingsSelection.vue +++ b/web/satellite/src/components/header/settingsDropdown/SettingsSelection.vue @@ -43,7 +43,7 @@ export default class SettingsSelection extends Vue { * Indicates if current route is onboarding tour. */ public get isOnboardingTour(): boolean { - return this.$route.name === RouteConfig.OnboardingTour.name; + return this.$route.path.includes(RouteConfig.OnboardingTour.path); } /** diff --git a/web/satellite/src/components/navigation/NavigationArea.vue b/web/satellite/src/components/navigation/NavigationArea.vue index dcdaf6a16..97c803077 100644 --- a/web/satellite/src/components/navigation/NavigationArea.vue +++ b/web/satellite/src/components/navigation/NavigationArea.vue @@ -67,7 +67,7 @@ export default class NavigationArea extends Vue { * Indicates if current route is onboarding tour. */ private get isOnboardingTour(): boolean { - return this.$route.name === RouteConfig.OnboardingTour.name; + return this.$route.path.includes(RouteConfig.OnboardingTour.path); } } diff --git a/web/satellite/src/components/onboardingTour/OnboardingTourArea.vue b/web/satellite/src/components/onboardingTour/OnboardingTourArea.vue index 3f69d11ec..eecbd7b67 100644 --- a/web/satellite/src/components/onboardingTour/OnboardingTourArea.vue +++ b/web/satellite/src/components/onboardingTour/OnboardingTourArea.vue @@ -11,34 +11,7 @@
- - - - - - - + import { Component, Vue } from 'vue-property-decorator'; -import ProgressBar from '@/components/onboardingTour/ProgressBar.vue'; -import AddPaymentStep from '@/components/onboardingTour/steps/AddPaymentStep.vue'; -import CreateApiKeyStep from '@/components/onboardingTour/steps/CreateApiKeyStep.vue'; -import CreateProjectStep from '@/components/onboardingTour/steps/CreateProjectStep.vue'; -import OverviewStep from '@/components/onboardingTour/steps/OverviewStep.vue'; -import OverviewStepNoPaywall from '@/components/onboardingTour/steps/OverviewStepNoPaywall.vue'; -import UploadDataStep from '@/components/onboardingTour/steps/UploadDataStep.vue'; - -import CheckedImage from '@/../static/images/common/checked.svg'; import CloseImage from '@/../static/images/onboardingTour/close.svg'; import { RouteConfig } from '@/router'; -import { TourState } from '@/utils/constants/onboardingTourEnums'; @Component({ components: { - OverviewStepNoPaywall, - UploadDataStep, - CreateApiKeyStep, - CreateProjectStep, - AddPaymentStep, - ProgressBar, - OverviewStep, - CheckedImage, CloseImage, }, }) - export default class OnboardingTourArea extends Vue { - public areaState: number = TourState.DEFAULT; public isInfoBarVisible: boolean = true; /** @@ -89,7 +42,7 @@ export default class OnboardingTourArea extends Vue { * Sets area to needed state. */ public mounted(): void { - if (this.userHasProject && this.userHasApiKeys) { + if (this.userHasProject && this.userHasAccessGrants) { try { this.$router.push(RouteConfig.ProjectDashboard.path); } catch (error) { @@ -99,22 +52,22 @@ export default class OnboardingTourArea extends Vue { return; } - if (this.userHasProject && !this.userHasApiKeys) { + if (this.userHasProject && !this.userHasAccessGrants) { this.disableInfoBar(); - this.setCreateApiKeyState(); + this.setCreateAccessGrantStep(); return; } if (this.$store.state.paymentsModule.creditCards.length > 0) { this.disableInfoBar(); - this.setCreateProjectState(); + this.setCreateAccessGrantStep(); return; } if (this.$store.getters.isTransactionProcessing || this.$store.getters.isBalancePositive) { - this.setAddPaymentState(); + this.setAddPaymentStep(); } } @@ -126,67 +79,17 @@ export default class OnboardingTourArea extends Vue { } /** - * Indicates if area is in default state. + * Sets area's state to adding payment method step. */ - public get isDefaultState(): boolean { - return this.areaState === TourState.DEFAULT; + public setAddPaymentStep(): void { + this.$router.push(RouteConfig.OnboardingTour.with(RouteConfig.PaymentStep).path); } /** - * Indicates if area is in adding payment method state. + * Sets area's state to creating access grant step. */ - public get isAddPaymentState(): boolean { - return this.areaState === TourState.ADDING_PAYMENT; - } - - /** - * Indicates if area is in creating project state. - */ - public get isCreateProjectState(): boolean { - return this.areaState === TourState.PROJECT; - } - - /** - * Indicates if area is in api key state. - */ - public get isCreatApiKeyState(): boolean { - return this.areaState === TourState.API_KEY; - } - - /** - * Indicates if area is in upload data state. - */ - public get isUploadDataState(): boolean { - return this.areaState === TourState.UPLOAD; - } - - /** - * Sets area's state to adding payment method state. - */ - public setAddPaymentState(): void { - this.areaState = TourState.ADDING_PAYMENT; - } - - /** - * Sets area's state to creating project state. - */ - public setCreateProjectState(): void { - this.disableInfoBar(); - this.areaState = TourState.PROJECT; - } - - /** - * Sets area's state to creating api key state. - */ - public setCreateApiKeyState(): void { - this.areaState = TourState.API_KEY; - } - - /** - * Sets area's state to upload data state. - */ - public setUploadDataState(): void { - this.areaState = TourState.UPLOAD; + public setCreateAccessGrantStep(): void { + this.$router.push(RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant).path); } /** @@ -196,6 +99,13 @@ export default class OnboardingTourArea extends Vue { this.isInfoBarVisible = false; } + /** + * Indicates if area is on adding payment method step. + */ + public get isAddPaymentState(): boolean { + return this.$route.name === RouteConfig.PaymentStep.name; + } + /** * Indicates if user has at least one project. */ @@ -204,10 +114,10 @@ export default class OnboardingTourArea extends Vue { } /** - * Indicates if user has at least one API key. + * Indicates if user has at least one access grant. */ - private get userHasApiKeys(): boolean { - return this.$store.state.apiKeysModule.page.apiKeys.length > 0; + private get userHasAccessGrants(): boolean { + return this.$store.state.accessGrantsModule.page.accessGrants.length > 0; } } @@ -246,7 +156,10 @@ export default class OnboardingTourArea extends Vue { } &__content { - padding: 0 100px 80px 100px; + display: flex; + flex-direction: column; + align-items: center; + padding: 110px 0 80px 0; position: relative; &__tardigrade { @@ -257,24 +170,4 @@ export default class OnboardingTourArea extends Vue { } } } - - @media screen and (max-width: 1550px) { - - .tour-area { - - &__content { - padding: 0 50px 80px 50px; - } - } - } - - @media screen and (max-width: 1000px) { - - .tour-area { - - &__content { - padding: 0 25px 80px 25px; - } - } - } diff --git a/web/satellite/src/components/onboardingTour/ProgressBar.vue b/web/satellite/src/components/onboardingTour/ProgressBar.vue deleted file mode 100644 index b8c07483e..000000000 --- a/web/satellite/src/components/onboardingTour/ProgressBar.vue +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright (C) 2020 Storj Labs, Inc. -// See LICENSE for copying information. - - - - - - \ No newline at end of file diff --git a/web/satellite/src/components/onboardingTour/steps/CreateApiKeyStep.vue b/web/satellite/src/components/onboardingTour/steps/CreateApiKeyStep.vue deleted file mode 100644 index eab65098a..000000000 --- a/web/satellite/src/components/onboardingTour/steps/CreateApiKeyStep.vue +++ /dev/null @@ -1,385 +0,0 @@ -// Copyright (C) 2020 Storj Labs, Inc. -// See LICENSE for copying information. - - - - - - diff --git a/web/satellite/src/components/onboardingTour/steps/CreateProjectStep.vue b/web/satellite/src/components/onboardingTour/steps/CreateProjectStep.vue deleted file mode 100644 index 5bf6a7aeb..000000000 --- a/web/satellite/src/components/onboardingTour/steps/CreateProjectStep.vue +++ /dev/null @@ -1,280 +0,0 @@ -// Copyright (C) 2020 Storj Labs, Inc. -// See LICENSE for copying information. - - - - - - diff --git a/web/satellite/src/components/onboardingTour/steps/OverviewStepNoPaywall.vue b/web/satellite/src/components/onboardingTour/steps/OverviewStepNoPaywall.vue deleted file mode 100644 index 5dc93702e..000000000 --- a/web/satellite/src/components/onboardingTour/steps/OverviewStepNoPaywall.vue +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2020 Storj Labs, Inc. -// See LICENSE for copying information. - - - - - - diff --git a/web/satellite/src/components/onboardingTour/steps/SaveApiKeyModal.vue b/web/satellite/src/components/onboardingTour/steps/SaveApiKeyModal.vue deleted file mode 100644 index 59bc9c6f1..000000000 --- a/web/satellite/src/components/onboardingTour/steps/SaveApiKeyModal.vue +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (C) 2020 Storj Labs, Inc. -// See LICENSE for copying information. - - - - - - diff --git a/web/satellite/src/components/onboardingTour/steps/UploadDataStep.vue b/web/satellite/src/components/onboardingTour/steps/UploadDataStep.vue deleted file mode 100644 index faebcbce0..000000000 --- a/web/satellite/src/components/onboardingTour/steps/UploadDataStep.vue +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright (C) 2020 Storj Labs, Inc. -// See LICENSE for copying information. - - - - - - diff --git a/web/satellite/src/components/onboardingTour/steps/overviewStepNoPaywall.html b/web/satellite/src/components/onboardingTour/steps/overviewStepNoPaywall.html deleted file mode 100644 index 6dee5e38e..000000000 --- a/web/satellite/src/components/onboardingTour/steps/overviewStepNoPaywall.html +++ /dev/null @@ -1,43 +0,0 @@ - - - -
-

Welcome to Storj

-

- You’re just a few steps away from uploading your first object to the 100% secure, decentralized cloud. Simply - add a payment method any time before your credit runs out to keep using Storj. -

-
-
- - project image -

Name Your Project

- - Projects are where buckets are created for storing data. - -
-
- - api keys image -

Create an API Key

- - Generate access to your project to upload data. - -
-
- - uplink image -

Upload Data

- - Store your data on the secure, decentralized cloud. - -
-
- -
diff --git a/web/satellite/src/components/onboardingTour/steps/overviewStepNoPaywall.scss b/web/satellite/src/components/onboardingTour/steps/overviewStepNoPaywall.scss deleted file mode 100644 index fc8135aae..000000000 --- a/web/satellite/src/components/onboardingTour/steps/overviewStepNoPaywall.scss +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (C) 2020 Storj Labs, Inc. -// See LICENSE for copying information. - -p, -h1, -h2 { - margin: 0; -} - -.overview-area { - width: auto; - padding: 75px; - display: flex; - flex-direction: column; - align-items: center; - justify-content: space-between; - font-family: 'font_regular', sans-serif; - background-color: #fff; - border-radius: 6px; - margin-top: 25px; - - &__title { - font-family: 'font_bold', sans-serif; - font-size: 32px; - line-height: 39px; - color: #1b2533; - margin-bottom: 25px; - } - - &__sub-title { - font-size: 16px; - line-height: 26px; - color: #354049; - margin-bottom: 60px; - text-align: center; - max-width: 815px; - } - - &__steps-area { - display: flex; - align-items: center; - justify-content: space-between; - margin-bottom: 50px; - - &__step { - display: flex; - flex-direction: column; - justify-content: space-between; - align-items: center; - position: relative; - max-width: 190px; - width: 190px; - - &__icon { - position: absolute; - top: -15px; - left: 80px; - } - - &__title { - font-size: 16px; - line-height: 26px; - text-align: center; - color: #354049; - margin: 15px 0 5px 0; - } - - &__subtitle { - font-family: 'font_regular', sans-serif; - font-size: 14px; - line-height: 17px; - text-align: center; - color: #61666b; - word-break: break-word; - } - } - } -} - -.second-step { - margin: 0 50px 0 50px; -} - -@media screen and (max-width: 1450px) { - - .overview-area { - padding: 75px 30px; - } - - .second-step { - margin: 0 20px 0 20px; - } -} - -@media screen and (max-width: 900px) { - - .overview-area { - - &__steps-area { - flex-direction: column; - - &__step { - margin: 0 0 30px 0; - } - } - } -} diff --git a/web/satellite/src/router/index.ts b/web/satellite/src/router/index.ts index a89a2da97..79e8c7a30 100644 --- a/web/satellite/src/router/index.ts +++ b/web/satellite/src/router/index.ts @@ -77,6 +77,10 @@ export abstract class RouteConfig { public static OverviewStep = new NavigationLink('overview', 'Onboarding Overview'); public static PaymentStep = new NavigationLink('payment', 'Onboarding Payment'); public static AccessGrant = new NavigationLink('access', 'Onboarding Access Grant'); + public static AccessGrantName = new NavigationLink('name', 'Onboarding Name Access Grant'); + public static AccessGrantPermissions = new NavigationLink('permissions', 'Onboarding Access Grant Permissions'); + public static AccessGrantPassphrase = new NavigationLink('create-passphrase', 'Onboarding Access Grant Create Passphrase'); + public static AccessGrantResult = new NavigationLink('result', 'Onboarding Access Grant Result'); // TODO: disabled until implementation // public static Referral = new NavigationLink('referral', 'Referral'); @@ -201,24 +205,24 @@ export const router = new Router({ component: CreateAccessGrantStep, children: [ { - path: RouteConfig.NameStep.path, - name: RouteConfig.NameStep.name, + path: RouteConfig.AccessGrantName.path, + name: RouteConfig.AccessGrantName.name, component: NameStep, }, { - path: RouteConfig.PermissionsStep.path, - name: RouteConfig.PermissionsStep.name, + path: RouteConfig.AccessGrantPermissions.path, + name: RouteConfig.AccessGrantPermissions.name, component: PermissionsStep, props: true, }, { - path: RouteConfig.CreatePassphraseStep.path, - name: RouteConfig.CreatePassphraseStep.name, + path: RouteConfig.AccessGrantPassphrase.path, + name: RouteConfig.AccessGrantPassphrase.name, component: CreatePassphraseStep, }, { - path: RouteConfig.ResultStep.path, - name: RouteConfig.ResultStep.name, + path: RouteConfig.AccessGrantResult.path, + name: RouteConfig.AccessGrantResult.name, component: ResultStep, }, ], diff --git a/web/satellite/src/utils/constants/onboardingTourEnums.ts b/web/satellite/src/utils/constants/onboardingTourEnums.ts index 43e4cec8a..4bfa2eeea 100644 --- a/web/satellite/src/utils/constants/onboardingTourEnums.ts +++ b/web/satellite/src/utils/constants/onboardingTourEnums.ts @@ -1,14 +1,6 @@ // Copyright (C) 2020 Storj Labs, Inc. // See LICENSE for copying information. -export enum TourState { - DEFAULT = 1, - ADDING_PAYMENT, - PROJECT, - API_KEY, - UPLOAD, -} - export enum AddingPaymentState { ADD_CARD = 1, ADD_STORJ, @@ -19,8 +11,3 @@ export enum AddingStorjState { VERIFYING, VERIFIED, } - -export enum AddingApiKeyState { - CREATE = 1, - COPY, -} diff --git a/web/satellite/src/views/DashboardArea.vue b/web/satellite/src/views/DashboardArea.vue index 958d3ab8a..ece2cd1f9 100644 --- a/web/satellite/src/views/DashboardArea.vue +++ b/web/satellite/src/views/DashboardArea.vue @@ -234,7 +234,7 @@ export default class DashboardArea extends Vue { * Indicates if no paywall info bar is shown. */ public get isNoPaywallInfoBarShown(): boolean { - const isOnboardingTour: boolean = this.$route.name === RouteConfig.OnboardingTour.name; + const isOnboardingTour: boolean = this.$route.path.includes(RouteConfig.OnboardingTour.path); return !this.isPaywallEnabled && !isOnboardingTour && this.$store.state.paymentsModule.balance.coins === 0 && diff --git a/web/satellite/static/images/onboardingTour/connectors.png b/web/satellite/static/images/onboardingTour/connectors.png deleted file mode 100644 index 31a6c7c1e..000000000 Binary files a/web/satellite/static/images/onboardingTour/connectors.png and /dev/null differ diff --git a/web/satellite/static/images/onboardingTour/info.svg b/web/satellite/static/images/onboardingTour/info.svg deleted file mode 100644 index f0dbe8630..000000000 --- a/web/satellite/static/images/onboardingTour/info.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/web/satellite/static/images/onboardingTour/orange-exclamation.svg b/web/satellite/static/images/onboardingTour/orange-exclamation.svg deleted file mode 100644 index 3e8812c99..000000000 --- a/web/satellite/static/images/onboardingTour/orange-exclamation.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/web/satellite/static/images/onboardingTour/s3.png b/web/satellite/static/images/onboardingTour/s3.png deleted file mode 100644 index ac6328f6d..000000000 Binary files a/web/satellite/static/images/onboardingTour/s3.png and /dev/null differ diff --git a/web/satellite/static/images/onboardingTour/uplinkcli.png b/web/satellite/static/images/onboardingTour/uplinkcli.png deleted file mode 100644 index 10f65841f..000000000 Binary files a/web/satellite/static/images/onboardingTour/uplinkcli.png and /dev/null differ diff --git a/web/satellite/tests/unit/navigationArea/NavigationArea.spec.ts b/web/satellite/tests/unit/navigationArea/NavigationArea.spec.ts index f3ad40f41..e5dae71a6 100644 --- a/web/satellite/tests/unit/navigationArea/NavigationArea.spec.ts +++ b/web/satellite/tests/unit/navigationArea/NavigationArea.spec.ts @@ -6,6 +6,7 @@ import Vuex from 'vuex'; import NavigationArea from '@/components/navigation/NavigationArea.vue'; import OnboardingTourArea from '@/components/onboardingTour/OnboardingTourArea.vue'; +import OverviewStep from '@/components/onboardingTour/steps/OverviewStep.vue'; import ProjectDashboard from '@/components/project/ProjectDashboard.vue'; import { RouteConfig } from '@/router'; @@ -37,11 +38,14 @@ describe('NavigationArea', () => { const router = new Router({ mode: 'history', routes: [{ - path: '/', + path: '/onboarding-tour', name: RouteConfig.OnboardingTour.name, component: OnboardingTourArea, }], }); + + router.push('/onboarding-tour'); + const wrapper = shallowMount(NavigationArea, { store, localVue, @@ -67,6 +71,8 @@ describe('NavigationArea', () => { const projects = await store.dispatch('fetchProjects'); store.commit(PROJECTS_MUTATIONS.SELECT_PROJECT, projects[0].id); + router.push('/'); + const wrapper = shallowMount(NavigationArea, { store, localVue, diff --git a/web/satellite/tests/unit/onboardingTour/ProgressBar.spec.ts b/web/satellite/tests/unit/onboardingTour/ProgressBar.spec.ts deleted file mode 100644 index 7f7fa726c..000000000 --- a/web/satellite/tests/unit/onboardingTour/ProgressBar.spec.ts +++ /dev/null @@ -1,76 +0,0 @@ -// 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 if paywall is enabled', (): void => { - const wrapper = mount(ProgressBar, { - propsData: { - isPaywallEnabled: true, - }, - }); - - expect(wrapper).toMatchSnapshot(); - }); - - it('renders correctly if paywall is disabled', (): void => { - const wrapper = mount(ProgressBar, { - propsData: { - isPaywallEnabled: false, - }, - }); - - expect(wrapper).toMatchSnapshot(); - }); - - it('renders correctly if add payment step is completed', (): void => { - const wrapper = mount(ProgressBar, { - propsData: { - isAddPaymentStep: true, - isPaywallEnabled: 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, - isPaywallEnabled: 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, - isPaywallEnabled: 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, - isPaywallEnabled: true, - }, - }); - - expect(wrapper.findAll('.completed-step').length).toBe(7); - expect(wrapper.findAll('.completed-font-color').length).toBe(4); - }); -}); diff --git a/web/satellite/tests/unit/onboardingTour/__snapshots__/ProgressBar.spec.ts.snap b/web/satellite/tests/unit/onboardingTour/__snapshots__/ProgressBar.spec.ts.snap deleted file mode 100644 index 7910edb70..000000000 --- a/web/satellite/tests/unit/onboardingTour/__snapshots__/ProgressBar.spec.ts.snap +++ /dev/null @@ -1,61 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ProgressBar.vue renders correctly if paywall is disabled 1`] = ` -
-
- - -
- -
-
-
- -
-
-
- -
-
-
- - Name Your Project - - Create an API Key - - Upload Data - -
-
-`; - -exports[`ProgressBar.vue renders correctly if paywall is enabled 1`] = ` -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- Add Payment - - Name Your Project - - Create an API Key - - Upload Data -
-
-`; diff --git a/web/satellite/tests/unit/onboardingTour/__snapshots__/onboardingTourArea.spec.ts.snap b/web/satellite/tests/unit/onboardingTour/__snapshots__/onboardingTourArea.spec.ts.snap index 545a201b1..9f8eccefb 100644 --- a/web/satellite/tests/unit/onboardingTour/__snapshots__/onboardingTourArea.spec.ts.snap +++ b/web/satellite/tests/unit/onboardingTour/__snapshots__/onboardingTourArea.spec.ts.snap @@ -9,13 +9,7 @@ exports[`OnboardingTourArea.vue renders correctly 1`] = `
- - - - - - - +
diff --git a/web/satellite/tests/unit/onboardingTour/onboardingTourArea.spec.ts b/web/satellite/tests/unit/onboardingTour/onboardingTourArea.spec.ts index 5c5425997..413286a58 100644 --- a/web/satellite/tests/unit/onboardingTour/onboardingTourArea.spec.ts +++ b/web/satellite/tests/unit/onboardingTour/onboardingTourArea.spec.ts @@ -6,6 +6,7 @@ import Vuex from 'vuex'; import OnboardingTourArea from '@/components/onboardingTour/OnboardingTourArea.vue'; import { PaymentsHttpApi } from '@/api/payments'; +import { router } from '@/router'; import { makePaymentsModule } from '@/store/modules/payments'; import { makeProjectsModule } from '@/store/modules/projects'; import { createLocalVue, shallowMount } from '@vue/test-utils'; @@ -27,6 +28,7 @@ describe('OnboardingTourArea.vue', () => { const wrapper = shallowMount(OnboardingTourArea, { store, localVue, + router, }); expect(wrapper).toMatchSnapshot(); diff --git a/web/satellite/tests/unit/onboardingTour/steps/CreateApiKeyStep.spec.ts b/web/satellite/tests/unit/onboardingTour/steps/CreateApiKeyStep.spec.ts deleted file mode 100644 index d68c2a16a..000000000 --- a/web/satellite/tests/unit/onboardingTour/steps/CreateApiKeyStep.spec.ts +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2020 Storj Labs, Inc. -// See LICENSE for copying information. - -import sinon from 'sinon'; -import Vuex from 'vuex'; - -import CreateApiKeyStep from '@/components/onboardingTour/steps/CreateApiKeyStep.vue'; - -import { makeApiKeysModule } from '@/store/modules/apiKeys'; -import { appStateModule } from '@/store/modules/appState'; -import { makeProjectsModule } from '@/store/modules/projects'; -import { ApiKeysPage } from '@/types/apiKeys'; -import { Project } from '@/types/projects'; -import { NotificatorPlugin } from '@/utils/plugins/notificator'; -import { SegmentioPlugin } from '@/utils/plugins/segment'; -import { createLocalVue, mount } from '@vue/test-utils'; - -import { ApiKeysMock } from '../../mock/api/apiKeys'; -import { ProjectsApiMock } from '../../mock/api/projects'; - -const localVue = createLocalVue(); -const notificationPlugin = new NotificatorPlugin(); -const segmentioPlugin = new SegmentioPlugin(); -const projectsApi = new ProjectsApiMock(); -const projectsModule = makeProjectsModule(projectsApi); -const apiKeysApi = new ApiKeysMock(); -const apiKeysModule = makeApiKeysModule(apiKeysApi); -apiKeysApi.setMockApiKeysPage(new ApiKeysPage()); -const project = new Project('id', 'projectName', 'projectDescription', 'test', 'testOwnerId', true); -projectsApi.setMockProjects([project]); - -localVue.use(Vuex); -localVue.use(notificationPlugin); -localVue.use(segmentioPlugin); - -const store = new Vuex.Store({ modules: { projectsModule, apiKeysModule, appStateModule }}); - -describe('CreateApiKeyStep.vue', () => { - it('renders correctly', (): void => { - const wrapper = mount(CreateApiKeyStep, { - store, - localVue, - }); - - expect(wrapper.findAll('.disabled').length).toBe(1); - expect(wrapper).toMatchSnapshot(); - }); - - it('create api key works correctly correctly', async (): Promise => { - const wrapper = mount(CreateApiKeyStep, { - store, - localVue, - }); - - await wrapper.vm.setApiKeyName('testName'); - await wrapper.vm.createApiKey(); - - expect(wrapper.findAll('.disabled').length).toBe(0); - expect(wrapper).toMatchSnapshot(); - }); -}); diff --git a/web/satellite/tests/unit/onboardingTour/steps/CreateProjectStep.spec.ts b/web/satellite/tests/unit/onboardingTour/steps/CreateProjectStep.spec.ts deleted file mode 100644 index 3caf59d19..000000000 --- a/web/satellite/tests/unit/onboardingTour/steps/CreateProjectStep.spec.ts +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (C) 2020 Storj Labs, Inc. -// See LICENSE for copying information. - -import sinon from 'sinon'; -import Vuex from 'vuex'; - -import CreateProjectStep from '@/components/onboardingTour/steps/CreateProjectStep.vue'; - -import { PaymentsHttpApi } from '@/api/payments'; -import { makePaymentsModule } from '@/store/modules/payments'; -import { makeProjectsModule } from '@/store/modules/projects'; -import { createLocalVue, mount, shallowMount } from '@vue/test-utils'; - -import { ProjectsApiMock } from '../../mock/api/projects'; - -const localVue = createLocalVue(); -localVue.use(Vuex); -const paymentsApi = new PaymentsHttpApi(); -const paymentsModule = makePaymentsModule(paymentsApi); -const projectsApi = new ProjectsApiMock(); -const projectsModule = makeProjectsModule(projectsApi); - -const store = new Vuex.Store({ modules: { paymentsModule, projectsModule }}); - -describe('CreateProjectStep.vue', () => { - it('renders correctly', (): void => { - const wrapper = shallowMount(CreateProjectStep, { - store, - localVue, - }); - - expect(wrapper).toMatchSnapshot(); - }); - - it('click works correctly', async (): Promise => { - const clickSpy = sinon.spy(); - const wrapper = mount(CreateProjectStep, { - store, - localVue, - }); - - wrapper.vm.createProjectClick = clickSpy; - - expect(wrapper.findAll('.disabled').length).toBe(1); - - await wrapper.vm.setProjectName('test'); - - expect(wrapper.findAll('.disabled').length).toBe(0); - - await wrapper.find('.create-project-button').trigger('click'); - - expect(clickSpy.callCount).toBe(1); - }); -}); diff --git a/web/satellite/tests/unit/onboardingTour/steps/SaveApiKeyModal.spec.ts b/web/satellite/tests/unit/onboardingTour/steps/SaveApiKeyModal.spec.ts deleted file mode 100644 index 81dc82396..000000000 --- a/web/satellite/tests/unit/onboardingTour/steps/SaveApiKeyModal.spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (C) 2020 Storj Labs, Inc. -// See LICENSE for copying information. - -import SaveApiKeyModal from '@/components/onboardingTour/steps/SaveApiKeyModal.vue'; - -import { mount } from '@vue/test-utils'; - -describe('SaveApiKeyModal.vue', () => { - it('renders correctly', (): void => { - const wrapper = mount(SaveApiKeyModal); - - expect(wrapper).toMatchSnapshot(); - }); -}); diff --git a/web/satellite/tests/unit/onboardingTour/steps/UploadDataStep.spec.ts b/web/satellite/tests/unit/onboardingTour/steps/UploadDataStep.spec.ts deleted file mode 100644 index 5a1990d17..000000000 --- a/web/satellite/tests/unit/onboardingTour/steps/UploadDataStep.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (C) 2020 Storj Labs, Inc. -// See LICENSE for copying information. - -import UploadDataStep from '@/components/onboardingTour/steps/UploadDataStep.vue'; - -import { createLocalVue, mount } from '@vue/test-utils'; - -const localVue = createLocalVue(); - -describe('UploadDataStep.vue', () => { - it('renders correctly', (): void => { - const wrapper = mount(UploadDataStep, { - localVue, - }); - - expect(wrapper).toMatchSnapshot(); - }); -}); diff --git a/web/satellite/tests/unit/onboardingTour/steps/__snapshots__/CreateApiKeyStep.spec.ts.snap b/web/satellite/tests/unit/onboardingTour/steps/__snapshots__/CreateApiKeyStep.spec.ts.snap deleted file mode 100644 index 6b33a87e7..000000000 --- a/web/satellite/tests/unit/onboardingTour/steps/__snapshots__/CreateApiKeyStep.spec.ts.snap +++ /dev/null @@ -1,85 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`CreateApiKeyStep.vue create api key works correctly correctly 1`] = ` -
-

Create an API Key

-

- API keys provide access to the project for creating buckets and uploading objects through the command line - interface. This will be your first API key, and you can always create more keys later on. -

-
-
-

Create API Key

- -
-
-
-
- -

API Key Name

-

- -
- -
- - -
-
-
- - - API Keys only appear here once. Copy and paste this key to your preferred method of storing secrets. -
-
testKey -
-
Copy
-
-
-
-

- We don’t record your API Keys, which are only displayed once when generated. If you loose this - key, it cannot be recovered – but you can always create new API Keys when needed. -

- -
-
Done
- -
-`; - -exports[`CreateApiKeyStep.vue renders correctly 1`] = ` -
-

Create an API Key

-

- API keys provide access to the project for creating buckets and uploading objects through the command line - interface. This will be your first API key, and you can always create more keys later on. -

-
-
-

Create API Key

- -
-
-
-
- -

API Key Name

-

- -
- -
- - -
-
-
Generate API Key
-
- - -
-
Done
- -
-`; diff --git a/web/satellite/tests/unit/onboardingTour/steps/__snapshots__/CreateProjectStep.spec.ts.snap b/web/satellite/tests/unit/onboardingTour/steps/__snapshots__/CreateProjectStep.spec.ts.snap deleted file mode 100644 index d1e5468cb..000000000 --- a/web/satellite/tests/unit/onboardingTour/steps/__snapshots__/CreateProjectStep.spec.ts.snap +++ /dev/null @@ -1,21 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`CreateProjectStep.vue renders correctly 1`] = ` -
-

Name Your Project

-

- Projects are where buckets are created for storing data. Within a Project, usage is tracked at the bucket - level and aggregated for billing. -

-
-
-

Project Details

- -
- - - -
- -
-`; diff --git a/web/satellite/tests/unit/onboardingTour/steps/__snapshots__/SaveApiKeyModal.spec.ts.snap b/web/satellite/tests/unit/onboardingTour/steps/__snapshots__/SaveApiKeyModal.spec.ts.snap deleted file mode 100644 index e6f69ae92..000000000 --- a/web/satellite/tests/unit/onboardingTour/steps/__snapshots__/SaveApiKeyModal.spec.ts.snap +++ /dev/null @@ -1,19 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`SaveApiKeyModal.vue renders correctly 1`] = ` -
-
- - -

Is Your API Key Saved?

-

- API Keys are only displayed once when generated. If you haven’t saved your key, go back to copy and - paste the API key to your preferred method of storing secrets (i.e. TextEdit, Keybase, etc.) -

-
-
Go Back
-
Yes, it's Saved!
-
-
-
-`; diff --git a/web/satellite/tests/unit/onboardingTour/steps/__snapshots__/UploadDataStep.spec.ts.snap b/web/satellite/tests/unit/onboardingTour/steps/__snapshots__/UploadDataStep.spec.ts.snap deleted file mode 100644 index 2174fccfe..000000000 --- a/web/satellite/tests/unit/onboardingTour/steps/__snapshots__/UploadDataStep.spec.ts.snap +++ /dev/null @@ -1,59 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`UploadDataStep.vue renders correctly 1`] = ` -
-
-

Upload Data

-

- From here, you’ll set up Tardigrade to store data for your project using our S3 Gateway, Uplink CLI, or - select from our growing library of connectors to build apps on Tardigrade. -

-
-
-

- Migrate Data from your Existing AWS buckets -

s3 gateway image -

- S3 Gateway -

-

- Make the switch with Tardigrade’s S3 Gateway. -

- S3 Gateway Docs - -
- -
-

- Use Tardigrade for your app’s storage layer -

connectors image -

- App Connectors -

-

- Integrate Tardigrade into your existing stack. -

- App Connectors - -
-
-
-
Go to Dashboard
- Need help? - - Contact support - -
-`;