Skip to content

Commit

Permalink
Merge pull request #31312 from appsmithorg/release
Browse files Browse the repository at this point in the history
27/02 Daily Promo 2nd attempt
  • Loading branch information
yatinappsmith authored Feb 27, 2024
2 parents e85ba6c + ac418b3 commit 54a72a8
Show file tree
Hide file tree
Showing 13 changed files with 147 additions and 132 deletions.
28 changes: 15 additions & 13 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ app/client/src/sagas/OneClickBindingSaga.ts @sbalaji1192
app/client/src/WidgetQueryGenerators/* @sbalaji1192
app/client/src/components/editorComponents/WidgetQueryGeneratorForm/* @sbalaji1192
app/client/src/pages/AppViewer/* @appsmithorg/app-viewers
app/client/src/pages/Editor/AppSettingsPane/AppSettings/NavigationSettings/* @dhruvikn
app/client/src/ce/pages/AppViewer/NavigationLogo.tsx @dhruvikn
app/client/src/ce/pages/Editor/NavigationSettings/LogoInput.tsx @dhruvikn
app/client/src/ee/pages/AppViewer/NavigationLogo.tsx @dhruvikn
app/client/src/ee/pages/Editor/NavigationSettings/LogoInput.tsx @dhruvikn

# New Developers Pod
app/client/src/ce/entities/FeatureFlag.ts @hetunandu
Expand Down Expand Up @@ -107,14 +102,14 @@ app/client/src/widgets/withWidgetProps.tsx @appsmithorg/ui-builders

# Git Pod
app/server/appsmith-git/* @AnaghHegde
app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ImportExportApplicationServiceCEImpl.java @AnaghHegde @nayan-rafiq
app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ImportExportApplicationServiceCE.java @AnaghHegde @nayan-rafiq
app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/GitServiceCEImpl.java @AnaghHegde @nayan-rafiq
app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/GitServiceCE.java @AnaghHegde @nayan-rafiq
app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/GitCloudServicesUtils.java @AnaghHegde @nayan-rafiq
app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/GitDeployKeyGenerator.java @AnaghHegde @nayan-rafiq
app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/GitFileUtils.java @AnaghHegde @nayan-rafiq
app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/GitUtils.java @AnaghHegde @nayan-rafiq
app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ImportExportApplicationServiceCEImpl.java @AnaghHegde
app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ImportExportApplicationServiceCE.java @AnaghHegde
app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/GitServiceCEImpl.java @AnaghHegde
app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/GitServiceCE.java @AnaghHegde
app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/GitCloudServicesUtils.java @AnaghHegde
app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/GitDeployKeyGenerator.java @AnaghHegde
app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/GitFileUtils.java @AnaghHegde
app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/GitUtils.java @AnaghHegde
app/client/src/pages/Editor/gitSync/* @brayn003

# DSL Package
Expand Down Expand Up @@ -234,3 +229,10 @@ app/client/src/ce/ActionExecution/ActionExecutionSagas.ts @ApekshaBhosale
app/client/src/ee/ActionExecution/ActionExecutionSagas.ts @ApekshaBhosale
app/client/src/ce/JSFunctionExecutionSaga.ts @ApekshaBhosale
app/client/src/ee/JSFunctionExecutionSaga.ts @ApekshaBhosale

# DevOps & Shri
deploy/**/* @sharat87 @pratapaprasanna
app/server/**/pom.xml @sharat87
app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/BaseAppsmithRepositoryCEImpl.java @sharat87
app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/params/QueryAllParams.java @sharat87
app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/ce/bridge/Bridge.java @sharat87

This file was deleted.

2 changes: 1 addition & 1 deletion app/client/cypress/support/Pages/AggregateHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ export class AggregateHelper {
force = false,
) {
this.ClearTextField(selector, force, index);
this.TypeText(selector, totype, index);
return this.TypeText(selector, totype, index);
}

