From 4611912054e01fc084920d6111bf206858f200fe Mon Sep 17 00:00:00 2001 From: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com> Date: Wed, 17 Jan 2024 10:38:29 +0530 Subject: [PATCH] feat: removed welcome tour (#30294) ## Description This PR will be removing the welcome tour flow. The reason for removing this is because of new IDE redesign which will make this flow invalid. #### PR fixes following issue(s) Fixes https://github.com/appsmithorg/appsmith/issues/30082 #### Type of change - New feature (non-breaking change which adds functionality) ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [ ] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed ## Summary by CodeRabbit - **Refactor** - Removed guided tour feature from the Help menu and related components. - Cleaned up unused code and imports across various components. - Simplified the user interface by eliminating the Welcome Tour button. --- .../BugTests/Bug22281_WelcomeTour_spec.ts | 22 --- .../Onboarding/CreateNewApp_spec.js | 35 ----- .../ClientSide/Onboarding/GuidedTour_spec.js | 146 ------------------ .../FirstTimeUserOnboarding/HelpMenu.tsx | 16 +- app/client/src/pages/Editor/HelpButton.tsx | 20 --- .../src/pages/Home/LeftPaneBottomSection.tsx | 20 +-- 6 files changed, 2 insertions(+), 257 deletions(-) delete mode 100644 app/client/cypress/e2e/Regression/ClientSide/Onboarding/CreateNewApp_spec.js delete mode 100644 app/client/cypress/e2e/Regression/ClientSide/Onboarding/GuidedTour_spec.js diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug22281_WelcomeTour_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug22281_WelcomeTour_spec.ts index 8cea586af2..8927a97a7b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug22281_WelcomeTour_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug22281_WelcomeTour_spec.ts @@ -13,26 +13,4 @@ describe("Welcome tour spec", { tags: ["@tag.excludeForAirgap"] }, function () { //verify debugger is present _.agHelper.GetNAssertContains(_.locators._errorTab, "Errors"); }); - it("2. Bug: 22281: Debugger should not open by default in welcome tour", function () { - //Get back to application page - _.homePage.NavigateToHome(); - _.agHelper.WaitUntilEleAppear(_.homePage._homePageAppCreateBtn); - - // Temporary workaround until https://github.com/appsmithorg/appsmith/issues/24665 is fixed - _.agHelper.GenerateUUID(); - cy.get("@guid").then((uid) => { - _.homePage.CreateNewWorkspace("GuidedtourWorkspace" + uid); - _.homePage.CreateAppInWorkspace( - "GuidedtourWorkspace" + uid, - `GuidedtourApp${uid}`, - ); - _.homePage.NavigateToHome(); - }); - - //Start welcome tour - _.agHelper.GetNClick(_.homePage._welcomeTour); - _.agHelper.WaitUntilEleAppear(_.homePage._welcomeTourBuildingButton); - //Verify debugger is not present - _.agHelper.AssertElementAbsence(_.locators._errorTab); - }); }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Onboarding/CreateNewApp_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Onboarding/CreateNewApp_spec.js deleted file mode 100644 index e6fd969534..0000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Onboarding/CreateNewApp_spec.js +++ /dev/null @@ -1,35 +0,0 @@ -import { PageLeftPane } from "../../../../support/Pages/EditorNavigation"; -const guidedTourLocators = require("../../../../locators/GuidedTour.json"); -const commonlocators = require("../../../../locators/commonlocators.json"); -import homePage from "../../../../locators/HomePage"; -import * as _ from "../../../../support/Objects/ObjectsCore"; - -describe( - "Creating new app after discontinuing guided tour should not start the same", - { tags: ["@tag.excludeForAirgap"] }, - function () { - it("1. Creating new app after discontinuing guided tour should not start the same", function () { - // Start guided tour - _.homePage.NavigateToHome(); - - // Temporary workaround until https://github.com/appsmithorg/appsmith/issues/24665 is fixed - _.agHelper.GenerateUUID(); - cy.get("@guid").then((uid) => { - _.homePage.CreateNewWorkspace("GuidedtourWorkspace" + uid); - _.homePage.CreateAppInWorkspace( - "GuidedtourWorkspace" + uid, - `GuidedtourApp${uid}`, - ); - _.homePage.NavigateToHome(); - }); - - cy.get(guidedTourLocators.welcomeTour).click(); - cy.get(guidedTourLocators.startBuilding).should("be.visible"); - // Go back to applications page - cy.get(commonlocators.homeIcon).click({ force: true }); - cy.get(homePage.createNewAppButton).first().click(); - // Check if explorer is visible, explorer is collapsed initialy in guided tour - cy.get(PageLeftPane.locators.selector).should("be.visible"); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Onboarding/GuidedTour_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Onboarding/GuidedTour_spec.js deleted file mode 100644 index 4fea01baf2..0000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Onboarding/GuidedTour_spec.js +++ /dev/null @@ -1,146 +0,0 @@ -const guidedTourLocators = require("../../../../locators/GuidedTour.json"); -const onboardingLocators = require("../../../../locators/FirstTimeUserOnboarding.json"); -const explorerLocators = require("../../../../locators/explorerlocators.json"); -import { - agHelper, - locators, - entityExplorer, - propPane, - deployMode, - homePage, - dataSources, -} from "../../../../support/Objects/ObjectsCore"; -import { ObjectsRegistry as _ } from "../../../../support/Objects/Registry"; - -describe("excludeForAirgap", "Guided Tour", function () { - it("1. Guided tour should work when started from the editor", function () { - cy.generateUUID().then((uid) => { - cy.Signup(`${uid}@appsmith.com`, uid); - }); - cy.get(onboardingLocators.editorWelcomeTourBtn).should("be.visible"); - cy.get(onboardingLocators.editorWelcomeTourBtn).click(); - cy.get(onboardingLocators.welcomeTourBtn).should("be.visible"); - }); - - it("2. Guided Tour", function () { - // Start guided tour - homePage.NavigateToHome(); - cy.get(guidedTourLocators.welcomeTour).click(); - cy.get(guidedTourLocators.startBuilding).click(); - cy.get(explorerLocators.entityExplorer).should("not.be.visible"); - // Refresh the page to validate if the tour resumes - cy.reload(); - cy.get(".query-page").then(($ele) => { - if ($ele.find(guidedTourLocators.banner).length) { - cy.get(guidedTourLocators.banner).should("be.visible"); - } - }); - dataSources.SetQueryTimeout(); - // Step 1: Run query - dataSources.RunQuery(); - cy.get(guidedTourLocators.successButton).click(); - // Step 2: Select table widget - cy.xpath(_.EntityExplorer._entityNameInExplorer("CustomersTable")) - .first() - .click({ force: true }); - - // Step 3: Add binding to the tableData property - propPane.UpdatePropertyFieldValue( - "Table data", - "{{getCustomers.data}}", - true, - false, - ); - cy.get(guidedTourLocators.successButton).click(); - cy.get(guidedTourLocators.infoButton).click(); - // Renaming widgets // Commending below wait due to flakiness - //cy.wait("@updateWidgetName"); - // Step 4: Add binding to the defaultText property of NameInput - cy.wait(3000); - cy.get("body").then(($body) => { - if ($body.find(guidedTourLocators.hintButton).length > 0) { - cy.get(guidedTourLocators.hintButton).click(); - cy.wait(1000); //for NameInput to open - propPane.UpdatePropertyFieldValue( - "Default value", - "{{CustomersTable.selectedRow.name}}", - true, - false, - ); - } else { - cy.wait(1000); - cy.get(guidedTourLocators.inputfields) - .first() - .clear({ force: true }) - .click({ force: true }); //Name input - propPane.UpdatePropertyFieldValue( - "Default value", - "{{CustomersTable.selectedRow.name}}", - true, - false, - ); - } - }); - cy.get(guidedTourLocators.successButton).click(); - // Step 5: Add binding to the rest of the widgets in the container - cy.get(guidedTourLocators.inputfields) - .eq(1) - .clear({ force: true }) - .click({ force: true }); //Email input - propPane.UpdatePropertyFieldValue( - "Default value", - "{{CustomersTable.selectedRow.email}}", - true, - false, - ); - cy.xpath(_.EntityExplorer._entityNameInExplorer("CountryInput")) - .first() - .click({ force: true }); - - cy.wait(1000); - cy.get(guidedTourLocators.inputfields) - .eq(2) - .clear({ force: true }) - .click({ force: true }); //Country input - propPane.UpdatePropertyFieldValue( - "Default value", - "{{CustomersTable.selectedRow.country}}", - true, - false, - ); - cy.xpath(_.EntityExplorer._entityNameInExplorer("DisplayImage")) - .first() - .click({ force: true }); - - cy.get(guidedTourLocators.successButton).click(); - // Step 6: Drag and drop a widget - entityExplorer.DragNDropWidget("buttonwidget", 845, 750); - cy.get(guidedTourLocators.successButton).click(); - cy.get(guidedTourLocators.infoButton).click(); - // Step 7: Execute a query onClick - cy.executeDbQuery("updateCustomerInfo", "onClick"); - // Step 8: Execute getCustomers onSuccess - propPane.SelectActionByTitleAndValue( - "Execute a query", - "updateCustomerInfo.run", - ), - agHelper.GetNClick(propPane._actionAddCallback("success")); - cy.get(locators._dropDownValue("Execute a query")) - .click() - .wait(500) - .get("ul.bp3-menu") - .children() - .contains("getCustomers") - .click({ force: true }) - .wait(500); - agHelper.GetNClick(propPane._actionSelectorPopupClose); - - cy.get(guidedTourLocators.successButton).click(); - // Step 9: Deploy - deployMode.DeployApp(); - cy.get(guidedTourLocators.rating).should("be.visible"); - cy.get(guidedTourLocators.rating).eq(4).click(); - cy.get(guidedTourLocators.startBuilding).should("be.visible"); - cy.get(guidedTourLocators.startBuilding).click(); - }); -}); diff --git a/app/client/src/pages/Editor/FirstTimeUserOnboarding/HelpMenu.tsx b/app/client/src/pages/Editor/FirstTimeUserOnboarding/HelpMenu.tsx index 42c9b327fe..a23028b8c0 100644 --- a/app/client/src/pages/Editor/FirstTimeUserOnboarding/HelpMenu.tsx +++ b/app/client/src/pages/Editor/FirstTimeUserOnboarding/HelpMenu.tsx @@ -7,12 +7,10 @@ import { } from "@appsmith/constants/messages"; import moment from "moment"; import styled from "styled-components"; -import { triggerWelcomeTour } from "./Utils"; -import { useDispatch, useSelector } from "react-redux"; +import { useSelector } from "react-redux"; import { getCurrentUser } from "selectors/usersSelectors"; import { IntercomConsent } from "../HelpButton"; import classNames from "classnames"; -import AnalyticsUtil from "utils/AnalyticsUtil"; import { DOCS_BASE_URL } from "constants/ThirdPartyConstants"; const { appVersion, cloudHosting, intercomAppID } = getAppsmithConfigs(); @@ -58,7 +56,6 @@ function HelpMenu(props: { setShowIntercomConsent: (val: boolean) => void; showIntercomConsent: boolean; }) { - const dispatch = useDispatch(); const user = useSelector(getCurrentUser); return ( @@ -79,17 +76,6 @@ function HelpMenu(props: { Help & Resources
- {HELP_MENU_ITEMS.map((item) => { return (