From 9da3de1a89d05ebb41a590cf62ce2671c6e91d8c Mon Sep 17 00:00:00 2001 From: Vitalii Shpital Date: Thu, 23 Sep 2021 20:00:40 +0300 Subject: [PATCH] web/satellite, testsuite/satellite/ui: removed onb CLI flow's Generate AG step and updated tests Removed Generate access grant step. Updated according test and added Back button click test logic. Change-Id: I736eb4ecb4c3a2437c78af3f42da160b0f147d26 --- .../onboarding_wizard_CLI_flow_test.go | 82 +++++++++++++++-- .../onboarding_wizard_browser_test.go | 2 +- .../onboardingTour/steps/OverviewStep.vue | 2 +- .../onboardingTour/steps/cliFlow/CLISetup.vue | 2 +- .../steps/cliFlow/CreateBucket.vue | 2 +- .../steps/cliFlow/GenerateAG.vue | 89 ------------------- web/satellite/src/router/index.ts | 7 -- .../__snapshots__/OverviewStep.spec.ts.snap | 2 +- 8 files changed, 82 insertions(+), 106 deletions(-) delete mode 100644 web/satellite/src/components/onboardingTour/steps/cliFlow/GenerateAG.vue diff --git a/testsuite/ui/satellite/onboarding_wizard_CLI_flow_test.go b/testsuite/ui/satellite/onboarding_wizard_CLI_flow_test.go index 08a3c159f..947c680a4 100644 --- a/testsuite/ui/satellite/onboarding_wizard_CLI_flow_test.go +++ b/testsuite/ui/satellite/onboarding_wizard_CLI_flow_test.go @@ -42,56 +42,128 @@ func TestOnboardingWizardCLIFlow(t *testing.T) { page.Keyboard.MustPress(input.Enter) // Testing onboarding workflow uplinkCLI method + // Welcome screen page.MustElementX("(//span[text()=\"Continue in cli\"])").MustClick() + page.MustWaitNavigation() + + // API key generated screen apiKeyGeneratedTitle := page.MustElement("[aria-roledescription=title]").MustText() require.Contains(t, apiKeyGeneratedTitle, "API Key Generated") satelliteAddress := page.MustElement("[aria-roledescription=satellite-address]").MustText() require.NotEmpty(t, satelliteAddress) apiKey := page.MustElement("[aria-roledescription=api-key]").MustText() require.NotEmpty(t, apiKey) + page.MustElementX("(//span[text()=\"< Back\"])").MustClick() + page.MustWaitNavigation() + welcomeTitle := page.MustElement("[aria-roledescription=title]").MustText() + require.Contains(t, welcomeTitle, "Welcome") + page.MustElementX("(//span[text()=\"Continue in cli\"])").MustClick() page.MustElementX("(//span[text()=\"Next >\"])").MustClick() + page.MustWaitNavigation() + // API key generated screen cliInstallTitle := page.MustElement("[aria-roledescription=title]").MustText() require.Contains(t, cliInstallTitle, "Install Uplink CLI") + page.MustElementX("(//span[text()=\"< Back\"])").MustClick() + page.MustWaitNavigation() + apiKeyGeneratedTitle1 := page.MustElement("[aria-roledescription=title]").MustText() + require.Contains(t, apiKeyGeneratedTitle1, "API Key Generated") page.MustElementX("(//span[text()=\"Next >\"])").MustClick() + page.MustWaitNavigation() + page.MustElementX("(//span[text()=\"Next >\"])").MustClick() + page.MustWaitNavigation() + // CLI setup screen cliSetupTitle := page.MustElement("[aria-roledescription=title]").MustText() require.Contains(t, cliSetupTitle, "CLI Setup") + page.MustElementX("(//span[text()=\"< Back\"])").MustClick() + page.MustWaitNavigation() + cliInstallTitle1 := page.MustElement("[aria-roledescription=title]").MustText() + require.Contains(t, cliInstallTitle1, "Install Uplink CLI") page.MustElementX("(//span[text()=\"Next >\"])").MustClick() - - generateAccessGrantTitle := page.MustElement("[aria-roledescription=title]").MustText() - require.Contains(t, generateAccessGrantTitle, "Generate an Access Grant") + page.MustWaitNavigation() page.MustElementX("(//span[text()=\"Next >\"])").MustClick() + page.MustWaitNavigation() + // Create bucket screen createBucketTitle := page.MustElement("[aria-roledescription=title]").MustText() require.Contains(t, createBucketTitle, "Create a bucket") + page.MustElementX("(//span[text()=\"< Back\"])").MustClick() + page.MustWaitNavigation() + cliSetupTitle1 := page.MustElement("[aria-roledescription=title]").MustText() + require.Contains(t, cliSetupTitle1, "CLI Setup") page.MustElementX("(//span[text()=\"Next >\"])").MustClick() + page.MustWaitNavigation() + page.MustElementX("(//span[text()=\"Next >\"])").MustClick() + page.MustWaitNavigation() + // Ready to upload screen readyToUploadTitle := page.MustElement("[aria-roledescription=title]").MustText() require.Contains(t, readyToUploadTitle, "Ready to upload") + page.MustElementX("(//span[text()=\"< Back\"])").MustClick() + page.MustWaitNavigation() + createBucketTitle1 := page.MustElement("[aria-roledescription=title]").MustText() + require.Contains(t, createBucketTitle1, "Create a bucket") page.MustElementX("(//span[text()=\"Next >\"])").MustClick() + page.MustWaitNavigation() + page.MustElementX("(//span[text()=\"Next >\"])").MustClick() + page.MustWaitNavigation() + // List a bucket screen listTitle := page.MustElement("[aria-roledescription=title]").MustText() require.Contains(t, listTitle, "Listing a bucket") + page.MustElementX("(//span[text()=\"< Back\"])").MustClick() + page.MustWaitNavigation() + readyToUploadTitle1 := page.MustElement("[aria-roledescription=title]").MustText() + require.Contains(t, readyToUploadTitle1, "Ready to upload") page.MustElementX("(//span[text()=\"Next >\"])").MustClick() + page.MustWaitNavigation() + page.MustElementX("(//span[text()=\"Next >\"])").MustClick() + page.MustWaitNavigation() + // Download screen downloadTitle := page.MustElement("[aria-roledescription=title]").MustText() require.Contains(t, downloadTitle, "Download") + page.MustElementX("(//span[text()=\"< Back\"])").MustClick() + page.MustWaitNavigation() + listTitle1 := page.MustElement("[aria-roledescription=title]").MustText() + require.Contains(t, listTitle1, "Listing a bucket") page.MustElementX("(//span[text()=\"Next >\"])").MustClick() + page.MustWaitNavigation() + page.MustElementX("(//span[text()=\"Next >\"])").MustClick() + page.MustWaitNavigation() + // Share link screen shareLinkTitle := page.MustElement("[aria-roledescription=title]").MustText() require.Contains(t, shareLinkTitle, "Share a link") + page.MustElementX("(//span[text()=\"< Back\"])").MustClick() + page.MustWaitNavigation() + downloadTitle1 := page.MustElement("[aria-roledescription=title]").MustText() + require.Contains(t, downloadTitle1, "Download") page.MustElementX("(//span[text()=\"Next >\"])").MustClick() + page.MustWaitNavigation() + page.MustElementX("(//span[text()=\"Next >\"])").MustClick() + page.MustWaitNavigation() + // Success screen successTitle := page.MustElement("[aria-roledescription=title]").MustText() require.Contains(t, successTitle, "Wonderful") + page.MustElementX("(//span[text()=\"Finish\"])").MustClick() + page.MustWaitNavigation() + dashboardTitle := page.MustElement("[aria-roledescription=title]").MustText() + require.Contains(t, dashboardTitle, "My First Project Dashboard") + page.MustNavigateBack() + successTitle1 := page.MustElement("[aria-roledescription=title]").MustText() + require.Contains(t, successTitle1, "Wonderful") page.MustElementX("(//button[contains(., 'Upgrade')])").MustClick() + // Upgrade to pro account modal addPMModalTitle := page.MustElement("[aria-roledescription=modal-title]").MustText() require.Contains(t, addPMModalTitle, "Upgrade to Pro Account") page.MustElement(".close-cross-container").MustClick() - dashboardTitle := page.MustElement("[aria-roledescription=title]").MustText() - require.Contains(t, dashboardTitle, "My First Project Dashboard") + // Dashboard screen + dashboardTitle1 := page.MustElement("[aria-roledescription=title]").MustText() + require.Contains(t, dashboardTitle1, "My First Project Dashboard") }) } diff --git a/testsuite/ui/satellite/onboarding_wizard_browser_test.go b/testsuite/ui/satellite/onboarding_wizard_browser_test.go index 96a8a8a48..e4d41afa5 100644 --- a/testsuite/ui/satellite/onboarding_wizard_browser_test.go +++ b/testsuite/ui/satellite/onboarding_wizard_browser_test.go @@ -42,7 +42,7 @@ func TestOnboardingWizardBrowser(t *testing.T) { page.Keyboard.MustPress(input.Enter) // testing onboarding workflow browser - page.MustElementX("(//span[text()=\"CONTINUE IN WEB\"])").MustClick() + page.MustElementX("(//span[text()=\"Continue in web\"])").MustClick() objectBrowserWarning := page.MustElement("[aria-roledescription=sub-title]").MustText() require.Contains(t, objectBrowserWarning, "The object browser uses server side encryption.") page.MustElementX("(//span[text()=\"Continue\"])").MustClick() diff --git a/web/satellite/src/components/onboardingTour/steps/OverviewStep.vue b/web/satellite/src/components/onboardingTour/steps/OverviewStep.vue index c0f3240eb..7f9a30b7f 100644 --- a/web/satellite/src/components/onboardingTour/steps/OverviewStep.vue +++ b/web/satellite/src/components/onboardingTour/steps/OverviewStep.vue @@ -5,7 +5,7 @@
-

