Skip to content

Commit

Permalink
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
Browse files Browse the repository at this point in the history
…o action-redesign/mongodb
  • Loading branch information
albinAppsmith committed Sep 2, 2024
2 parents 80e4f91 + b3c79f0 commit 23f2285
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ const widgetsPage = require("../../../../../locators/Widgets.json");
import {
agHelper,
table as tableHelper,
propPane,
} from "../../../../../support/Objects/ObjectsCore";
import { PROPERTY_SELECTOR } from "../../../../../locators/WidgetLocators";

describe(
"Table widget inline editing functionality",
Expand Down Expand Up @@ -161,7 +163,12 @@ describe(
it("6. should check that onsubmit event is available for the columns that are editable", () => {
cy.openPropertyPane("tablewidgetv2");
cy.editColumn("step");
cy.wait(500);
cy.get(commonlocators.changeColType).last().click();
cy.get(tableHelper._dropdownText)
.children()
.contains("Plain text")
.click();
propPane.TogglePropertyState("Editable", "Off", "");
[
{
columnType: "URL",
Expand Down Expand Up @@ -206,8 +213,7 @@ describe(
.contains(data.columnType)
.click();
cy.wait("@updateLayout");
cy.wait(500);
cy.get(".t--property-control-onsubmit").should(data.expected);
cy.get(PROPERTY_SELECTOR.onSubmit).should(data.expected);
});

cy.get(propPaneBack).click();
Expand Down Expand Up @@ -262,8 +268,7 @@ describe(
.contains(data.columnType)
.click();
cy.wait("@updateLayout");
cy.wait(500);
cy.get(".t--property-control-onsubmit").should(data.expected);
cy.get(PROPERTY_SELECTOR.onSubmit).should(data.expected);
});
});

Expand Down
42 changes: 0 additions & 42 deletions app/client/cypress/e2e/Sanity/Datasources/MockDBs_Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,49 +74,7 @@ describe(

assertHelper.AssertNetworkStatus("@trigger");
dataSources.ValidateNSelectDropdown("Command", "Find document(s)");
agHelper.Sleep(2000); //for movies collection to load & populate in dropdown
dataSources.ValidateNSelectDropdown("Collection", "movies");
dataSources.RunQueryNVerifyResponseViews(1, false);
AppSidebar.navigate(AppSidebarButton.Data);
dataSources
.getDatasourceListItemDescription(mockDBName)
.then(($queryCount) =>
expect($queryCount).to.eq("1 queries in this app"),
);

entityExplorer.CreateNewDsQuery(mockDBName);
dataSources.ValidateNSelectDropdown("Command", "Find document(s)");
dataSources.ValidateNSelectDropdown("Collection", "movies");
dataSources.RunQueryNVerifyResponseViews(1, false);
AppSidebar.navigate(AppSidebarButton.Data);
dataSources
.getDatasourceListItemDescription(mockDBName)
.then(($queryCount) =>
expect($queryCount).to.eq("2 queries in this app"),
);
});
});

afterEach(() => {
AppSidebar.navigate(AppSidebarButton.Editor);
PageLeftPane.switchSegment(PagePaneSegment.Queries);
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Query1",
action: "Delete",
entityType: entityItems.Query,
});
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Query2",
action: "Delete",
entityType: entityItems.Query,
});
AppSidebar.navigate(AppSidebarButton.Data);
dataSources
.getDatasourceListItemDescription(dsName)
.then(($queryCount) =>
expect($queryCount).to.eq("No queries in this app"),
);
dataSources.DeleteDatasourceFromWithinDS(dsName);
});
},
);
11 changes: 7 additions & 4 deletions app/client/src/utils/bootIntercom.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { User } from "constants/userConstants";
import { ANONYMOUS_USERNAME, type User } from "constants/userConstants";
import { getAppsmithConfigs } from "ee/configs";
import { sha256 } from "js-sha256";
import { getLicenseKey } from "ee/utils/licenseHelpers";
Expand All @@ -7,9 +7,12 @@ const { appVersion, cloudHosting, intercomAppID } = getAppsmithConfigs();

export default function bootIntercom(user?: User) {
if (intercomAppID && window.Intercom) {
let { email, username } = user || {};
let name;
if (!cloudHosting) {
let name: string | undefined = user?.name;
let email: string | undefined = user?.email;
let username =
user?.username === ANONYMOUS_USERNAME ? undefined : user?.username;
if (!cloudHosting && username) {
// We are hiding their information when self-hosted
username = sha256(username || "");
// keep email undefined so that users are prompted to enter it when they reach out on intercom
email = undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,8 @@ private Mono<Void> sendInstallationSetupAnalytics(
final String instanceId = tuple.getT1();
final String ip = tuple.getT2();
log.debug("Installation setup complete.");
String newsletterSignedUpUserEmail = userFromRequest.isSignupForNewsletter() ? user.getEmail() : "";
String newsletterSignedUpUserName = userFromRequest.isSignupForNewsletter() ? user.getName() : "";
String newsletterSignedUpUserEmail = user.getEmail();
String newsletterSignedUpUserName = user.getName();
Map<String, Object> analyticsProps = new HashMap<>();
analyticsProps.put(DISABLE_TELEMETRY, !userFromRequest.isAllowCollectingAnonymousData());
analyticsProps.put(SUBSCRIBE_MARKETING, userFromRequest.isSignupForNewsletter());
Expand Down

0 comments on commit 23f2285

Please sign in to comment.