From d80fa0aeee660af3434db43bb486c9f4ade0cc57 Mon Sep 17 00:00:00 2001 From: Ayush Pahwa Date: Wed, 25 Oct 2023 22:59:28 +0700 Subject: [PATCH] fix: remove deploy messages for environments (#28335) ## Description PR to remove deploy warnings and messages for environments feature from the deploy flow #### PR fixes following issue(s) Fixes #27485 #### Type of change - Bug fix (non-breaking change which fixes an issue) ## 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 - [ ] My code follows the style guidelines of this project - [ ] 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 - [ ] 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 --- .../cypress/support/Pages/DeployModeHelper.ts | 15 --------------- .../ce/components/EnvDeployInfoModal/index.tsx | 3 --- .../ee/components/EnvDeployInfoModal/index.tsx | 1 - .../src/ee/components/EnvInfoHeader/index.tsx | 3 --- app/client/src/pages/Editor/EditorHeader.tsx | 14 +------------- .../gitSync/GitSyncModal/GitSyncModalV1.tsx | 2 -- .../gitSync/GitSyncModal/GitSyncModalV2.tsx | 2 -- app/client/src/pages/Editor/index.tsx | 2 -- 8 files changed, 1 insertion(+), 41 deletions(-) delete mode 100644 app/client/src/ce/components/EnvDeployInfoModal/index.tsx delete mode 100644 app/client/src/ee/components/EnvDeployInfoModal/index.tsx delete mode 100644 app/client/src/ee/components/EnvInfoHeader/index.tsx diff --git a/app/client/cypress/support/Pages/DeployModeHelper.ts b/app/client/cypress/support/Pages/DeployModeHelper.ts index d338b13366..2122ca36a0 100644 --- a/app/client/cypress/support/Pages/DeployModeHelper.ts +++ b/app/client/cypress/support/Pages/DeployModeHelper.ts @@ -31,9 +31,6 @@ export class DeployMode { private _backtoHome = ".t--app-viewer-navigation-header .t--app-viewer-back-to-apps-button"; private _homeAppsmithImage = "a.t--appsmith-logo"; - public envInfoModal = `[data-testid="t--env-info-modal"]`; - public envInfoModalDismissCheckbox = `[data-testid="t--env-info-dismiss-checkbox"]`; - public envInfoModalDeployButton = `[data-testid="t--env-info-modal-deploy-button"]`; //refering PublishtheApp from command.js public DeployApp( @@ -41,8 +38,6 @@ export class DeployMode { toCheckFailureToast = true, toValidateSavedState = true, addDebugFlag = true, - assertEnvInfoModal?: "present" | "absent", - dismissModal = false, ) { //cy.intercept("POST", "/api/v1/applications/publish/*").as("publishAppli"); @@ -53,16 +48,6 @@ export class DeployMode { this.assertHelper.AssertDocumentReady(); this.StubbingDeployPage(addDebugFlag); this.agHelper.ClickButton("Deploy"); - if (!!assertEnvInfoModal && assertEnvInfoModal === "present") { - this.agHelper.WaitUntilEleAppear(this.envInfoModal); - this.agHelper.AssertElementExist(this.envInfoModal); - if (dismissModal) { - this.agHelper.CheckUncheck(this.envInfoModalDismissCheckbox); - } - } else { - this.agHelper.AssertElementAbsence(this.envInfoModal); - } - this.agHelper.GetNClickIfPresent(this.envInfoModalDeployButton); this.agHelper.AssertElementAbsence(this.locator._btnSpinner, 10000); //to make sure we have started navigation from Edit page //cy.get("@windowDeployStub").should("be.calledOnce"); this.assertHelper.AssertDocumentReady(); diff --git a/app/client/src/ce/components/EnvDeployInfoModal/index.tsx b/app/client/src/ce/components/EnvDeployInfoModal/index.tsx deleted file mode 100644 index 0c7efe638b..0000000000 --- a/app/client/src/ce/components/EnvDeployInfoModal/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export function EnvDeployInfoModal() { - return null; -} diff --git a/app/client/src/ee/components/EnvDeployInfoModal/index.tsx b/app/client/src/ee/components/EnvDeployInfoModal/index.tsx deleted file mode 100644 index 7b67dfa3c5..0000000000 --- a/app/client/src/ee/components/EnvDeployInfoModal/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export * from "ce/components/EnvDeployInfoModal"; diff --git a/app/client/src/ee/components/EnvInfoHeader/index.tsx b/app/client/src/ee/components/EnvInfoHeader/index.tsx deleted file mode 100644 index 6fd41fa2b7..0000000000 --- a/app/client/src/ee/components/EnvInfoHeader/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export function EnvInfoHeader() { - return null; -} diff --git a/app/client/src/pages/Editor/EditorHeader.tsx b/app/client/src/pages/Editor/EditorHeader.tsx index accb5fd1d0..9b69869eea 100644 --- a/app/client/src/pages/Editor/EditorHeader.tsx +++ b/app/client/src/pages/Editor/EditorHeader.tsx @@ -67,8 +67,6 @@ import { useHref } from "./utils"; import { getAppsmithConfigs } from "@appsmith/configs"; import { getIsAppSettingsPaneWithNavigationTabOpen } from "selectors/appSettingsPaneSelectors"; import type { NavigationSetting } from "constants/AppConstants"; -import { getUserPreferenceFromStorage } from "@appsmith/utils/Environments"; -import { showEnvironmentDeployInfoModal } from "@appsmith/actions/environmentAction"; import CommunityTemplatesPublishInfo from "./CommunityTemplates/Modals/CommunityTemplatesPublishInfo"; import PublishCommunityTemplateModal from "./CommunityTemplates/Modals/PublishCommunityTemplate"; import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; @@ -115,9 +113,6 @@ export function EditorHeader() { const [isPopoverOpen, setIsPopoverOpen] = useState(false); const [showModal, setShowModal] = useState(false); - const isMultipleEnvEnabled = useFeatureFlag( - FEATURE_FLAG.release_datasource_environments_enabled, - ); const [ showPublishCommunityTemplateModal, setShowPublishCommunityTemplateModal, @@ -176,14 +171,7 @@ export function EditorHeader() { : "Application name menu (top left)", }); } else { - if ( - !isMultipleEnvEnabled || - getUserPreferenceFromStorage() === "true" - ) { - handlePublish(); - } else { - dispatch(showEnvironmentDeployInfoModal()); - } + handlePublish(); } }, [dispatch, handlePublish], diff --git a/app/client/src/pages/Editor/gitSync/GitSyncModal/GitSyncModalV1.tsx b/app/client/src/pages/Editor/gitSync/GitSyncModal/GitSyncModalV1.tsx index cf5791485e..135815936f 100644 --- a/app/client/src/pages/Editor/gitSync/GitSyncModal/GitSyncModalV1.tsx +++ b/app/client/src/pages/Editor/gitSync/GitSyncModal/GitSyncModalV1.tsx @@ -17,7 +17,6 @@ import GitErrorPopup from "../components/GitErrorPopup"; import styled from "styled-components"; import AnalyticsUtil from "utils/AnalyticsUtil"; import { Modal, ModalContent, ModalHeader } from "design-system"; -import { EnvInfoHeader } from "@appsmith/components/EnvInfoHeader"; import { createMessage, GIT_CONNECTION, @@ -154,7 +153,6 @@ function GitSyncModalV1(props: { isImport?: boolean }) { {MENU_ITEMS_MAP[activeTabKey]?.modalTitle ?? ""} - {isDeploying && } diff --git a/app/client/src/pages/Editor/gitSync/GitSyncModal/GitSyncModalV2.tsx b/app/client/src/pages/Editor/gitSync/GitSyncModal/GitSyncModalV2.tsx index ed2732b630..78e13c493c 100644 --- a/app/client/src/pages/Editor/gitSync/GitSyncModal/GitSyncModalV2.tsx +++ b/app/client/src/pages/Editor/gitSync/GitSyncModal/GitSyncModalV2.tsx @@ -24,7 +24,6 @@ import { } from "@appsmith/constants/messages"; import AnalyticsUtil from "utils/AnalyticsUtil"; import { Modal, ModalContent, ModalHeader } from "design-system"; -import { EnvInfoHeader } from "@appsmith/components/EnvInfoHeader"; import GitConnectionV2 from "../Tabs/GitConnectionV2"; import GitSettings from "../Tabs/GitSettings"; import { GitSyncModalTab } from "entities/GitSync"; @@ -128,7 +127,6 @@ function GitSyncModalV2({ isImport = false }: GitSyncModalV2Props) { {modalTitle[activeTabKey] || gitMetadata?.repoName} - {isDeploying && } {isGitConnected && } {possibleMenuOptions.includes(activeTabKey) && ( { -