Welcome

+

Welcome

Let's get you started using Storj DCS

diff --git a/web/satellite/src/components/onboardingTour/steps/cliFlow/CLISetup.vue b/web/satellite/src/components/onboardingTour/steps/cliFlow/CLISetup.vue index 03d1d5fe0..d8cd32680 100644 --- a/web/satellite/src/components/onboardingTour/steps/cliFlow/CLISetup.vue +++ b/web/satellite/src/components/onboardingTour/steps/cliFlow/CLISetup.vue @@ -67,7 +67,7 @@ export default class CLISetup extends Vue { * Holds on next button click logic. */ public async onNextClick(): Promise { - await this.$router.push(RouteConfig.OnboardingTour.with(RouteConfig.OnbCLIStep.with(RouteConfig.GenerateAG)).path); + await this.$router.push(RouteConfig.OnboardingTour.with(RouteConfig.OnbCLIStep.with(RouteConfig.CreateBucket)).path); } } diff --git a/web/satellite/src/components/onboardingTour/steps/cliFlow/CreateBucket.vue b/web/satellite/src/components/onboardingTour/steps/cliFlow/CreateBucket.vue index dee7ffd35..1022108a7 100644 --- a/web/satellite/src/components/onboardingTour/steps/cliFlow/CreateBucket.vue +++ b/web/satellite/src/components/onboardingTour/steps/cliFlow/CreateBucket.vue @@ -55,7 +55,7 @@ export default class CreateBucket extends Vue { * Holds on back button click logic. */ public async onBackClick(): Promise { - await this.$router.push(RouteConfig.OnboardingTour.with(RouteConfig.OnbCLIStep.with(RouteConfig.GenerateAG)).path); + await this.$router.push(RouteConfig.OnboardingTour.with(RouteConfig.OnbCLIStep.with(RouteConfig.CLISetup)).path); } /** diff --git a/web/satellite/src/components/onboardingTour/steps/cliFlow/GenerateAG.vue b/web/satellite/src/components/onboardingTour/steps/cliFlow/GenerateAG.vue deleted file mode 100644 index 78f282874..000000000 --- a/web/satellite/src/components/onboardingTour/steps/cliFlow/GenerateAG.vue +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (C) 2021 Storj Labs, Inc. -// See LICENSE for copying information. - - - - - - diff --git a/web/satellite/src/router/index.ts b/web/satellite/src/router/index.ts index 3b02f0b88..13ce73294 100644 --- a/web/satellite/src/router/index.ts +++ b/web/satellite/src/router/index.ts @@ -38,7 +38,6 @@ import ProjectMembersArea from '@/components/team/ProjectMembersArea.vue'; import CLIInstall from "@/components/onboardingTour/steps/cliFlow/CLIInstall.vue"; import APIKey from "@/components/onboardingTour/steps/cliFlow/APIKey.vue"; import CLISetup from "@/components/onboardingTour/steps/cliFlow/CLISetup.vue"; -import GenerateAG from "@/components/onboardingTour/steps/cliFlow/GenerateAG.vue"; import CreateBucket from "@/components/onboardingTour/steps/cliFlow/CreateBucket.vue"; import UploadObject from "@/components/onboardingTour/steps/cliFlow/UploadObject.vue"; import ListObject from "@/components/onboardingTour/steps/cliFlow/ListObject.vue"; @@ -102,7 +101,6 @@ export abstract class RouteConfig { public static APIKey = new NavigationLink('api-key', 'Onboarding API Key'); public static CLIInstall = new NavigationLink('cli-install', 'Onboarding CLI Install'); public static CLISetup = new NavigationLink('cli-setup', 'Onboarding CLI Setup'); - public static GenerateAG = new NavigationLink('generate-ag', 'Onboarding Generate AG'); public static CreateBucket = new NavigationLink('create-bucket', 'Onboarding Create Bucket'); public static UploadObject = new NavigationLink('upload-object', 'Onboarding Upload Object'); public static ListObject = new NavigationLink('list-object', 'Onboarding List Object'); @@ -300,11 +298,6 @@ export const router = new Router({ name: RouteConfig.CLISetup.name, component: CLISetup, }, - { - path: RouteConfig.GenerateAG.path, - name: RouteConfig.GenerateAG.name, - component: GenerateAG, - }, { path: RouteConfig.CreateBucket.path, name: RouteConfig.CreateBucket.name, diff --git a/web/satellite/tests/unit/onboardingTour/steps/__snapshots__/OverviewStep.spec.ts.snap b/web/satellite/tests/unit/onboardingTour/steps/__snapshots__/OverviewStep.spec.ts.snap index 142015927..8b5c3e9be 100644 --- a/web/satellite/tests/unit/onboardingTour/steps/__snapshots__/OverviewStep.spec.ts.snap +++ b/web/satellite/tests/unit/onboardingTour/steps/__snapshots__/OverviewStep.spec.ts.snap @@ -8,7 +8,7 @@ exports[`OverviewStep.vue renders correctly 1`] = ` -

Welcome

+

Welcome