PromucFlow_constructor/app/client/test/testMockedWidgets.tsx
Hetu Nandu 22688f994f
chore: AppIDE Folder Structure (#39165)
## Description

Updates the folder structure and file breakup according to the new IDE
folder structure

Fixes #39048
Fixes #39049
Fixes #39051


## 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/13352717132>
> Commit: 54cd1a3b4679ae8bd0687ddb063692a26be1d7b9
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13352717132&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Sun, 16 Feb 2025 08:44:30 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
2025-02-17 10:34:23 +03:00

27 lines
904 B
TypeScript

import { APP_MODE } from "entities/App";
import AppViewerPageContainer from "pages/AppViewer/AppViewerPageContainer";
import Canvas from "pages/Editor/Canvas";
import IDE from "pages/AppIDE/layout";
import React from "react";
import { useSelector } from "react-redux";
import { getCanvasWidgetsStructure } from "ee/selectors/entitiesSelector";
import { useMockDsl } from "./testCommon";
export function MockCanvas() {
const canvasWidgetsStructure = useSelector(getCanvasWidgetsStructure);
return <Canvas canvasWidth={0} widgetsStructure={canvasWidgetsStructure} />;
}
export function UpdateAppViewer({ dsl }: { dsl: unknown }) {
const hasLoaded = useMockDsl(dsl, APP_MODE.PUBLISHED);
return hasLoaded ? <AppViewerPageContainer /> : null;
}
export function UpdatedEditor({ dsl }: { dsl: unknown }) {
const hasLoaded = useMockDsl(dsl, APP_MODE.EDIT);
return hasLoaded ? <IDE /> : null;
}