Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a521d0e
test: add Playwright end-to-end tests
ludomikula Nov 20, 2026
ae04f2d
test: use testability hooks in the end-to-end tests
ludomikula Nov 20, 2026
4be0add
test: harden the end-to-end guard and build the baseline image from 3…
ludomikula Nov 20, 2026
43ad1aa
test: cover move, resize, card menu, queries, tables and state in the…
ludomikula Nov 20, 2026
0943b7c
test: render the npm-loaded components and keep the recorded componen…
ludomikula Nov 20, 2026
cd19616
test: fix the type of the npm component name lookup
ludomikula Nov 20, 2026
7413403
test: give the end-to-end app a fixed host name and bake it into the …
ludomikula Nov 20, 2026
d8e3f15
test: ignore the folder for the probe evidence of the component test …
ludomikula Nov 20, 2026
95a1e7b
test: cover the editor components, logic, data and modules in the end…
ludomikula Nov 21, 2026
0b7d32c
test: add a security-focused end-to-end suite for permissions and cro…
ludomikula Nov 22, 2026
1072e37
test: add lifecycle test ids, tag and quarantine details to the end-t…
ludomikula Nov 22, 2026
4fd327b
test: cover the sign-up and sign-in edge cases and the session in the…
ludomikula Nov 22, 2026
a88c554
test: cover the profile and the password change in the lifecycle suite
ludomikula Nov 22, 2026
ecc0056
test: cover the API keys of a user in the lifecycle suite
ludomikula Nov 22, 2026
6ecaadc
test: cover the workspace members and the workspaces in the lifecycle…
ludomikula Nov 22, 2026
7e318ef
test: cover the user groups in the lifecycle suite
ludomikula Nov 22, 2026
16e2fb1
test: cover the share dialogs of apps and data sources in the lifecyc…
ludomikula Nov 22, 2026
c867c90
test: add a mail sink to the echo sidecar and a mail parser for the l…
ludomikula Nov 22, 2026
0f004b4
test: cover password recovery and invitation mails in the lifecycle s…
ludomikula Nov 22, 2026
f490dae
test: cover leaving, removal and workspace deletion in the lifecycle …
ludomikula Nov 22, 2026
7c354d6
test: cover the sign-in provider configuration in the lifecycle suite
ludomikula Nov 22, 2026
2ced92b
test: cover sign-in through a provider against a mock provider in the…
ludomikula Nov 22, 2026
12f3b7a
test: cover a stack with e-mail sign-up switched off in the lifecycle…
ludomikula Nov 22, 2026
749922c
test: cover the new-user tour, profile counts, navigation by role, me…
ludomikula Nov 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion client/packages/lowcoder-design/src/components/Tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ const Tabs = React.memo((props: ITabs) => {
return (
<IconAndName
key={tab.key}
role="tab"
aria-selected={isActive}
onClick={() => handleTabClick(tab.key)}
$isActive={isActive}
>
Expand All @@ -107,7 +109,7 @@ const Tabs = React.memo((props: ITabs) => {

return (
<>
<HeaderDiv>
<HeaderDiv role="tablist">
{tabsConfig.map(renderTab)}
</HeaderDiv>
<ChildDiv>{activeTab.content}</ChildDiv>
Expand Down
1 change: 1 addition & 0 deletions client/packages/lowcoder/src/layout/gridItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ export const GridItem = React.memo((props: GridItemProps) => {
return (
<div
className={testSelectorClass}
data-comp-name={props.name}
ref={elementRef}
draggable={isDraggable}
onDragStart={isDraggable ? onDragStart : undefined}
Expand Down
13 changes: 11 additions & 2 deletions client/packages/lowcoder/src/pages/editor/appEditorInternal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,17 @@ import { isPublicApplication } from "@lowcoder-ee/redux/selectors/applicationSel
* FIXME: optimize the logic of saving comps
* compose debounce + throttle
* make sure savingComps succeed before executing
*
* Returns whether the baseline exists: the first comp state seen after mounting is taken as the baseline and is
* never sent, so an edit that lands before this is true is not saved. It is false while the app is read-only or
* editing is blocked, because no baseline is taken then.
*/
function useSaveComp(
applicationId: string,
readOnly: boolean,
rootCompInstance: RootCompInstanceType | undefined,
blockEditing?: boolean,
) {
): boolean {
const originalComp = rootCompInstance?.comp;
// throttle comp change
const comp = useThrottle(originalComp, 1000);
Expand Down Expand Up @@ -100,6 +104,9 @@ function useSaveComp(
setPrevJsonStr(undefined);
setPrevAppId(undefined);
});

// Saving is off while read-only or blocked, so no edit is saved then, whatever baseline was taken before.
return Boolean(prevJsonStr) && !readOnly && !blockEditing;
}

const exportAppToJson = (appDSL?: any) => {
Expand Down Expand Up @@ -216,7 +223,7 @@ export const AppEditorInternalView = React.memo((props: AppEditorInternalViewPro
};
}, [isUserViewMode]);

useSaveComp(appInfo.id, readOnly, compInstance, blockEditing);
const saveBaselineTaken = useSaveComp(appInfo.id, readOnly, compInstance, blockEditing);

const loading =
!compInstance || !compInstance.comp || !compInstance.comp.preloaded || props.loading;
Expand Down Expand Up @@ -246,6 +253,8 @@ export const AppEditorInternalView = React.memo((props: AppEditorInternalViewPro
}}
>
<ExternalEditorContext.Provider value={externalEditorState}>
{/* Tells tests (and anything else watching the DOM) that edits made from now on are saved. */}
{saveBaselineTaken && <span hidden data-editor-ready="true" />}
{compInstance?.comp?.getView()}
</ExternalEditorContext.Provider>
</ConfigProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ function ModuleItem(props: ModuleItemProps) {
return (
<ItemWrapper
draggable
data-testid={`insert-comp-${compType}`}
onDragStart={(e) => {
e.stopPropagation();
e.dataTransfer.setData("compType", compType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export function PluginCompItem(props: PluginCompItemProps) {
return (
<ItemWrapper
draggable
data-testid={`insert-comp-${compType}`}
onDragStart={(e) => {
e.dataTransfer.setData("compType", compType);
e.dataTransfer.setDragImage(TransparentImg, 0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ export const UICompPanel = () => {
<CompDiv key={info[0]} className={info[0] === "table" ? tableDragClassName : ""}>
<HovDiv
draggable
data-testid={`insert-comp-${info[0]}`}
onDragStart={(e) => {
e.dataTransfer.setData("compType", info[0]);
e.dataTransfer.setDragImage(TransparentImg, 0, 0);
Expand Down
9 changes: 9 additions & 0 deletions e2e/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules/
playwright-report/
test-results/
blob-report/
playwright/.auth/
.run.lock

# Local probe evidence: specs, logs, screenshots; not part of the suite
evidence/
283 changes: 283 additions & 0 deletions e2e/AGENTS.md

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions e2e/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@AGENTS.md

## Claude Code notes

- A hook may prefix shell commands with `rtk`. When the tool reports that a hook changed the call, re-issue the Bash
call unchanged, with exactly the input the message quotes.
606 changes: 606 additions & 0 deletions e2e/README.md

Large diffs are not rendered by default.

121 changes: 121 additions & 0 deletions e2e/client-hooks.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
diff --git a/client/packages/lowcoder-design/src/components/Tab.tsx b/client/packages/lowcoder-design/src/components/Tab.tsx
index 3828b7e27..a4e447a9f 100644
--- a/client/packages/lowcoder-design/src/components/Tab.tsx
+++ b/client/packages/lowcoder-design/src/components/Tab.tsx
@@ -96,6 +96,8 @@ const Tabs = React.memo((props: ITabs) => {
return (
<IconAndName
key={tab.key}
+ role="tab"
+ aria-selected={isActive}
onClick={() => handleTabClick(tab.key)}
$isActive={isActive}
>
@@ -107,7 +109,7 @@ const Tabs = React.memo((props: ITabs) => {

return (
<>
- <HeaderDiv>
+ <HeaderDiv role="tablist">
{tabsConfig.map(renderTab)}
</HeaderDiv>
<ChildDiv>{activeTab.content}</ChildDiv>
diff --git a/client/packages/lowcoder/src/layout/gridItem.tsx b/client/packages/lowcoder/src/layout/gridItem.tsx
index 8d02232bf..e48396abf 100644
--- a/client/packages/lowcoder/src/layout/gridItem.tsx
+++ b/client/packages/lowcoder/src/layout/gridItem.tsx
@@ -278,6 +278,7 @@ export const GridItem = React.memo((props: GridItemProps) => {
return (
<div
className={testSelectorClass}
+ data-comp-name={props.name}
ref={elementRef}
draggable={isDraggable}
onDragStart={isDraggable ? onDragStart : undefined}
diff --git a/client/packages/lowcoder/src/pages/editor/appEditorInternal.tsx b/client/packages/lowcoder/src/pages/editor/appEditorInternal.tsx
index 161fadf16..44ee07a27 100644
--- a/client/packages/lowcoder/src/pages/editor/appEditorInternal.tsx
+++ b/client/packages/lowcoder/src/pages/editor/appEditorInternal.tsx
@@ -32,13 +32,17 @@ import { isPublicApplication } from "@lowcoder-ee/redux/selectors/applicationSel
* FIXME: optimize the logic of saving comps
* compose debounce + throttle
* make sure savingComps succeed before executing
+ *
+ * Returns whether the baseline exists: the first comp state seen after mounting is taken as the baseline and is
+ * never sent, so an edit that lands before this is true is not saved. It is false while the app is read-only or
+ * editing is blocked, because no baseline is taken then.
*/
function useSaveComp(
applicationId: string,
readOnly: boolean,
rootCompInstance: RootCompInstanceType | undefined,
blockEditing?: boolean,
-) {
+): boolean {
const originalComp = rootCompInstance?.comp;
// throttle comp change
const comp = useThrottle(originalComp, 1000);
@@ -100,6 +104,9 @@ function useSaveComp(
setPrevJsonStr(undefined);
setPrevAppId(undefined);
});
+
+ // Saving is off while read-only or blocked, so no edit is saved then, whatever baseline was taken before.
+ return Boolean(prevJsonStr) && !readOnly && !blockEditing;
}

const exportAppToJson = (appDSL?: any) => {
@@ -216,7 +223,7 @@ export const AppEditorInternalView = React.memo((props: AppEditorInternalViewPro
};
}, [isUserViewMode]);

- useSaveComp(appInfo.id, readOnly, compInstance, blockEditing);
+ const saveBaselineTaken = useSaveComp(appInfo.id, readOnly, compInstance, blockEditing);

const loading =
!compInstance || !compInstance.comp || !compInstance.comp.preloaded || props.loading;
@@ -246,6 +253,8 @@ export const AppEditorInternalView = React.memo((props: AppEditorInternalViewPro
}}
>
<ExternalEditorContext.Provider value={externalEditorState}>
+ {/* Tells tests (and anything else watching the DOM) that edits made from now on are saved. */}
+ {saveBaselineTaken && <span hidden data-editor-ready="true" />}
{compInstance?.comp?.getView()}
</ExternalEditorContext.Provider>
</ConfigProvider>
diff --git a/client/packages/lowcoder/src/pages/editor/right/ModulePanel.tsx b/client/packages/lowcoder/src/pages/editor/right/ModulePanel.tsx
index 5b216cd70..8eee8cb09 100644
--- a/client/packages/lowcoder/src/pages/editor/right/ModulePanel.tsx
+++ b/client/packages/lowcoder/src/pages/editor/right/ModulePanel.tsx
@@ -228,6 +228,7 @@ function ModuleItem(props: ModuleItemProps) {
return (
<ItemWrapper
draggable
+ data-testid={`insert-comp-${compType}`}
onDragStart={(e) => {
e.stopPropagation();
e.dataTransfer.setData("compType", compType);
diff --git a/client/packages/lowcoder/src/pages/editor/right/PluginPanel/PluginCompItem.tsx b/client/packages/lowcoder/src/pages/editor/right/PluginPanel/PluginCompItem.tsx
index bbf8123c8..ce5e1fd73 100644
--- a/client/packages/lowcoder/src/pages/editor/right/PluginPanel/PluginCompItem.tsx
+++ b/client/packages/lowcoder/src/pages/editor/right/PluginPanel/PluginCompItem.tsx
@@ -85,6 +85,7 @@ export function PluginCompItem(props: PluginCompItemProps) {
return (
<ItemWrapper
draggable
+ data-testid={`insert-comp-${compType}`}
onDragStart={(e) => {
e.dataTransfer.setData("compType", compType);
e.dataTransfer.setDragImage(TransparentImg, 0, 0);
diff --git a/client/packages/lowcoder/src/pages/editor/right/uiCompPanel.tsx b/client/packages/lowcoder/src/pages/editor/right/uiCompPanel.tsx
index b12d59f31..9cb3009a0 100644
--- a/client/packages/lowcoder/src/pages/editor/right/uiCompPanel.tsx
+++ b/client/packages/lowcoder/src/pages/editor/right/uiCompPanel.tsx
@@ -175,6 +175,7 @@ export const UICompPanel = () => {
<CompDiv key={info[0]} className={info[0] === "table" ? tableDragClassName : ""}>
<HovDiv
draggable
+ data-testid={`insert-comp-${info[0]}`}
onDragStart={(e) => {
e.dataTransfer.setData("compType", info[0]);
e.dataTransfer.setDragImage(TransparentImg, 0, 0);
115 changes: 115 additions & 0 deletions e2e/fixtures/dsl/audio.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"ui": {
"layout": {
"1730c6f4": {
"i": "1730c6f4",
"h": 5,
"w": 6,
"x": 0,
"y": 3,
"pos": 0
}
},
"items": {
"1730c6f4": {
"compType": "audio",
"comp": {
"src": "https://cdn.pixabay.com/audio/2023/07/06/audio_e12e5bea9d.mp3",
"showDataLoadingIndicators": false,
"preventStyleOverwriting": false,
"appliedThemeId": "",
"version": "latest"
},
"name": "audio1"
}
}
},
"refTree": {
"value": ""
},
"hooks": [
{
"compType": "urlParams",
"comp": {},
"name": "url"
},
{
"compType": "dayJsLib",
"comp": {},
"name": "dayjs"
},
{
"compType": "lodashJsLib",
"comp": {},
"name": "_"
},
{
"compType": "utils",
"comp": {},
"name": "utils"
},
{
"compType": "message",
"comp": {},
"name": "message"
},
{
"compType": "toast",
"comp": {
"title": "",
"description": "",
"type": "info",
"duration": "4.5",
"placement": "bottomRight",
"dismissible": true,
"showProgress": false,
"pauseOnHover": true,
"width": "",
"progressHeight": ""
},
"name": "toast"
},
{
"compType": "localStorage",
"comp": {},
"name": "localStorage"
},
{
"compType": "currentUser",
"comp": {},
"name": "currentUser"
},
{
"compType": "screenInfo",
"comp": {},
"name": "screenInfo"
},
{
"compType": "theme",
"comp": {},
"name": "theme"
}
],
"settings": {
"title": "",
"description": "",
"category": "Business",
"showHeaderInPublic": true,
"themeId": "default",
"preventAppStylesOverwriting": true,
"disableCollision": false,
"lowcoderCompVersion": "latest",
"maxWidth": {
"dropdown": "1920",
"input": 0
},
"gridRowCount": "Infinity",
"gridPaddingX": "0",
"gridPaddingY": "0"
},
"preload": {
"script": "",
"css": "",
"globalCSS": ""
}
}
Loading
Loading