public TypeText(
Expand Down
14 changes: 10 additions & 4 deletions app/client/cypress/support/Pages/HomePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export class HomePage {
private _optionsIcon = ".t--options-icon";
public _newIcon = ".createnew";
private _renameWorkspaceContainer = ".editable-text-container";
private _renameWorkspaceInput = ".t--workspace-rename-input input";
private _renameWorkspaceParent = ".t--workspace-rename-input";
private _renameWorkspaceInput = this._renameWorkspaceParent + " input";
private _workspaceList = (workspaceName: string) =>
".t--workspace-section:contains(" + workspaceName + ")";
private _workspaceNoApps = (workspaceName: string) =>
Expand Down Expand Up @@ -176,7 +177,7 @@ export class HomePage {

public OpenWorkspaceOptions(workspaceName: string, networkCallAlias = true) {
this.SelectWorkspace(workspaceName, networkCallAlias);
this.agHelper.GetElement(this._optionsIcon).click({ force: true });
this.agHelper.GetNClick(this._optionsIcon, 0, true);
}

public OpenWorkspaceSettings(workspaceName: string) {
Expand All @@ -190,9 +191,14 @@ export class HomePage {
networkCallAlias = true,
) {
this.OpenWorkspaceOptions(oldName, networkCallAlias);
this.agHelper.GetNClick(this._renameWorkspaceContainer, 0, true);
this.agHelper.AssertElementVisibility(this._renameWorkspaceContainer);
Cypress._.times(2, () => {
this.agHelper.GetNClick(this._renameWorkspaceParent, 0, true);
});
this.agHelper.WaitUntilEleAppear(this._renameWorkspaceInput);
this.agHelper.TypeText(this._renameWorkspaceInput, newWorkspaceName).blur();
this.agHelper
.ClearNType(this._renameWorkspaceInput, newWorkspaceName)
.blur();
this.assertHelper.AssertNetworkStatus("@updateWorkspace");
this.agHelper.AssertContains(newWorkspaceName);
this.agHelper.AssertElementVisibility(
Expand Down
4 changes: 2 additions & 2 deletions app/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"cypress-log-to-output": "^1.1.2",
"dayjs": "^1.10.6",
"deep-diff": "^1.0.2",
"design-system": "npm:@appsmithorg/[email protected].32",
"design-system": "npm:@appsmithorg/[email protected].34",
"design-system-old": "npm:@appsmithorg/[email protected]",
"downloadjs": "^1.4.7",
"echarts": "^5.4.2",
Expand Down Expand Up @@ -250,7 +250,7 @@
"@sentry/webpack-plugin": "^1.18.9",
"@testing-library/jest-dom": "5.16.1",
"@testing-library/react": "12.1.2",
"@testing-library/react-hooks": "^7.0.2",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "13.5.0",
"@types/codemirror": "^0.0.96",
"@types/deep-diff": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from "react";
import React, { useEffect } from "react";
import CreateNewAppFromTemplatesModal from ".";
import { getIsReconnectingDatasourcesModalOpen } from "@appsmith/selectors/entitiesSelector";
import { useSelector } from "react-redux";

interface Props {
currentWorkspaceId: string;
Expand All @@ -12,6 +14,16 @@ const CreateNewAppFromTemplatesWrapper = ({
isOpen,
onModalClose,
}: Props) => {
const isReconnectingModalOpen = useSelector(
getIsReconnectingDatasourcesModalOpen,
);

useEffect(() => {
if (isReconnectingModalOpen) {
onModalClose();
}
}, [isReconnectingModalOpen]);

return (
<CreateNewAppFromTemplatesModal
currentWorkSpaceId={currentWorkspaceId}
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/ce/pages/Editor/IDE/EditorPane/JS/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const useJSAdd = () => {
const dispatch = useDispatch();
return useCallback(() => {
dispatch(createNewJSCollection(pageId, "ENTITY_EXPLORER"));
}, [dispatch]);
}, [dispatch, pageId]);
};

export const useGroupedAddJsOperations = (): GroupedAddOperations => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import React from "react";
import { renderHook, act } from "@testing-library/react-hooks";
import { useJSAdd } from "../../JS/hooks";
import { Provider } from "react-redux";
import type { Store } from "redux";
import { createStore } from "redux";
import { updateCurrentPage } from "actions/pageActions";
import rootReducer from "@appsmith/reducers";
import * as redux from "react-redux";

// Custom wrapper to provide any store to the provider
function getWrapper(store: Store): React.FC {
return ({ children }: { children?: React.ReactNode }) => (
<Provider store={store}>{children}</Provider>
);
}

describe("JS Segment", () => {
it("creates JS in the correct page", () => {
const store = createStore(rootReducer, {
entities: {
pageList: {
currentPageId: "1",
pages: [],
},
},
});
const useDispatchSpy = jest.spyOn(redux, "useDispatch");
const mockDispatchFn = jest.fn();
useDispatchSpy.mockReturnValue(mockDispatchFn);
const wrapper = getWrapper(store);

const { result } = renderHook(() => useJSAdd(), { wrapper });

expect(result.current).toBeDefined();

act(() => {
result.current();
});

expect(mockDispatchFn).toBeCalledWith({
payload: {
from: "ENTITY_EXPLORER",
pageId: "1",
},
type: "CREATE_NEW_JS_ACTION",
});

// Update the current page
act(() => {
store.dispatch(updateCurrentPage("2"));
});

// Render the hook because state has changed
act(() => {
renderHook(() => useJSAdd(), { wrapper });
});

// Call the function now from a different page
act(() => {
result.current();
});

// Now the creation action should have the new page id
expect(mockDispatchFn).toBeCalledWith({
payload: {
from: "ENTITY_EXPLORER",
pageId: "2",
},
type: "CREATE_NEW_JS_ACTION",
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const SegmentedHeader = () => {
onClick={() =>
dispatch(setIdeEditorViewMode(EditorViewMode.FullScreen))
}
startIcon="maximize"
startIcon="maximize-v3"
/>
) : null}
</Container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const FullScreenTabs = () => {
isIconButton
kind="tertiary"
onClick={setSplitScreenMode}
startIcon="minimize"
startIcon="minimize-v3"
/>
</Container>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const StyledTab = styled(Flex)`
}
&.active {
background: var(--ads-v2-colors-control-field-default-bg);
border-top: 2px solid var(--ads-v2-color-bg-brand);
border-left: 1px solid var(--ads-v2-color-border);
border-right: 1px solid var(--ads-v2-color-border);
Expand Down
Loading

0 comments on commit 54a72a8

Please sign in to comment.