From 9c009d8a68d05dc94c4a48438824ab18c1292152 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Wed, 11 Sep 2024 15:38:35 +0530 Subject: [PATCH 01/10] chore: removed occurrences of old flags --- .../PropertyPaneSlashCommand_spec.ts | 11 ----------- .../JSEnabledByDefaultExperiment_spec.ts | 5 ----- app/client/cypress/support/e2e.js | 2 -- app/client/src/ce/entities/FeatureFlag.ts | 6 ------ .../CodeEditor/codeEditorUtils.ts | 8 -------- .../PartialExportModal/unitTestUtils.ts | 4 ---- .../useSource/useConnectToOptions.tsx | 15 +-------------- .../src/constants/WalkthroughConstants.ts | 2 -- .../Editor/DatasourceInfo/QueryTemplates.tsx | 18 +----------------- .../PropertyPane/PropertyControlsGenerator.tsx | 7 ++++++- .../MultiSelectWidgetV2/widget/index.tsx | 7 +------ .../src/widgets/SelectWidget/widget/index.tsx | 8 ++------ .../src/widgets/TableWidgetV2/widget/index.tsx | 8 +------- 13 files changed, 12 insertions(+), 89 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/PropertyPaneSlashCommand_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/PropertyPaneSlashCommand_spec.ts index 31f4b1c7feb..4271fef029d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/PropertyPaneSlashCommand_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/PropertyPaneSlashCommand_spec.ts @@ -1,12 +1,7 @@ -import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags"; import { agHelper, locators, - entityExplorer, propPane, - draggableWidgets, - apiPage, - entityItems, homePage, assertHelper, } from "../../../../support/Objects/ObjectsCore"; @@ -15,12 +10,6 @@ import EditorNavigation, { } from "../../../../support/Pages/EditorNavigation"; describe("Property Pane Suggestions", { tags: ["@tag.JS"] }, () => { - before(() => { - featureFlagIntercept({ - ab_learnability_ease_of_initial_use_enabled: true, - }); - }); - before(function () { agHelper.ClearLocalStorageCache(); }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/JSEnabledByDefaultExperiment_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/JSEnabledByDefaultExperiment_spec.ts index b1da841ffe3..45a89965b27 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/JSEnabledByDefaultExperiment_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/JSEnabledByDefaultExperiment_spec.ts @@ -1,5 +1,4 @@ import OneClickBindingLocator from "../../../../locators/OneClickBindingLocator"; -import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags"; import { agHelper, apiPage, @@ -23,10 +22,6 @@ describe( () => { let datasourceName: string; before(() => { - featureFlagIntercept({ - rollout_js_enabled_one_click_binding_enabled: true, - }); - dataSources.CreateDataSource("Postgres"); cy.get("@dsName").then((dsName) => { diff --git a/app/client/cypress/support/e2e.js b/app/client/cypress/support/e2e.js index eb8b6adae26..dc381136afc 100644 --- a/app/client/cypress/support/e2e.js +++ b/app/client/cypress/support/e2e.js @@ -139,8 +139,6 @@ before(function () { if (!Cypress.currentTest.titlePath[0].includes(WALKTHROUGH_TEST_PAGE)) { // Adding key FEATURE_WALKTHROUGH (which is used to check if the walkthrough is already shown to the user or not) for non walkthrough cypress tests (to not show walkthrough) addIndexedDBKey(FEATURE_WALKTHROUGH_INDEX_KEY, { - ab_ds_binding_enabled: true, - ab_ds_schema_enabled: true, binding_widget: true, }); } diff --git a/app/client/src/ce/entities/FeatureFlag.ts b/app/client/src/ce/entities/FeatureFlag.ts index 69ac4b7e9c6..d81877b448e 100644 --- a/app/client/src/ce/entities/FeatureFlag.ts +++ b/app/client/src/ce/entities/FeatureFlag.ts @@ -36,11 +36,7 @@ export const FEATURE_FLAG = { "release_drag_drop_building_blocks_enabled", release_table_cell_label_value_enabled: "release_table_cell_label_value_enabled", - rollout_js_enabled_one_click_binding_enabled: - "rollout_js_enabled_one_click_binding_enabled", rollout_side_by_side_enabled: "rollout_side_by_side_enabled", - ab_learnability_ease_of_initial_use_enabled: - "ab_learnability_ease_of_initial_use_enabled", ab_learnability_discoverability_collapse_all_except_data_enabled: "ab_learnability_discoverability_collapse_all_except_data_enabled", release_layout_conversion_enabled: "release_layout_conversion_enabled", @@ -77,9 +73,7 @@ export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = { ab_appsmith_ai_query: false, release_actions_redesign_enabled: false, rollout_remove_feature_walkthrough_enabled: true, - rollout_js_enabled_one_click_binding_enabled: true, rollout_side_by_side_enabled: false, - ab_learnability_ease_of_initial_use_enabled: true, ab_learnability_discoverability_collapse_all_except_data_enabled: true, release_layout_conversion_enabled: false, release_anvil_toggle_enabled: false, diff --git a/app/client/src/components/editorComponents/CodeEditor/codeEditorUtils.ts b/app/client/src/components/editorComponents/CodeEditor/codeEditorUtils.ts index 0e82d7fe88f..08e13a6cb27 100644 --- a/app/client/src/components/editorComponents/CodeEditor/codeEditorUtils.ts +++ b/app/client/src/components/editorComponents/CodeEditor/codeEditorUtils.ts @@ -4,9 +4,6 @@ import type { WidgetEntity, ActionEntity } from "ee/entities/DataTree/types"; import { trim } from "lodash"; import { getDynamicStringSegments } from "utils/DynamicBindingUtils"; import { EditorSize } from "./EditorConfig"; -import { selectFeatureFlagCheck } from "ee/selectors/featureFlagsSelectors"; -import store from "store"; -import { FEATURE_FLAG } from "ee/entities/FeatureFlag"; import { SlashCommandMenuOnFocusWidgetProps } from "./constants"; // TODO: Fix this the next time the file is edited @@ -157,12 +154,7 @@ export function shouldShowSlashCommandMenu( widgetType: string = "", propertyPath: string = "", ) { - const isEaseOfUseFlagEnabled = selectFeatureFlagCheck( - store.getState(), - FEATURE_FLAG.ab_learnability_ease_of_initial_use_enabled, - ); return ( - !!isEaseOfUseFlagEnabled && !!SlashCommandMenuOnFocusWidgetProps[widgetType] && SlashCommandMenuOnFocusWidgetProps[widgetType].includes(propertyPath) ); diff --git a/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts b/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts index d066f825510..5176adc300e 100644 --- a/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts +++ b/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts @@ -12757,12 +12757,10 @@ export const defaultAppState = { release_datasource_environments_enabled: false, release_appnavigationlogoupload_enabled: false, release_embed_hide_share_settings_enabled: false, - ab_gsheet_schema_enabled: true, release_table_serverside_filtering_enabled: false, license_branding_enabled: false, license_sso_saml_enabled: false, license_sso_oidc_enabled: false, - ab_mock_mongo_schema_enabled: true, license_private_embeds_enabled: false, release_show_publish_app_to_community_enabled: false, license_gac_enabled: false, @@ -12777,7 +12775,6 @@ export const defaultAppState = { release_side_by_side_ide_enabled: false, release_global_add_pane_enabled: false, license_git_unlimited_repo_enabled: false, - ab_ds_binding_enabled: true, ask_ai_js: false, license_connection_pool_size_enabled: false, release_widgetdiscovery_enabled: false, @@ -12788,7 +12785,6 @@ export const defaultAppState = { license_audit_logs_enabled: false, ask_ai_sql: false, release_query_module_enabled: false, - ab_ds_schema_enabled: true, ab_onboarding_flow_start_with_data_dev_only_enabled: false, license_session_limit_enabled: false, rollout_datasource_test_rate_limit_enabled: false, diff --git a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/DatasourceDropdown/useSource/useConnectToOptions.tsx b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/DatasourceDropdown/useSource/useConnectToOptions.tsx index d63ebc1918a..235723e2414 100644 --- a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/DatasourceDropdown/useSource/useConnectToOptions.tsx +++ b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/DatasourceDropdown/useSource/useConnectToOptions.tsx @@ -22,9 +22,6 @@ import type { ModuleInstanceData, ModuleInstanceDataState, } from "ee/constants/ModuleInstanceConstants"; -import { selectFeatureFlagCheck } from "ee/selectors/featureFlagsSelectors"; -import { FEATURE_FLAG } from "ee/entities/FeatureFlag"; -import type { AppState } from "ee/reducers"; import type { Module } from "ee/constants/ModuleConstants"; import { getAllModules } from "ee/selectors/modulesSelector"; import { getModuleIcon } from "pages/Editor/utils"; @@ -162,13 +159,6 @@ function useConnectToOptions(props: ConnectToOptionsProps) { const queries = useSelector(getCurrentActions); const pluginsPackageNamesMap = useSelector(getPluginIdPackageNamesMap); - const isJSEnabledByDefaultOnForOneClickBinding = useSelector( - (state: AppState) => - selectFeatureFlagCheck( - state, - FEATURE_FLAG.rollout_js_enabled_one_click_binding_enabled, - ), - ); const { pluginImages, widget } = props; @@ -197,10 +187,7 @@ function useConnectToOptions(props: ConnectToOptionsProps) { value: getBindingValue(widget, query), icon: getQueryIcon(query, pluginImages, modules), onSelect: function (value?: string, valueOption?: DropdownOptionType) { - addBinding( - valueOption?.value, - !!isJSEnabledByDefaultOnForOneClickBinding, - ); + addBinding(valueOption?.value, true); updateConfig({ datasource: "", diff --git a/app/client/src/constants/WalkthroughConstants.ts b/app/client/src/constants/WalkthroughConstants.ts index 9c646039241..7adfdc3645c 100644 --- a/app/client/src/constants/WalkthroughConstants.ts +++ b/app/client/src/constants/WalkthroughConstants.ts @@ -1,6 +1,4 @@ export const FEATURE_WALKTHROUGH_KEYS = { - ds_binding: "ab_ds_binding_enabled", - ds_schema: "ab_ds_schema_enabled", binding_widget: "binding_widget", env_walkthrough: "ab_env_walkthrough_enabled", // Signposting keys diff --git a/app/client/src/pages/Editor/DatasourceInfo/QueryTemplates.tsx b/app/client/src/pages/Editor/DatasourceInfo/QueryTemplates.tsx index 15e2c13a9a5..93439d694c1 100644 --- a/app/client/src/pages/Editor/DatasourceInfo/QueryTemplates.tsx +++ b/app/client/src/pages/Editor/DatasourceInfo/QueryTemplates.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useContext } from "react"; +import React, { useCallback } from "react"; import { useDispatch, useSelector } from "react-redux"; import { createActionRequest } from "actions/pluginActionActions"; import type { AppState } from "ee/reducers"; @@ -21,15 +21,12 @@ import { integrationEditorURL } from "ee/RouteBuilder"; import { MenuItem, Tag } from "@appsmith/ads"; import type { Plugin } from "api/PluginApi"; -import WalkthroughContext from "components/featureWalkthrough/walkthroughContext"; -import { setFeatureWalkthroughShown } from "utils/storage"; import styled from "styled-components"; import { change, getFormValues } from "redux-form"; import { QUERY_EDITOR_FORM_NAME } from "ee/constants/forms"; import { diff } from "deep-diff"; import { UndoRedoToastContext, showUndoRedoToast } from "utils/replayHelpers"; import AnalyticsUtil from "ee/utils/AnalyticsUtil"; -import { FEATURE_WALKTHROUGH_KEYS } from "constants/WalkthroughConstants"; import { SUGGESTED_TAG, createMessage } from "ee/constants/messages"; import { transformTextToSentenceCase } from "pages/Editor/utils"; @@ -59,8 +56,6 @@ const TemplateMenuItem = styled(MenuItem)` export function QueryTemplates(props: QueryTemplatesProps) { const dispatch = useDispatch(); - const { isOpened: isWalkthroughOpened, popFeature } = - useContext(WalkthroughContext) || {}; const applicationId = useSelector(getCurrentApplicationId); const actions = useSelector((state: AppState) => state.entities.actions); const basePageId = useSelector(getCurrentBasePageId); @@ -109,11 +104,6 @@ export function QueryTemplates(props: QueryTemplatesProps) { }), ); - if (isWalkthroughOpened) { - popFeature && popFeature("SCHEMA_QUERY_CREATE"); - setFeatureWalkthroughShown(FEATURE_WALKTHROUGH_KEYS.ds_schema, true); - } - history.push( integrationEditorURL({ basePageId, @@ -166,14 +156,8 @@ export function QueryTemplates(props: QueryTemplatesProps) { datasourceId: props.datasourceId, pluginName: plugin?.name || "", templateCommand: template?.title, - isWalkthroughOpened, }); - if (isWalkthroughOpened) { - popFeature && popFeature("SCHEMA_QUERY_UPDATE"); - setFeatureWalkthroughShown(FEATURE_WALKTHROUGH_KEYS.ds_schema, true); - } - showUndoRedoToast( currentAction.name, false, diff --git a/app/client/src/pages/Editor/PropertyPane/PropertyControlsGenerator.tsx b/app/client/src/pages/Editor/PropertyPane/PropertyControlsGenerator.tsx index 13260cf4bcb..ad0dd01354b 100644 --- a/app/client/src/pages/Editor/PropertyPane/PropertyControlsGenerator.tsx +++ b/app/client/src/pages/Editor/PropertyPane/PropertyControlsGenerator.tsx @@ -19,6 +19,7 @@ import { getWidgetEnhancementSelector } from "selectors/widgetEnhancementSelecto import equal from "fast-deep-equal/es6"; import { FEATURE_FLAG } from "ee/entities/FeatureFlag"; import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; +import { isAirgapped } from "ee/utils/airgapHelpers"; export interface PropertyControlsGeneratorProps { id: string; @@ -103,10 +104,14 @@ function PropertyControlsGenerator(props: PropertyControlsGeneratorProps) { // eslint-disable-next-line @typescript-eslint/no-explicit-any const widgetProps: any = useSelector(getWidgetPropsForPropertyPane); - const isCollapseAllExceptDataEnabled: boolean = useFeatureFlag( + const isCollapseAllExceptDataEnabledFlag: boolean = useFeatureFlag( FEATURE_FLAG.ab_learnability_discoverability_collapse_all_except_data_enabled, ); + const isCollapseAllExceptDataEnabled = isAirgapped() + ? true + : isCollapseAllExceptDataEnabledFlag; + const enhancementSelector = getWidgetEnhancementSelector( widgetProps?.widgetId, ); diff --git a/app/client/src/widgets/MultiSelectWidgetV2/widget/index.tsx b/app/client/src/widgets/MultiSelectWidgetV2/widget/index.tsx index 18f30c8e577..d23d86e73cd 100644 --- a/app/client/src/widgets/MultiSelectWidgetV2/widget/index.tsx +++ b/app/client/src/widgets/MultiSelectWidgetV2/widget/index.tsx @@ -179,12 +179,7 @@ class MultiSelectWidget extends BaseWidget< onFilterUpdate: queryConfig.select.run, }; - if ( - !!MultiSelectWidget.getFeatureFlag( - FEATURE_FLAG.rollout_js_enabled_one_click_binding_enabled, - ) - ) - dynamicPropertyPathList.push({ key: "sourceData" }); + dynamicPropertyPathList.push({ key: "sourceData" }); } return { diff --git a/app/client/src/widgets/SelectWidget/widget/index.tsx b/app/client/src/widgets/SelectWidget/widget/index.tsx index 4e65799a9f1..95cd41d664d 100644 --- a/app/client/src/widgets/SelectWidget/widget/index.tsx +++ b/app/client/src/widgets/SelectWidget/widget/index.tsx @@ -161,12 +161,8 @@ class SelectWidget extends BaseWidget { serverSideFiltering: true, onFilterUpdate: queryConfig.select.run, }; - if ( - !!SelectWidget.getFeatureFlag( - FEATURE_FLAG.rollout_js_enabled_one_click_binding_enabled, - ) - ) - dynamicPropertyPathList.push({ key: "sourceData" }); + + dynamicPropertyPathList.push({ key: "sourceData" }); } return { diff --git a/app/client/src/widgets/TableWidgetV2/widget/index.tsx b/app/client/src/widgets/TableWidgetV2/widget/index.tsx index 7dfcf3be81b..e07be46a2ef 100644 --- a/app/client/src/widgets/TableWidgetV2/widget/index.tsx +++ b/app/client/src/widgets/TableWidgetV2/widget/index.tsx @@ -138,7 +138,6 @@ import { } from "layoutSystems/common/utils/constants"; import IconSVG from "../icon.svg"; import ThumbnailSVG from "../thumbnail.svg"; -import { FEATURE_FLAG } from "ee/entities/FeatureFlag"; import { klonaRegularWithTelemetry } from "utils/helpers"; const ReactTableComponent = lazy(async () => @@ -274,12 +273,7 @@ class TableWidgetV2 extends BaseWidget { isVisibleDownload: false, }); - if ( - !!TableWidgetV2.getFeatureFlag( - FEATURE_FLAG.rollout_js_enabled_one_click_binding_enabled, - ) - ) - dynamicPropertyPathList.push({ key: "tableData" }); + dynamicPropertyPathList.push({ key: "tableData" }); } if (queryConfig.create) { From 17865236b346041af6c316351dd18da1a8f62e5c Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 30 Sep 2024 14:33:26 +0530 Subject: [PATCH 02/10] fix: failed test cases with feature flags removal --- .../InputWidget_TableV2_Sorting_spec.js | 3 ++- ...eV2Widget_selectedRow_Input_widget_spec.js | 1 + .../Binding/TableV2_ClientSide_Search_spec.js | 1 + .../TableV2_DefaultSearch_Input_spec.js | 1 + .../TableV2_Widget_API_Pagination_spec.js | 1 + .../ClientSide/Binding/TextTableV2_spec.js | 1 + .../Widgets/TableV2/AddNewRow1_spec.js | 6 +++++ .../Widgets/TableV2/Edge_case_spec.js | 1 + .../Widgets/TableV2/TableV2Filter1_1_Spec.ts | 1 + .../Widgets/TableV2/TableV2Filter1_2_Spec.ts | 1 + .../Widgets/TableV2/TableV2Filter2_1_Spec.ts | 1 + .../Widgets/TableV2/TableV2Filter2_2_Spec.ts | 1 + .../TableV2/TableV2_DisplayText_spec.ts | 1 + .../TableV2/TableV2_MultiRowSelect_spec.js | 1 + .../Widgets/TableV2/TableV2_spec.js | 4 ++++ .../TableV2/columnTypes/checkboxCell_spec.js | 1 + .../TableV2/columnTypes/switchCell_spec.js | 2 ++ .../TableV2/server_side_filtering_spec_1.ts | 1 + app/client/cypress/limited-tests.txt | 24 ++++++++++++++++++- .../cypress/support/Objects/FeatureFlags.ts | 1 - app/client/cypress/support/Pages/Table.ts | 16 +++++++++++++ app/client/src/ce/entities/FeatureFlag.ts | 3 --- .../PropertyControlsGenerator.tsx | 13 +--------- 23 files changed, 68 insertions(+), 18 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/InputWidget_TableV2_Sorting_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/InputWidget_TableV2_Sorting_spec.js index ba5b040609b..91f37fbd714 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/InputWidget_TableV2_Sorting_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/InputWidget_TableV2_Sorting_spec.js @@ -7,6 +7,7 @@ const testdata = require("../../../../fixtures/testdata.json"); import { agHelper, entityExplorer, + table, } from "../../../../support/Objects/ObjectsCore"; describe( @@ -32,7 +33,7 @@ describe( it("2. validation of data displayed in input widgets based on sorting", function () { EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - + table.ExpandIfCollapsedSection("rowselection"); cy.testJsontext("defaultselectedrow", "0"); cy.get(".draggable-header").contains("id").click({ force: true }); cy.wait(1000); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2Widget_selectedRow_Input_widget_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2Widget_selectedRow_Input_widget_spec.js index 5bec54443d4..81a47dce51e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2Widget_selectedRow_Input_widget_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2Widget_selectedRow_Input_widget_spec.js @@ -30,6 +30,7 @@ describe( it("2. validation of data displayed in input widgets based on selected row", function () { EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + _.table.ExpandIfCollapsedSection("rowselection"); cy.testJsontext("defaultselectedrow", "2"); cy.readTableV2dataPublish("2", "0").then((tabData) => { const tabValue = tabData; diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_ClientSide_Search_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_ClientSide_Search_spec.js index e3b110fbc9d..e06ff961cb3 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_ClientSide_Search_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_ClientSide_Search_spec.js @@ -20,6 +20,7 @@ describe( cy.readTableV2dataPublish("0", "0").then((tabData) => { expect(tabData).to.eq("#2"); }); + _.table.ExpandIfCollapsedSection("search\\&filters"); // Input onsearchtextchanged control cy.get(".t--property-control-onsearchtextchanged .t--js-toggle") .first() diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_DefaultSearch_Input_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_DefaultSearch_Input_spec.js index 457593fec0f..e6f70a583d9 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_DefaultSearch_Input_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_DefaultSearch_Input_spec.js @@ -27,6 +27,7 @@ describe( ); // validation of data displayed in input widgets based on search value set EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + _.table.ExpandIfCollapsedSection("search\\&filters"); cy.get(".t--property-control-allowsearching input").click({ force: true, }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js index 03a7d1e93af..e27a9cf2463 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js @@ -30,6 +30,7 @@ describe( //Validate Table V2 with API data and then add a column EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); propPane.UpdatePropertyFieldValue("Table data", "{{Api1.data}}"); + table.ExpandIfCollapsedSection("pagination"); cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox); cy.get(`.t--widget-tablewidgetv2 .page-item`) .first() diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/TextTableV2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/TextTableV2_spec.js index e30b11a0315..d889ec9129d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/TextTableV2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/TextTableV2_spec.js @@ -113,6 +113,7 @@ describe( EditorNavigation.SelectEntityByName("Table1", EntityType.Widget, {}, [ "Container3", ]); + table.ExpandIfCollapsedSection("rowselection"); cy.testJsontext("defaultselectedrow", "2"); cy.wait("@updateLayout"); cy.get(commonlocators.TableV2Row) diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js index d3e05b789db..da2323d1613 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js @@ -16,6 +16,7 @@ describe( it("1.1. should test that allow Add new row property is present", () => { cy.openPropertyPane("tablewidgetv2"); + table.ExpandIfCollapsedSection("addingarow"); cy.get(".t--property-control-allowaddingarow").should("exist"); cy.get(".t--property-control-allowaddingarow input").should("exist"); cy.get(".t--add-new-row").should("not.exist"); @@ -151,6 +152,11 @@ describe( it("1.7. should not hide the header section when add new row button is enabled and another header element is disabled", () => { cy.get(".t--discard-new-row").click({ force: true }); //disable all header widgets for the table + ["pagination", "search\\&filters", "general", "addingarow"].forEach( + (val) => { + table.ExpandIfCollapsedSection(val); + }, + ); [ "Show pagination", "Allow searching", diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Edge_case_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Edge_case_spec.js index 7a5d288e3b4..de95b12a59f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Edge_case_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Edge_case_spec.js @@ -26,6 +26,7 @@ describe( it("1. Check if the selectedRowIndices does not contain 2d array", function () { EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + table.ExpandIfCollapsedSection("rowselection"); propPane.TogglePropertyState("Enable multi-row selection", "On"); //Enable Multi row select propPane.UpdatePropertyFieldValue("Default selected rows", "[1]"); //Change the value of default selected row diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts index 142401c067c..627983839ba 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts @@ -22,6 +22,7 @@ describe( entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250); //propPane.EnterJSContext("Table data", JSON.stringify(this.dataSet.TableInput)); // turn on filtering for the table - it is disabled by default in this PR(#34593) + table.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); table.AddSampleTableData(); //propPane.EnterJSContext("Table Data", JSON.stringify(this.dataSet.TableInput)); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_2_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_2_Spec.ts index c9a9ea98b72..b78362522b4 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_2_Spec.ts @@ -16,6 +16,7 @@ describe( it("1. Verify Table Filter for 'empty'", function () { entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250); // turn on filtering for the table - it is disabled by default in this PR(#34593) + table.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); table.AddSampleTableData(); propPane.UpdatePropertyFieldValue( diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_1_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_1_Spec.ts index 1c733733fd7..5a0adfe65db 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_1_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_1_Spec.ts @@ -17,6 +17,7 @@ describe( entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250); //propPane.EnterJSContext("Table data", JSON.stringify(this.dataSet.TableInput)); // turn on filtering for the table - it is disabled by default in this PR(#34593) + table.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); table.AddSampleTableData(); //propPane.EnterJSContext("Table Data", JSON.stringify(this.dataSet.TableInput)); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts index c431157de63..4e8997aac9a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts @@ -17,6 +17,7 @@ describe( it("1. Verify Full table data - download csv and download Excel", function () { entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250); // turn on filtering for the table - it is disabled by default in this PR(#34593) + table.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); table.AddSampleTableData(); propPane.UpdatePropertyFieldValue( diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_DisplayText_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_DisplayText_spec.ts index 4bd11a80cd2..795e2ba8215 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_DisplayText_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_DisplayText_spec.ts @@ -28,6 +28,7 @@ describe( before(() => { entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250); // turn on filtering for the table - it is disabled by default in this PR(#34593) + table.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); propPane.EnterJSContext("Table data", JSON.stringify(data)); assertHelper.AssertNetworkStatus("@updateLayout"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_MultiRowSelect_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_MultiRowSelect_spec.js index a0ae9da141d..6b08a8d2767 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_MultiRowSelect_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_MultiRowSelect_spec.js @@ -12,6 +12,7 @@ describe( it("1. Test multi select column shows when enable Multirowselection is true", function () { cy.openPropertyPane("tablewidgetv2"); + _.table.ExpandIfCollapsedSection("rowselection"); cy.get(widgetsPage.toggleEnableMultirowselection) .first() .click({ force: true }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_spec.js index 3e58e093fa5..5752d81aa78 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_spec.js @@ -53,6 +53,8 @@ describe( cy.get(commonlocators.editPropBackButton).click(); cy.openPropertyPane("tablewidgetv2"); // Confirm if isSortable is true + _.table.ExpandIfCollapsedSection("sorting"); + cy.get(commonlocators.isSortable).should("be.checked"); // Publish App _.deployMode.DeployApp(); @@ -124,6 +126,7 @@ describe( "Table data", `{{[{step: 1, task: 1}]}}`, ); + _.table.ExpandIfCollapsedSection("search\\&filters"); cy.get(".t--property-control-allowfiltering input").click(); cy.editColumn("step"); cy.get(".t--table-filter-toggle-btn").click(); @@ -237,6 +240,7 @@ describe( it("7. should check that adding cyclic dependency in the table doesn't crash the app", () => { //_.deployMode.NavigateBacktoEditor(); cy.openPropertyPane("tablewidgetv2"); + _.table.ExpandIfCollapsedSection("rowselection"); cy.updateCodeInput( ".t--property-control-defaultselectedrow", diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/checkboxCell_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/checkboxCell_spec.js index 252617d0ab5..b64635eec95 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/checkboxCell_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/checkboxCell_spec.js @@ -35,6 +35,7 @@ describe( before(() => { _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.TABLE); // turn on filtering for the table - it is disabled by default in this PR(#34593) + _.table.ExpandIfCollapsedSection("search\\&filters"); _.agHelper.GetNClick(".t--property-control-allowfiltering input"); _.propPane.EnterJSContext("Table data", tableData); cy.editColumn("completed"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/switchCell_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/switchCell_spec.js index 56a0f6cf12e..e07ba15f8f4 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/switchCell_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/switchCell_spec.js @@ -7,6 +7,7 @@ import { propPane, deployMode, draggableWidgets, + table, } from "../../../../../../support/Objects/ObjectsCore"; const tableData = `[ @@ -41,6 +42,7 @@ describe( before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE); // turn on filtering for the table - it is disabled by default in this PR(#34593) + table.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); propPane.EnterJSContext("Table data", tableData); cy.editColumn("completed"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/server_side_filtering_spec_1.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/server_side_filtering_spec_1.ts index 674f56e06e3..8ffe1601a8a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/server_side_filtering_spec_1.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/server_side_filtering_spec_1.ts @@ -35,6 +35,7 @@ describe( entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE, 300, 300); // turn on filtering for the table - it is disabled by default in this PR(#34593) + table.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); // Create SQL data-source diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index 31c0c0253fe..a431efaaf7e 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,5 +1,27 @@ # To run only limited tests - give the spec names in below format: -cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js +# Not fixed +cypress/e2e/Regression/ClientSide/Binding/TableV2TextPagination_spec.js +cypress/e2e/Regression/ClientSide/DynamicHeight/JsonForm_spec.ts +cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_2_spec.js +#Fixed +cypress/e2e/Regression/ClientSide/Binding/InputWidget_TableV2_Sorting_spec.js +cypress/e2e/Regression/ClientSide/Binding/TableV2_DefaultSearch_Input_spec.js +cypress/e2e/Regression/ClientSide/Binding/TableV2Widget_selectedRow_Input_widget_spec.js +cypress/e2e/Regression/ClientSide/Binding/TableV2_ClientSide_Search_spec.js +cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js +cypress/e2e/Regression/ClientSide/Binding/TextTableV2_spec.js +cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js +cypress/e2e/Regression/ClientSide/Widgets/TableV2/Edge_case_spec.js +cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts +cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_2_Spec.ts +cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_1_Spec.ts +cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts +cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_DisplayText_spec.ts +cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_MultiRowSelect_spec.js +cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_spec.js +cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/checkboxCell_spec.js +cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/switchCell_spec.js +cypress/e2e/Regression/ClientSide/Widgets/TableV2/server_side_filtering_spec_1.ts # For running all specs - uncomment below: #cypress/e2e/**/**/* diff --git a/app/client/cypress/support/Objects/FeatureFlags.ts b/app/client/cypress/support/Objects/FeatureFlags.ts index c7f4b58bdf6..7fdc78d1d58 100644 --- a/app/client/cypress/support/Objects/FeatureFlags.ts +++ b/app/client/cypress/support/Objects/FeatureFlags.ts @@ -4,7 +4,6 @@ import produce from "immer"; const defaultFlags = { release_side_by_side_ide_enabled: true, - ab_learnability_discoverability_collapse_all_except_data_enabled: false, // remove this flag from here when it's removed from code rollout_remove_feature_walkthrough_enabled: false, // remove this flag from here when it's removed from code }; diff --git a/app/client/cypress/support/Pages/Table.ts b/app/client/cypress/support/Pages/Table.ts index d1439a58927..e32390df546 100644 --- a/app/client/cypress/support/Pages/Table.ts +++ b/app/client/cypress/support/Pages/Table.ts @@ -854,4 +854,20 @@ export class Table { this.agHelper.GetHoverNClick(selector, 1, true); verify && cy.get(selector).eq(1).should("be.disabled"); } + + public ExpandIfCollapsedSection(sectionName: string) { + cy.get(`.t--property-pane-section-collapse-${sectionName}`).scrollIntoView().then( + ($element) => { + cy.wrap($element) + .siblings(".bp3-collapse") + .then(($sibling) => { + const siblingHeight = $sibling.height(); // Get the height of the sibling element + + if (!siblingHeight) { + $element.click(); + } + }); + }, + ); + } } diff --git a/app/client/src/ce/entities/FeatureFlag.ts b/app/client/src/ce/entities/FeatureFlag.ts index a48d3dc03ae..311a1b2037e 100644 --- a/app/client/src/ce/entities/FeatureFlag.ts +++ b/app/client/src/ce/entities/FeatureFlag.ts @@ -35,8 +35,6 @@ export const FEATURE_FLAG = { release_table_cell_label_value_enabled: "release_table_cell_label_value_enabled", rollout_side_by_side_enabled: "rollout_side_by_side_enabled", - ab_learnability_discoverability_collapse_all_except_data_enabled: - "ab_learnability_discoverability_collapse_all_except_data_enabled", release_layout_conversion_enabled: "release_layout_conversion_enabled", release_anvil_toggle_enabled: "release_anvil_toggle_enabled", release_ide_animations_enabled: "release_ide_animations_enabled", @@ -71,7 +69,6 @@ export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = { release_actions_redesign_enabled: false, rollout_remove_feature_walkthrough_enabled: true, rollout_side_by_side_enabled: false, - ab_learnability_discoverability_collapse_all_except_data_enabled: true, release_layout_conversion_enabled: false, release_anvil_toggle_enabled: false, release_ide_animations_enabled: false, diff --git a/app/client/src/pages/Editor/PropertyPane/PropertyControlsGenerator.tsx b/app/client/src/pages/Editor/PropertyPane/PropertyControlsGenerator.tsx index 8e1368ed6d1..fa7450d33a2 100644 --- a/app/client/src/pages/Editor/PropertyPane/PropertyControlsGenerator.tsx +++ b/app/client/src/pages/Editor/PropertyPane/PropertyControlsGenerator.tsx @@ -17,9 +17,6 @@ import { evaluateHiddenProperty } from "./helpers"; import type { EnhancementFns } from "selectors/widgetEnhancementSelectors"; import { getWidgetEnhancementSelector } from "selectors/widgetEnhancementSelectors"; import equal from "fast-deep-equal/es6"; -import { FEATURE_FLAG } from "ee/entities/FeatureFlag"; -import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; -import { isAirgapped } from "ee/utils/airgapHelpers"; export interface PropertyControlsGeneratorProps { id: string; @@ -107,14 +104,6 @@ function PropertyControlsGenerator(props: PropertyControlsGeneratorProps) { // eslint-disable-next-line @typescript-eslint/no-explicit-any const widgetProps: any = useSelector(getWidgetPropsForPropertyPane); - const isCollapseAllExceptDataEnabledFlag: boolean = useFeatureFlag( - FEATURE_FLAG.ab_learnability_discoverability_collapse_all_except_data_enabled, - ); - - const isCollapseAllExceptDataEnabled = isAirgapped() - ? true - : isCollapseAllExceptDataEnabledFlag; - const enhancementSelector = getWidgetEnhancementSelector( widgetProps?.widgetId, ); @@ -145,7 +134,7 @@ function PropertyControlsGenerator(props: PropertyControlsGeneratorProps) { props, isSearchResult, enhancements, - isCollapseAllExceptDataEnabled, + true, )} ); From 63010c6d352f67ef46a02cfd200751ec3589f323 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 30 Sep 2024 17:31:33 +0530 Subject: [PATCH 03/10] fix: failed tests --- .../Binding/InputWidget_TableV2_Sorting_spec.js | 8 ++------ .../Binding/TableV2TextPagination_spec.js | 2 +- ...ableV2Widget_selectedRow_Input_widget_spec.js | 2 +- .../Binding/TableV2_ClientSide_Search_spec.js | 2 +- .../Binding/TableV2_DefaultSearch_Input_spec.js | 2 +- .../TableV2_Widget_API_Pagination_spec.js | 2 +- .../ClientSide/Binding/TextTableV2_spec.js | 3 +-- .../ClientSide/DynamicHeight/JsonForm_spec.ts | 2 +- .../Widgets/TableV2/AddNewRow1_spec.js | 4 ++-- .../ClientSide/Widgets/TableV2/Edge_case_spec.js | 3 +-- .../Widgets/TableV2/TableV2Filter1_1_Spec.ts | 2 +- .../Widgets/TableV2/TableV2Filter1_2_Spec.ts | 2 +- .../Widgets/TableV2/TableV2Filter2_1_Spec.ts | 2 +- .../Widgets/TableV2/TableV2Filter2_2_Spec.ts | 2 +- .../Widgets/TableV2/TableV2_DisplayText_spec.ts | 2 +- .../TableV2/TableV2_MultiRowSelect_spec.js | 2 +- .../TableV2/TableV2_PropertyPane_2_spec.js | 1 + .../ClientSide/Widgets/TableV2/TableV2_spec.js | 6 +++--- .../TableV2/columnTypes/checkboxCell_spec.js | 2 +- .../TableV2/columnTypes/switchCell_spec.js | 3 +-- .../TableV2/server_side_filtering_spec_1.ts | 2 +- app/client/cypress/support/Pages/PropertyPane.ts | 16 ++++++++++++++++ app/client/cypress/support/Pages/Table.ts | 16 ---------------- 23 files changed, 41 insertions(+), 47 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/InputWidget_TableV2_Sorting_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/InputWidget_TableV2_Sorting_spec.js index 91f37fbd714..7fad7eb5d0f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/InputWidget_TableV2_Sorting_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/InputWidget_TableV2_Sorting_spec.js @@ -4,11 +4,7 @@ import EditorNavigation, { const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -import { - agHelper, - entityExplorer, - table, -} from "../../../../support/Objects/ObjectsCore"; +import { agHelper, propPane } from "../../../../support/Objects/ObjectsCore"; describe( "Binding the Table and input Widget", @@ -33,7 +29,7 @@ describe( it("2. validation of data displayed in input widgets based on sorting", function () { EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - table.ExpandIfCollapsedSection("rowselection"); + propPane.ExpandIfCollapsedSection("rowselection"); cy.testJsontext("defaultselectedrow", "0"); cy.get(".draggable-header").contains("id").click({ force: true }); cy.wait(1000); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2TextPagination_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2TextPagination_spec.js index d8d0a262ff3..490e40de6f9 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2TextPagination_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2TextPagination_spec.js @@ -6,7 +6,6 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const testdata = require("../../../../fixtures/testdata.json"); import apiPageLocators from "../../../../locators/ApiEditor"; import { - entityExplorer, apiPage, deployMode, propPane, @@ -91,6 +90,7 @@ describe( it("3. Table-Text, Validate Server Side Pagination of Paginate with Total v2 Records Count", function () { deployMode.NavigateBacktoEditor(); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("pagination"); propPane.UpdatePropertyFieldValue("Total Records", "20"); deployMode.DeployApp(); cy.wait("@postExecute"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2Widget_selectedRow_Input_widget_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2Widget_selectedRow_Input_widget_spec.js index 81a47dce51e..6ba248fe1a6 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2Widget_selectedRow_Input_widget_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2Widget_selectedRow_Input_widget_spec.js @@ -30,7 +30,7 @@ describe( it("2. validation of data displayed in input widgets based on selected row", function () { EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - _.table.ExpandIfCollapsedSection("rowselection"); + _.propPane.ExpandIfCollapsedSection("rowselection"); cy.testJsontext("defaultselectedrow", "2"); cy.readTableV2dataPublish("2", "0").then((tabData) => { const tabValue = tabData; diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_ClientSide_Search_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_ClientSide_Search_spec.js index e06ff961cb3..32232385039 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_ClientSide_Search_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_ClientSide_Search_spec.js @@ -20,7 +20,7 @@ describe( cy.readTableV2dataPublish("0", "0").then((tabData) => { expect(tabData).to.eq("#2"); }); - _.table.ExpandIfCollapsedSection("search\\&filters"); + _.propPane.ExpandIfCollapsedSection("search\\&filters"); // Input onsearchtextchanged control cy.get(".t--property-control-onsearchtextchanged .t--js-toggle") .first() diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_DefaultSearch_Input_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_DefaultSearch_Input_spec.js index e6f70a583d9..c21342e793f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_DefaultSearch_Input_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_DefaultSearch_Input_spec.js @@ -27,7 +27,7 @@ describe( ); // validation of data displayed in input widgets based on search value set EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - _.table.ExpandIfCollapsedSection("search\\&filters"); + _.propPane.ExpandIfCollapsedSection("search\\&filters"); cy.get(".t--property-control-allowsearching input").click({ force: true, }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js index e27a9cf2463..ef31811f782 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js @@ -30,7 +30,7 @@ describe( //Validate Table V2 with API data and then add a column EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); propPane.UpdatePropertyFieldValue("Table data", "{{Api1.data}}"); - table.ExpandIfCollapsedSection("pagination"); + propPane.ExpandIfCollapsedSection("pagination"); cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox); cy.get(`.t--widget-tablewidgetv2 .page-item`) .first() diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/TextTableV2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/TextTableV2_spec.js index d889ec9129d..b42f2840c89 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/TextTableV2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/TextTableV2_spec.js @@ -5,7 +5,6 @@ import EditorNavigation, { const commonlocators = require("../../../../locators/commonlocators.json"); const publish = require("../../../../locators/publishWidgetspage.json"); import { - entityExplorer, agHelper, deployMode, propPane, @@ -113,7 +112,7 @@ describe( EditorNavigation.SelectEntityByName("Table1", EntityType.Widget, {}, [ "Container3", ]); - table.ExpandIfCollapsedSection("rowselection"); + propPane.ExpandIfCollapsedSection("rowselection"); cy.testJsontext("defaultselectedrow", "2"); cy.wait("@updateLayout"); cy.get(commonlocators.TableV2Row) diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/JsonForm_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/JsonForm_spec.ts index 6ecade61342..c20df368d0e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/JsonForm_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/JsonForm_spec.ts @@ -1,5 +1,4 @@ import { - entityExplorer, locators, agHelper, propPane, @@ -17,6 +16,7 @@ describe( agHelper.AddDsl("jsonFormDynamicHeightDsl"); EditorNavigation.SelectEntityByName("JSONForm1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("general"); agHelper .GetWidgetCSSHeight( locators._widgetInDeployed(draggableWidgets.JSONFORM), diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js index da2323d1613..edc805239d9 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js @@ -16,7 +16,7 @@ describe( it("1.1. should test that allow Add new row property is present", () => { cy.openPropertyPane("tablewidgetv2"); - table.ExpandIfCollapsedSection("addingarow"); + propPane.ExpandIfCollapsedSection("addingarow"); cy.get(".t--property-control-allowaddingarow").should("exist"); cy.get(".t--property-control-allowaddingarow input").should("exist"); cy.get(".t--add-new-row").should("not.exist"); @@ -154,7 +154,7 @@ describe( //disable all header widgets for the table ["pagination", "search\\&filters", "general", "addingarow"].forEach( (val) => { - table.ExpandIfCollapsedSection(val); + propPane.ExpandIfCollapsedSection(val); }, ); [ diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Edge_case_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Edge_case_spec.js index de95b12a59f..5431495adc5 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Edge_case_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Edge_case_spec.js @@ -6,7 +6,6 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const commonlocators = require("../../../../../locators/commonlocators.json"); import { agHelper, - entityExplorer, propPane, table, } from "../../../../../support/Objects/ObjectsCore"; @@ -26,7 +25,7 @@ describe( it("1. Check if the selectedRowIndices does not contain 2d array", function () { EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - table.ExpandIfCollapsedSection("rowselection"); + propPane.ExpandIfCollapsedSection("rowselection"); propPane.TogglePropertyState("Enable multi-row selection", "On"); //Enable Multi row select propPane.UpdatePropertyFieldValue("Default selected rows", "[1]"); //Change the value of default selected row diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts index 627983839ba..72c7b293966 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts @@ -22,7 +22,7 @@ describe( entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250); //propPane.EnterJSContext("Table data", JSON.stringify(this.dataSet.TableInput)); // turn on filtering for the table - it is disabled by default in this PR(#34593) - table.ExpandIfCollapsedSection("search\\&filters"); + propPane.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); table.AddSampleTableData(); //propPane.EnterJSContext("Table Data", JSON.stringify(this.dataSet.TableInput)); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_2_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_2_Spec.ts index b78362522b4..91360c4cd24 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_2_Spec.ts @@ -16,7 +16,7 @@ describe( it("1. Verify Table Filter for 'empty'", function () { entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250); // turn on filtering for the table - it is disabled by default in this PR(#34593) - table.ExpandIfCollapsedSection("search\\&filters"); + propPane.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); table.AddSampleTableData(); propPane.UpdatePropertyFieldValue( diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_1_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_1_Spec.ts index 5a0adfe65db..552bdc4b1e5 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_1_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_1_Spec.ts @@ -17,7 +17,7 @@ describe( entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250); //propPane.EnterJSContext("Table data", JSON.stringify(this.dataSet.TableInput)); // turn on filtering for the table - it is disabled by default in this PR(#34593) - table.ExpandIfCollapsedSection("search\\&filters"); + propPane.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); table.AddSampleTableData(); //propPane.EnterJSContext("Table Data", JSON.stringify(this.dataSet.TableInput)); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts index 4e8997aac9a..76bef07b7b0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts @@ -17,7 +17,7 @@ describe( it("1. Verify Full table data - download csv and download Excel", function () { entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250); // turn on filtering for the table - it is disabled by default in this PR(#34593) - table.ExpandIfCollapsedSection("search\\&filters"); + propPane.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); table.AddSampleTableData(); propPane.UpdatePropertyFieldValue( diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_DisplayText_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_DisplayText_spec.ts index 795e2ba8215..a62b58935c7 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_DisplayText_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_DisplayText_spec.ts @@ -28,7 +28,7 @@ describe( before(() => { entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250); // turn on filtering for the table - it is disabled by default in this PR(#34593) - table.ExpandIfCollapsedSection("search\\&filters"); + propPane.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); propPane.EnterJSContext("Table data", JSON.stringify(data)); assertHelper.AssertNetworkStatus("@updateLayout"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_MultiRowSelect_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_MultiRowSelect_spec.js index 6b08a8d2767..bf59c5bb5ba 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_MultiRowSelect_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_MultiRowSelect_spec.js @@ -12,7 +12,7 @@ describe( it("1. Test multi select column shows when enable Multirowselection is true", function () { cy.openPropertyPane("tablewidgetv2"); - _.table.ExpandIfCollapsedSection("rowselection"); + _.propPane.ExpandIfCollapsedSection("rowselection"); cy.get(widgetsPage.toggleEnableMultirowselection) .first() .click({ force: true }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_2_spec.js index 0c73fae21be..dc9170c9772 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_2_spec.js @@ -62,6 +62,7 @@ describe( cy.moveToContentTab(); // Chage deat search text value to "data" cy.backFromPropertyPanel(); + table.ExpandIfCollapsedSection("search\\&filters"); cy.testJsontext("defaultsearchtext", "data"); deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); table.WaitForTableEmpty("v2"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_spec.js index 5752d81aa78..afe576f7b45 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_spec.js @@ -53,7 +53,7 @@ describe( cy.get(commonlocators.editPropBackButton).click(); cy.openPropertyPane("tablewidgetv2"); // Confirm if isSortable is true - _.table.ExpandIfCollapsedSection("sorting"); + _.propPane.ExpandIfCollapsedSection("sorting"); cy.get(commonlocators.isSortable).should("be.checked"); // Publish App @@ -126,7 +126,7 @@ describe( "Table data", `{{[{step: 1, task: 1}]}}`, ); - _.table.ExpandIfCollapsedSection("search\\&filters"); + _.propPane.ExpandIfCollapsedSection("search\\&filters"); cy.get(".t--property-control-allowfiltering input").click(); cy.editColumn("step"); cy.get(".t--table-filter-toggle-btn").click(); @@ -240,7 +240,7 @@ describe( it("7. should check that adding cyclic dependency in the table doesn't crash the app", () => { //_.deployMode.NavigateBacktoEditor(); cy.openPropertyPane("tablewidgetv2"); - _.table.ExpandIfCollapsedSection("rowselection"); + _.propPane.ExpandIfCollapsedSection("rowselection"); cy.updateCodeInput( ".t--property-control-defaultselectedrow", diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/checkboxCell_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/checkboxCell_spec.js index b64635eec95..1a1b9e6aa83 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/checkboxCell_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/checkboxCell_spec.js @@ -35,7 +35,7 @@ describe( before(() => { _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.TABLE); // turn on filtering for the table - it is disabled by default in this PR(#34593) - _.table.ExpandIfCollapsedSection("search\\&filters"); + _.propPane.ExpandIfCollapsedSection("search\\&filters"); _.agHelper.GetNClick(".t--property-control-allowfiltering input"); _.propPane.EnterJSContext("Table data", tableData); cy.editColumn("completed"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/switchCell_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/switchCell_spec.js index e07ba15f8f4..bec3425f26c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/switchCell_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/switchCell_spec.js @@ -7,7 +7,6 @@ import { propPane, deployMode, draggableWidgets, - table, } from "../../../../../../support/Objects/ObjectsCore"; const tableData = `[ @@ -42,7 +41,7 @@ describe( before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE); // turn on filtering for the table - it is disabled by default in this PR(#34593) - table.ExpandIfCollapsedSection("search\\&filters"); + propPane.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); propPane.EnterJSContext("Table data", tableData); cy.editColumn("completed"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/server_side_filtering_spec_1.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/server_side_filtering_spec_1.ts index 8ffe1601a8a..1d4f6fad616 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/server_side_filtering_spec_1.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/server_side_filtering_spec_1.ts @@ -35,7 +35,7 @@ describe( entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE, 300, 300); // turn on filtering for the table - it is disabled by default in this PR(#34593) - table.ExpandIfCollapsedSection("search\\&filters"); + propPane.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); // Create SQL data-source diff --git a/app/client/cypress/support/Pages/PropertyPane.ts b/app/client/cypress/support/Pages/PropertyPane.ts index daf36e185d6..f826f788d26 100644 --- a/app/client/cypress/support/Pages/PropertyPane.ts +++ b/app/client/cypress/support/Pages/PropertyPane.ts @@ -686,4 +686,20 @@ export class PropertyPane { .GetElement(this._propertyToggle(propertyName)) .should(state === "enabled" ? "be.checked" : "not.be.checked"); } + + public ExpandIfCollapsedSection(sectionName: string) { + cy.get(`.t--property-pane-section-collapse-${sectionName}`) + .scrollIntoView() + .then(($element) => { + cy.wrap($element) + .siblings(".bp3-collapse") + .then(($sibling) => { + const siblingHeight = $sibling.height(); // Get the height of the sibling element + + if (!siblingHeight) { + $element.click(); + } + }); + }); + } } diff --git a/app/client/cypress/support/Pages/Table.ts b/app/client/cypress/support/Pages/Table.ts index ebe2600bee5..45dd2132ded 100644 --- a/app/client/cypress/support/Pages/Table.ts +++ b/app/client/cypress/support/Pages/Table.ts @@ -888,20 +888,4 @@ export class Table { isoFormat, }; } - - public ExpandIfCollapsedSection(sectionName: string) { - cy.get(`.t--property-pane-section-collapse-${sectionName}`) - .scrollIntoView() - .then(($element) => { - cy.wrap($element) - .siblings(".bp3-collapse") - .then(($sibling) => { - const siblingHeight = $sibling.height(); // Get the height of the sibling element - - if (!siblingHeight) { - $element.click(); - } - }); - }); - } } From 92ce6284c28ad20d8361dcd2410d641ef1655b2c Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 30 Sep 2024 18:43:47 +0530 Subject: [PATCH 04/10] fix: reduced limited test and other fixed test cases --- .../TableV2/TableV2_PropertyPane_2_spec.js | 2 +- app/client/cypress/limited-tests.txt | 21 ------------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_2_spec.js index dc9170c9772..13694c0c9e4 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_2_spec.js @@ -62,7 +62,7 @@ describe( cy.moveToContentTab(); // Chage deat search text value to "data" cy.backFromPropertyPanel(); - table.ExpandIfCollapsedSection("search\\&filters"); + propPane.ExpandIfCollapsedSection("search\\&filters"); cy.testJsontext("defaultsearchtext", "data"); deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); table.WaitForTableEmpty("v2"); diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index a431efaaf7e..e33706b04f4 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,27 +1,6 @@ # To run only limited tests - give the spec names in below format: -# Not fixed cypress/e2e/Regression/ClientSide/Binding/TableV2TextPagination_spec.js -cypress/e2e/Regression/ClientSide/DynamicHeight/JsonForm_spec.ts cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_2_spec.js -#Fixed -cypress/e2e/Regression/ClientSide/Binding/InputWidget_TableV2_Sorting_spec.js -cypress/e2e/Regression/ClientSide/Binding/TableV2_DefaultSearch_Input_spec.js -cypress/e2e/Regression/ClientSide/Binding/TableV2Widget_selectedRow_Input_widget_spec.js -cypress/e2e/Regression/ClientSide/Binding/TableV2_ClientSide_Search_spec.js -cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js -cypress/e2e/Regression/ClientSide/Binding/TextTableV2_spec.js -cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js -cypress/e2e/Regression/ClientSide/Widgets/TableV2/Edge_case_spec.js -cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts -cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_2_Spec.ts -cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_1_Spec.ts -cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts -cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_DisplayText_spec.ts -cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_MultiRowSelect_spec.js -cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_spec.js -cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/checkboxCell_spec.js -cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/switchCell_spec.js -cypress/e2e/Regression/ClientSide/Widgets/TableV2/server_side_filtering_spec_1.ts # For running all specs - uncomment below: #cypress/e2e/**/**/* From b9564978662785e25bbb68aeeed4c8c13b6a0f36 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Tue, 1 Oct 2024 13:38:11 +0530 Subject: [PATCH 05/10] fix: reverting limited test file --- app/client/cypress/limited-tests.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index e33706b04f4..31c0c0253fe 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,6 +1,5 @@ # To run only limited tests - give the spec names in below format: -cypress/e2e/Regression/ClientSide/Binding/TableV2TextPagination_spec.js -cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_2_spec.js +cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js # For running all specs - uncomment below: #cypress/e2e/**/**/* From a02168b4808a77c8315f382d90e3853b10ea3eda Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Wed, 2 Oct 2024 10:09:18 +0530 Subject: [PATCH 06/10] fix: test cases --- .../e2e/Regression/Apps/CommunityIssues_Spec.ts | 6 ++++++ app/client/cypress/limited-tests.txt | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/app/client/cypress/e2e/Regression/Apps/CommunityIssues_Spec.ts b/app/client/cypress/e2e/Regression/Apps/CommunityIssues_Spec.ts index 97f2d07f675..d0ecf2a766b 100644 --- a/app/client/cypress/e2e/Regression/Apps/CommunityIssues_Spec.ts +++ b/app/client/cypress/e2e/Regression/Apps/CommunityIssues_Spec.ts @@ -74,8 +74,10 @@ describe( it("2. Validate table navigation with Server Side pagination enabled with Default selected row", () => { EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("pagination"); agHelper.AssertExistingToggleState("Server side pagination", "true"); + propPane.ExpandIfCollapsedSection("rowselection"); propPane .ValidatePropertyFieldValue("Default selected row", "0") .then(($selectedRow: any) => { @@ -114,6 +116,7 @@ describe( deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(0, 0, "v2"); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("pagination"); propPane.TogglePropertyState("Server side pagination", "Off"); deployMode.DeployApp(); table.WaitUntilTableLoad(0, 0, "v2"); @@ -126,6 +129,7 @@ describe( }); it("4. Change Default selected row in table and verify", () => { + propPane.ExpandIfCollapsedSection("rowselection"); propPane.UpdatePropertyFieldValue("Default selected row", "1"); deployMode.DeployApp(); table.WaitUntilTableLoad(0, 0, "v2"); @@ -140,6 +144,7 @@ describe( it("5. Verify Default search text in table as per 'Default search text' property set + Bug 12228", () => { EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("search\\&filters"); propPane.TypeTextIntoField("Default search text", "Bug"); deployMode.DeployApp(); table.AssertSearchText("Bug"); @@ -171,6 +176,7 @@ describe( it("6. Validate Search table with Client Side Search enabled & disabled & onSearchTextChanged is set", () => { EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("search\\&filters"); agHelper.AssertExistingToggleState("Client side search", "true"); deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index 31c0c0253fe..0caa46ac544 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,5 +1,15 @@ # To run only limited tests - give the spec names in below format: -cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js +#cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js +cypress/e2e/Regression/Apps/CommunityIssues_Spec.ts +cypress/e2e/Regression/ClientSide/Widgets/Button/Button_showAlert_multiline_message_spec.ts +cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_onOptionChange_spec.js +cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Add_button_spec.js +cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_2_spec.js +cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_3_spec.js +cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Add_button_spec.js +cypress/e2e/Regression/ClientSide/Widgets/TableV2/inline_editing_validations_spec.js +cypress/e2e/Smoke/GenerateCRUD/Generate_Crud_New_Page_spec.ts + # For running all specs - uncomment below: #cypress/e2e/**/**/* From 2bdc8f547abab252c1909e3b6e6c54bea49036a2 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Wed, 2 Oct 2024 10:10:40 +0530 Subject: [PATCH 07/10] fix: reverting limited test file --- app/client/cypress/limited-tests.txt | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index 0caa46ac544..31c0c0253fe 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,15 +1,5 @@ # To run only limited tests - give the spec names in below format: -#cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js -cypress/e2e/Regression/Apps/CommunityIssues_Spec.ts -cypress/e2e/Regression/ClientSide/Widgets/Button/Button_showAlert_multiline_message_spec.ts -cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_onOptionChange_spec.js -cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Add_button_spec.js -cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_2_spec.js -cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_3_spec.js -cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Add_button_spec.js -cypress/e2e/Regression/ClientSide/Widgets/TableV2/inline_editing_validations_spec.js -cypress/e2e/Smoke/GenerateCRUD/Generate_Crud_New_Page_spec.ts - +cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js # For running all specs - uncomment below: #cypress/e2e/**/**/* From 10890482da6dcce23dc6d3323bb6d8ea3c4ab2bf Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Wed, 2 Oct 2024 20:28:38 +0530 Subject: [PATCH 08/10] fix: test failure --- .../cypress/e2e/Regression/Apps/CommunityIssues_Spec.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/client/cypress/e2e/Regression/Apps/CommunityIssues_Spec.ts b/app/client/cypress/e2e/Regression/Apps/CommunityIssues_Spec.ts index d0ecf2a766b..4b178cfd0c0 100644 --- a/app/client/cypress/e2e/Regression/Apps/CommunityIssues_Spec.ts +++ b/app/client/cypress/e2e/Regression/Apps/CommunityIssues_Spec.ts @@ -125,6 +125,7 @@ describe( deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(0, 0, "v2"); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("pagination"); propPane.TogglePropertyState("Server side pagination", "On"); }); @@ -153,6 +154,7 @@ describe( deployMode.NavigateBacktoEditor(); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("search\\&filters"); propPane.TypeTextIntoField("Default search text", "Quest", true, false); deployMode.DeployApp(); @@ -162,6 +164,7 @@ describe( table.WaitUntilTableLoad(0, 0, "v2"); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("search\\&filters"); propPane.TypeTextIntoField("Default search text", "Epic"); //Bug 12228 - Searching based on hidden column value should not be allowed deployMode.DeployApp(); table.AssertSearchText("Epic"); @@ -169,6 +172,7 @@ describe( deployMode.NavigateBacktoEditor(); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("search\\&filters"); propPane.RemoveText("defaultsearchtext"); agHelper.GetNClick(dataSources._refreshIcon, 0, true); table.WaitUntilTableLoad(0, 0, "v2"); @@ -194,6 +198,7 @@ describe( table.WaitUntilTableLoad(0, 1, "v2"); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("search\\&filters"); propPane.TogglePropertyState("Client side search", "Off"); deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); @@ -211,6 +216,7 @@ describe( deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(0, 1, "v2"); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("search\\&filters"); propPane.TogglePropertyState("Client side search", "On"); propPane.EnterJSContext("onSearchTextChanged", ""); propPane.ToggleJSMode("onSearchTextChanged", false); @@ -230,6 +236,7 @@ describe( deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(0, 1, "v2"); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("search\\&filters"); propPane.TogglePropertyState("Client side search", "Off"); deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); From 19b10cfc5d3f9bdff3cc8d85dceb3b41487b2c1b Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Thu, 3 Oct 2024 17:45:00 +0530 Subject: [PATCH 09/10] fix: cypress fails --- .../ClientSide/Widgets/TableV2/AddNewRow1_spec.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js index edc805239d9..28233b2d31f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js @@ -152,11 +152,10 @@ describe( it("1.7. should not hide the header section when add new row button is enabled and another header element is disabled", () => { cy.get(".t--discard-new-row").click({ force: true }); //disable all header widgets for the table - ["pagination", "search\\&filters", "general", "addingarow"].forEach( - (val) => { - propPane.ExpandIfCollapsedSection(val); - }, - ); + propPane.ExpandIfCollapsedSection("general"); + propPane.ExpandIfCollapsedSection("addingarow"); + propPane.ExpandIfCollapsedSection("search\\&filters"); + propPane.ExpandIfCollapsedSection("pagination"); [ "Show pagination", "Allow searching", From 126121fbc45271c571808362f62cfe79ccb41a4e Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Fri, 4 Oct 2024 14:35:42 +0530 Subject: [PATCH 10/10] fix: add new row spec fix --- .../Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js index 28233b2d31f..6d641951891 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js @@ -3,6 +3,9 @@ import { propPane, table, } from "../../../../../support/Objects/ObjectsCore"; +import EditorNavigation, { + EntityType, +} from "../../../../../support/Pages/EditorNavigation"; const commonlocators = require("../../../../../locators/commonlocators.json"); describe( @@ -151,6 +154,7 @@ describe( it("1.7. should not hide the header section when add new row button is enabled and another header element is disabled", () => { cy.get(".t--discard-new-row").click({ force: true }); + EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); //disable all header widgets for the table propPane.ExpandIfCollapsedSection("general"); propPane.ExpandIfCollapsedSection("addingarow");