Skip to content

Commit

Permalink
chore: removed old flags for airgap instances (#36609)
Browse files Browse the repository at this point in the history
## Description
Removed all the occurrences of listed flags in the codebase:

1. ab_ds_binding_enabled
2. ab_ds_schema_enabled
3. ab_gsheet_schema_enabled
4. ab_learnability_discoverability_collapse_all_except_data_enabled
5. ab_learnability_ease_of_initial_use_enabled
6. ab_mock_mongo_schema_enabled
7. ab_start_with_data_default_enabled
8. rollout_js_enabled_one_click_binding_enabled


Fixes #36256
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.All"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11177173738>
> Commit: bfbf6bb
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11177173738&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Fri, 04 Oct 2024 10:31:10 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Enhanced test coverage for the Community Issues page, focusing on
pagination, search, filtering, and issue management.
- Improved functionality for adding new rows to table widgets, including
visibility controls and state validations.

- **Bug Fixes**
- Resolved issues related to the visibility of UI elements when adding
new rows and ensured accurate data reflection in the table.

- **Tests**
- Expanded tests for pagination, row selection, search functionality,
and filtering logic in table widgets.
- Added comprehensive assertions for client-side search and filtering
scenarios, including checks for modal visibility during issue
management.

- **Chores**
- Removed obsolete feature flags and streamlined logic for managing
feature flags across components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
AmanAgarwal041 authored Oct 7, 2024
1 parent 3ff67d3 commit 56e7f89
Show file tree
Hide file tree
Showing 37 changed files with 68 additions and 109 deletions.
13 changes: 13 additions & 0 deletions app/client/cypress/e2e/Regression/Apps/CommunityIssues_Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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");
Expand All @@ -122,10 +125,12 @@ describe(
deployMode.NavigateBacktoEditor();
table.WaitUntilTableLoad(0, 0, "v2");
EditorNavigation.SelectEntityByName("Table1", EntityType.Widget);
propPane.ExpandIfCollapsedSection("pagination");
propPane.TogglePropertyState("Server side pagination", "On");
});

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");
Expand All @@ -140,6 +145,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");
Expand All @@ -148,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();
Expand All @@ -157,20 +164,23 @@ 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");
table.WaitForTableEmpty("v2");
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");
});

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));
Expand All @@ -188,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));
Expand All @@ -205,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);
Expand All @@ -224,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));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags";
import {
agHelper,
locators,
entityExplorer,
propPane,
draggableWidgets,
apiPage,
entityItems,
homePage,
assertHelper,
} from "../../../../support/Objects/ObjectsCore";
Expand All @@ -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();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ import EditorNavigation, {

const publish = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../../fixtures/testdata.json");
import {
agHelper,
entityExplorer,
} from "../../../../support/Objects/ObjectsCore";
import { agHelper, propPane } from "../../../../support/Objects/ObjectsCore";

describe(
"Binding the Table and input Widget",
Expand All @@ -32,7 +29,7 @@ describe(

it("2. validation of data displayed in input widgets based on sorting", function () {
EditorNavigation.SelectEntityByName("Table1", EntityType.Widget);

propPane.ExpandIfCollapsedSection("rowselection");
cy.testJsontext("defaultselectedrow", "0");
cy.get(".draggable-header").contains("id").click({ force: true });
cy.wait(1000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ describe(

it("2. validation of data displayed in input widgets based on selected row", function () {
EditorNavigation.SelectEntityByName("Table1", EntityType.Widget);
_.propPane.ExpandIfCollapsedSection("rowselection");
cy.testJsontext("defaultselectedrow", "2");
cy.readTableV2dataPublish("2", "0").then((tabData) => {
const tabValue = tabData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ describe(
cy.readTableV2dataPublish("0", "0").then((tabData) => {
expect(tabData).to.eq("#2");
});
_.propPane.ExpandIfCollapsedSection("search\\&filters");
// Input onsearchtextchanged control
cy.get(".t--property-control-onsearchtextchanged .t--js-toggle")
.first()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe(
);
// validation of data displayed in input widgets based on search value set
EditorNavigation.SelectEntityByName("Table1", EntityType.Widget);
_.propPane.ExpandIfCollapsedSection("search\\&filters");
cy.get(".t--property-control-allowsearching input").click({
force: true,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}}");
propPane.ExpandIfCollapsedSection("pagination");
cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox);
cy.get(`.t--widget-tablewidgetv2 .page-item`)
.first()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import EditorNavigation, {
const commonlocators = require("../../../../locators/commonlocators.json");
const publish = require("../../../../locators/publishWidgetspage.json");
import {
entityExplorer,
agHelper,
deployMode,
propPane,
Expand Down Expand Up @@ -113,6 +112,7 @@ describe(
EditorNavigation.SelectEntityByName("Table1", EntityType.Widget, {}, [
"Container3",
]);
propPane.ExpandIfCollapsedSection("rowselection");
cy.testJsontext("defaultselectedrow", "2");
cy.wait("@updateLayout");
cy.get(commonlocators.TableV2Row)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
entityExplorer,
locators,
agHelper,
propPane,
Expand All @@ -17,6 +16,7 @@ describe(
agHelper.AddDsl("jsonFormDynamicHeightDsl");

EditorNavigation.SelectEntityByName("JSONForm1", EntityType.Widget);
propPane.ExpandIfCollapsedSection("general");
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.JSONFORM),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import OneClickBindingLocator from "../../../../locators/OneClickBindingLocator";
import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags";
import {
agHelper,
apiPage,
Expand All @@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -16,6 +19,7 @@ describe(

it("1.1. should test that allow Add new row property is present", () => {
cy.openPropertyPane("tablewidgetv2");
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");
Expand Down Expand Up @@ -150,7 +154,12 @@ 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");
propPane.ExpandIfCollapsedSection("search\\&filters");
propPane.ExpandIfCollapsedSection("pagination");
[
"Show pagination",
"Allow searching",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -26,6 +25,7 @@ describe(

it("1. Check if the selectedRowIndices does not contain 2d array", function () {
EditorNavigation.SelectEntityByName("Table1", EntityType.Widget);
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
propPane.ExpandIfCollapsedSection("search\\&filters");
agHelper.GetNClick(".t--property-control-allowfiltering input");
table.AddSampleTableData();
//propPane.EnterJSContext("Table Data", JSON.stringify(this.dataSet.TableInput));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
propPane.ExpandIfCollapsedSection("search\\&filters");
agHelper.GetNClick(".t--property-control-allowfiltering input");
table.AddSampleTableData();
propPane.UpdatePropertyFieldValue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
propPane.ExpandIfCollapsedSection("search\\&filters");
agHelper.GetNClick(".t--property-control-allowfiltering input");
table.AddSampleTableData();
//propPane.EnterJSContext("Table Data", JSON.stringify(this.dataSet.TableInput));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
propPane.ExpandIfCollapsedSection("search\\&filters");
agHelper.GetNClick(".t--property-control-allowfiltering input");
table.AddSampleTableData();
propPane.UpdatePropertyFieldValue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
propPane.ExpandIfCollapsedSection("search\\&filters");
agHelper.GetNClick(".t--property-control-allowfiltering input");
propPane.EnterJSContext("Table data", JSON.stringify(data));
assertHelper.AssertNetworkStatus("@updateLayout");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ describe(

it("1. Test multi select column shows when enable Multirowselection is true", function () {
cy.openPropertyPane("tablewidgetv2");
_.propPane.ExpandIfCollapsedSection("rowselection");
cy.get(widgetsPage.toggleEnableMultirowselection)
.first()
.click({ force: true });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ describe(
cy.moveToContentTab();
// Chage deat search text value to "data"
cy.backFromPropertyPanel();
propPane.ExpandIfCollapsedSection("search\\&filters");
cy.testJsontext("defaultsearchtext", "data");
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE));
table.WaitForTableEmpty("v2");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ describe(
cy.get(commonlocators.editPropBackButton).click();
cy.openPropertyPane("tablewidgetv2");
// Confirm if isSortable is true
_.propPane.ExpandIfCollapsedSection("sorting");

cy.get(commonlocators.isSortable).should("be.checked");
// Publish App
_.deployMode.DeployApp();
Expand Down Expand Up @@ -124,6 +126,7 @@ describe(
"Table data",
`{{[{step: 1, task: 1}]}}`,
);
_.propPane.ExpandIfCollapsedSection("search\\&filters");
cy.get(".t--property-control-allowfiltering input").click();
cy.editColumn("step");
cy.get(".t--table-filter-toggle-btn").click();
Expand Down Expand Up @@ -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");
_.propPane.ExpandIfCollapsedSection("rowselection");

cy.updateCodeInput(
".t--property-control-defaultselectedrow",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
_.propPane.ExpandIfCollapsedSection("search\\&filters");
_.agHelper.GetNClick(".t--property-control-allowfiltering input");
_.propPane.EnterJSContext("Table data", tableData);
cy.editColumn("completed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ describe(
before(() => {
entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE);
// turn on filtering for the table - it is disabled by default in this PR(#34593)
propPane.ExpandIfCollapsedSection("search\\&filters");
agHelper.GetNClick(".t--property-control-allowfiltering input");
propPane.EnterJSContext("Table data", tableData);
cy.editColumn("completed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
propPane.ExpandIfCollapsedSection("search\\&filters");
agHelper.GetNClick(".t--property-control-allowfiltering input");

// Create SQL data-source
Expand Down
1 change: 0 additions & 1 deletion app/client/cypress/support/Objects/FeatureFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
Loading

0 comments on commit 56e7f89

Please sign in to comment.