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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## 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.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
albinAppsmith 2024-01-17 10:38:29 +05:30 committed by GitHub
parent 49d5615bfa
commit 4611912054
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 2 additions and 257 deletions

View File

@ -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);
});
});

View File

@ -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");
});
},
);

View File

@ -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();
});
});

View File

@ -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
</Text>
<div className="flex flex-wrap gap-2 mt-2">
<Button
data-testid="editor-welcome-tour"
kind="secondary"
onClick={() => {
triggerWelcomeTour(dispatch);
AnalyticsUtil.logEvent("SIGNPOSTING_WELCOME_TOUR_CLICK");
}}
startIcon={"guide"}
>
Try guided tour
</Button>
{HELP_MENU_ITEMS.map((item) => {
return (
<Button

View File

@ -31,12 +31,9 @@ import {
getSignpostingSetOverlay,
getSignpostingTooltipVisible,
getSignpostingUnreadSteps,
inGuidedTour,
} from "selectors/onboardingSelectors";
import SignpostingPopup from "pages/Editor/FirstTimeUserOnboarding/Modal";
import { showSignpostingModal } from "actions/onboardingActions";
import { triggerWelcomeTour } from "./FirstTimeUserOnboarding/Utils";
import { isAirgapped } from "@appsmith/utils/airgapHelpers";
import TooltipContent from "./FirstTimeUserOnboarding/TooltipContent";
import { getInstanceId } from "@appsmith/selectors/tenantSelectors";
import { updateIntercomConsent, updateUserDetails } from "actions/userActions";
@ -169,12 +166,10 @@ function HelpButton() {
const isFirstTimeUserOnboardingEnabled = useSelector(
getIsFirstTimeUserOnboardingEnabled,
);
const guidedTourEnabled = useSelector(inGuidedTour);
const showSignpostingTooltip = useSelector(getSignpostingTooltipVisible);
const onboardingModalOpen = useSelector(getFirstTimeUserOnboardingModal);
const unreadSteps = useSelector(getSignpostingUnreadSteps);
const setOverlay = useSelector(getSignpostingSetOverlay);
const isAirgappedInstance = isAirgapped();
const showUnreadSteps =
!!unreadSteps.length &&
isFirstTimeUserOnboardingEnabled &&
@ -256,21 +251,6 @@ function HelpButton() {
<IntercomConsent showIntercomConsent={setShowIntercomConsent} />
) : (
<>
{!isAirgappedInstance && !guidedTourEnabled && (
<>
<MenuItem
data-testid="editor-welcome-tour"
onSelect={() => {
triggerWelcomeTour(dispatch);
AnalyticsUtil.logEvent("HELP_MENU_WELCOME_TOUR_CLICK");
}}
startIcon="guide"
>
Try guided tour
</MenuItem>
<MenuSeparator />
</>
)}
{HELP_MENU_ITEMS.map((item) => (
<MenuItem
id={item.id}

View File

@ -1,5 +1,5 @@
import React, { useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import { useSelector } from "react-redux";
import styled from "styled-components";
import { MenuItem } from "design-system-old";
import {
@ -7,14 +7,10 @@ import {
APPSMITH_DISPLAY_VERSION,
createMessage,
DOCUMENTATION,
WELCOME_TOUR,
} from "@appsmith/constants/messages";
import { getIsFetchingApplications } from "@appsmith/selectors/applicationSelectors";
import { getOnboardingWorkspaces } from "selectors/onboardingSelectors";
import { getAppsmithConfigs } from "@appsmith/configs";
import AnalyticsUtil from "utils/AnalyticsUtil";
import { howMuchTimeBeforeText } from "utils/helpers";
import { onboardingCreateApplication } from "actions/onboardingActions";
import ProductUpdatesModal from "pages/Applications/ProductUpdatesModal";
import {
DropdownOnSelectActions,
@ -59,8 +55,6 @@ export const LeftPaneVersionData = styled.div`
`;
function LeftPaneBottomSection() {
const dispatch = useDispatch();
const onboardingWorkspaces = useSelector(getOnboardingWorkspaces);
const isFetchingApplications = useSelector(getIsFetchingApplications);
const { appVersion } = getAppsmithConfigs();
const howMuchTimeBefore = howMuchTimeBeforeText(appVersion.releaseDate);
@ -108,18 +102,6 @@ function LeftPaneBottomSection() {
}}
text={createMessage(DOCUMENTATION)}
/>
<MenuItem
containerClassName={"t--welcome-tour"}
icon="guide"
onSelect={() => {
if (!isFetchingApplications && !!onboardingWorkspaces.length) {
AnalyticsUtil.logEvent("WELCOME_TOUR_CLICK");
dispatch(onboardingCreateApplication());
}
}}
text={createMessage(WELCOME_TOUR)}
/>
<MenuItem
containerClassName={"t--product-updates-btn"}
data-testid="t--product-updates-btn"