From 9f3c2d0a0d9132ab7db63cc8e761de42b8fe41d8 Mon Sep 17 00:00:00 2001 From: Rahul Barwal Date: Thu, 27 Jun 2024 12:27:42 +0530 Subject: [PATCH 1/2] Disable custom widgets for airgapped environments --- app/client/src/widgets/CustomWidget/widget/index.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/client/src/widgets/CustomWidget/widget/index.tsx b/app/client/src/widgets/CustomWidget/widget/index.tsx index 58f7a3320a93..86657aae51c5 100644 --- a/app/client/src/widgets/CustomWidget/widget/index.tsx +++ b/app/client/src/widgets/CustomWidget/widget/index.tsx @@ -34,6 +34,7 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; import { Colors } from "constants/Colors"; import AnalyticsUtil from "@appsmith/utils/AnalyticsUtil"; import { DynamicHeight, type WidgetFeatures } from "utils/WidgetFeatures"; +import { isAirgapped } from "@appsmith/utils/airgapHelpers"; const StyledLink = styled(Link)` display: inline-block; @@ -55,6 +56,7 @@ class CustomWidget extends BaseWidget { tags: [WIDGET_TAGS.DISPLAY], searchTags: ["external"], isSearchWildcard: true, + hideCard: isAirgapped(), }; } From bf3b40a5c3c51a2271347967516a53655721f7a2 Mon Sep 17 00:00:00 2001 From: Rahul Barwal Date: Thu, 27 Jun 2024 12:37:42 +0530 Subject: [PATCH 2/2] Update tags to exclude custom widget tests for airgap environments --- .../Widgets/Custom/CustomWidgetDefaultComponent_spec.ts | 3 +-- .../Widgets/Custom/CustomWidgetEditorPropertyPane_spec.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Custom/CustomWidgetDefaultComponent_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Custom/CustomWidgetDefaultComponent_spec.ts index 4affed344fa2..94b740264599 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Custom/CustomWidgetDefaultComponent_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Custom/CustomWidgetDefaultComponent_spec.ts @@ -6,14 +6,13 @@ import { propPane, } from "../../../../../support/Objects/ObjectsCore"; -import { featureFlagIntercept } from "../../../../../support/Objects/FeatureFlags"; import EditorNavigation, { EntityType, } from "../../../../../support/Pages/EditorNavigation"; describe( "Custom widget Tests", - { tags: ["@tag.Widget", "@tag.Custom"] }, + { tags: ["@tag.Widget", "@tag.excludeForAirgap"] }, function () { before(() => { entityExplorer.DragDropWidgetNVerify("customwidget", 550, 100); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Custom/CustomWidgetEditorPropertyPane_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Custom/CustomWidgetEditorPropertyPane_spec.ts index fb8c2636ce0a..6805ad328817 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Custom/CustomWidgetEditorPropertyPane_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Custom/CustomWidgetEditorPropertyPane_spec.ts @@ -7,7 +7,7 @@ import { describe( "Custom widget Tests", - { tags: ["@tag.Widget", "@tag.Custom"] }, + { tags: ["@tag.Widget", "@tag.excludeForAirgap"] }, function () { before(() => { agHelper.AddDsl("customWidget");