From 14578ca3db2259ddf7aad1c4fc7f580a18fb82aa Mon Sep 17 00:00:00 2001 From: Alexandre Rousseau Date: Tue, 1 Oct 2024 22:15:27 +0200 Subject: [PATCH] chore(e2e): migrate `ui.json` of presets Migrated the `ui.json` of E2E to avoid warning during E2E test. I just ran `writer edit tests/e2e/presets/$FILE` in each preset folder and committed. It should avoid unnecessary computation during the E2E execution and ease the migration. --- tests/e2e/index.js | 6 +- .../components-page-0-qlbz49xq2emx9ip4.jsonl | 5 + .../2columns/.wf/components-root.jsonl | 1 + tests/e2e/presets/2columns/.wf/metadata.json | 3 + tests/e2e/presets/2columns/ui.json | 69 ----------- .../components-page-0-qlbz49xq2emx9ip4.jsonl | 1 + .../components-page-1-6gnhb317w7k76uhw.jsonl | 1 + .../presets/2pages/.wf/components-root.jsonl | 1 + tests/e2e/presets/2pages/.wf/metadata.json | 3 + tests/e2e/presets/2pages/ui.json | 39 ------ .../components-page-0-qlbz49xq2emx9ip4.jsonl | 1 + .../empty_page/.wf/components-root.jsonl | 1 + .../e2e/presets/empty_page/.wf/metadata.json | 3 + tests/e2e/presets/empty_page/ui.json | 27 ----- ...bb4d0e86-619e-4367-a180-be28ab6059f4.jsonl | 2 + .../jsonviewer/.wf/components-root.jsonl | 1 + .../e2e/presets/jsonviewer/.wf/metadata.json | 3 + tests/e2e/presets/jsonviewer/ui.json | 42 ------- .../components-page-0-qlbz49xq2emx9ip4.jsonl | 7 ++ .../low_code/.wf/components-root.jsonl | 1 + tests/e2e/presets/low_code/.wf/metadata.json | 3 + tests/e2e/presets/low_code/ui.json | 111 ------------------ .../components-page-0-qlbz49xq2emx9ip4.jsonl | 2 + .../presets/section/.wf/components-root.jsonl | 1 + tests/e2e/presets/section/.wf/metadata.json | 3 + tests/e2e/presets/section/ui.json | 38 ------ .../components-page-0-qlbz49xq2emx9ip4.jsonl | 5 + .../presets/state/.wf/components-root.jsonl | 1 + tests/e2e/presets/state/.wf/metadata.json | 3 + tests/e2e/presets/state/ui.json | 81 ------------- 30 files changed, 56 insertions(+), 409 deletions(-) create mode 100644 tests/e2e/presets/2columns/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl create mode 100644 tests/e2e/presets/2columns/.wf/components-root.jsonl create mode 100644 tests/e2e/presets/2columns/.wf/metadata.json delete mode 100644 tests/e2e/presets/2columns/ui.json create mode 100644 tests/e2e/presets/2pages/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl create mode 100644 tests/e2e/presets/2pages/.wf/components-page-1-6gnhb317w7k76uhw.jsonl create mode 100644 tests/e2e/presets/2pages/.wf/components-root.jsonl create mode 100644 tests/e2e/presets/2pages/.wf/metadata.json delete mode 100644 tests/e2e/presets/2pages/ui.json create mode 100644 tests/e2e/presets/empty_page/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl create mode 100644 tests/e2e/presets/empty_page/.wf/components-root.jsonl create mode 100644 tests/e2e/presets/empty_page/.wf/metadata.json delete mode 100644 tests/e2e/presets/empty_page/ui.json create mode 100644 tests/e2e/presets/jsonviewer/.wf/components-page-0-bb4d0e86-619e-4367-a180-be28ab6059f4.jsonl create mode 100644 tests/e2e/presets/jsonviewer/.wf/components-root.jsonl create mode 100644 tests/e2e/presets/jsonviewer/.wf/metadata.json delete mode 100644 tests/e2e/presets/jsonviewer/ui.json create mode 100644 tests/e2e/presets/low_code/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl create mode 100644 tests/e2e/presets/low_code/.wf/components-root.jsonl create mode 100644 tests/e2e/presets/low_code/.wf/metadata.json delete mode 100644 tests/e2e/presets/low_code/ui.json create mode 100644 tests/e2e/presets/section/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl create mode 100644 tests/e2e/presets/section/.wf/components-root.jsonl create mode 100644 tests/e2e/presets/section/.wf/metadata.json delete mode 100644 tests/e2e/presets/section/ui.json create mode 100644 tests/e2e/presets/state/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl create mode 100644 tests/e2e/presets/state/.wf/components-root.jsonl create mode 100644 tests/e2e/presets/state/.wf/metadata.json delete mode 100644 tests/e2e/presets/state/ui.json diff --git a/tests/e2e/index.js b/tests/e2e/index.js index 813f86914..81160425c 100644 --- a/tests/e2e/index.js +++ b/tests/e2e/index.js @@ -1,5 +1,6 @@ const express = require("express"); -const fs = require("node:fs").promises; +const fs = require("node:fs/promises"); +const path = require("node:path"); const { spawn } = require("node:child_process"); const httpProxy = require("http-proxy"); @@ -109,7 +110,7 @@ class WriterProcessPool { async start(preset) { const id = this.genId.next().value; await fs.mkdir(`./runtime/${id}`); - await fs.copyFile(`./presets/${preset}/ui.json`, `./runtime/${id}/ui.json`); + await fs.cp(`./presets/${preset}/.wf`, `./runtime/${id}/.wf`, { recursive: true }); await fs.copyFile(`./presets/${preset}/main.py`, `./runtime/${id}/main.py`); const process = new WriterProcess(`./runtime/${id}`, this.genPort.next().value); await process.start(); @@ -126,6 +127,7 @@ class WriterProcessPool { await fs.rm(`./runtime/${id}`, { recursive: true }); } + } const sspp = new WriterProcessPool(); diff --git a/tests/e2e/presets/2columns/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl b/tests/e2e/presets/2columns/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl new file mode 100644 index 000000000..3b4eb99de --- /dev/null +++ b/tests/e2e/presets/2columns/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl @@ -0,0 +1,5 @@ +{"id": "qlbz49xq2emx9ip4", "type": "page", "content": {}, "parentId": "root", "position": 0, "handlers": {}, "visible": true} +{"id": "3fzi2hkb6fzfgf40", "type": "section", "content": {"title": ""}, "parentId": "qlbz49xq2emx9ip4", "position": 0, "handlers": {}, "visible": true} +{"id": "gm7nov9whz3q0i7l", "type": "columns", "parentId": "3fzi2hkb6fzfgf40", "content": {}, "handlers": {}, "position": 0, "visible": true} +{"id": "kj09cwig8j3336jc", "type": "column", "parentId": "gm7nov9whz3q0i7l", "content": {"width": "1"}, "handlers": {}, "position": 0, "visible": true} +{"id": "f5kw67b26pht1iys", "type": "column", "parentId": "gm7nov9whz3q0i7l", "content": {"width": "1"}, "handlers": {}, "position": 1, "visible": true} diff --git a/tests/e2e/presets/2columns/.wf/components-root.jsonl b/tests/e2e/presets/2columns/.wf/components-root.jsonl new file mode 100644 index 000000000..bfb175410 --- /dev/null +++ b/tests/e2e/presets/2columns/.wf/components-root.jsonl @@ -0,0 +1 @@ +{"id": "root", "type": "root", "content": {"appName": "My App"}, "parentId": null, "position": 0, "handlers": {}, "visible": true} \ No newline at end of file diff --git a/tests/e2e/presets/2columns/.wf/metadata.json b/tests/e2e/presets/2columns/.wf/metadata.json new file mode 100644 index 000000000..5e57f3d40 --- /dev/null +++ b/tests/e2e/presets/2columns/.wf/metadata.json @@ -0,0 +1,3 @@ +{ + "writer_version": "0.3.0" +} \ No newline at end of file diff --git a/tests/e2e/presets/2columns/ui.json b/tests/e2e/presets/2columns/ui.json deleted file mode 100644 index 1dd7a8c9f..000000000 --- a/tests/e2e/presets/2columns/ui.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "metadata": { - "writer_version": "0.3.0" - }, - "components": { - "root": { - "id": "root", - "type": "root", - "content": { - "appName": "My App" - }, - "parentId": null, - "position": 0, - "handlers": {}, - "visible": true - }, - "qlbz49xq2emx9ip4": { - "id": "qlbz49xq2emx9ip4", - "type": "page", - "content": {}, - "parentId": "root", - "position": 0, - "handlers": {}, - "visible": true - }, - "3fzi2hkb6fzfgf40": { - "id": "3fzi2hkb6fzfgf40", - "type": "section", - "content": { - "title": "" - }, - "parentId": "qlbz49xq2emx9ip4", - "position": 0, - "handlers": {}, - "visible": true - }, - "gm7nov9whz3q0i7l": { - "id": "gm7nov9whz3q0i7l", - "type": "columns", - "parentId": "3fzi2hkb6fzfgf40", - "content": {}, - "handlers": {}, - "position": 0, - "visible": true - }, - "kj09cwig8j3336jc": { - "id": "kj09cwig8j3336jc", - "type": "column", - "parentId": "gm7nov9whz3q0i7l", - "content": { - "width": "1" - }, - "handlers": {}, - "position": 0, - "visible": true - }, - "f5kw67b26pht1iys": { - "id": "f5kw67b26pht1iys", - "type": "column", - "parentId": "gm7nov9whz3q0i7l", - "content": { - "width": "1" - }, - "handlers": {}, - "position": 1, - "visible": true - } - } -} \ No newline at end of file diff --git a/tests/e2e/presets/2pages/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl b/tests/e2e/presets/2pages/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl new file mode 100644 index 000000000..e3a661971 --- /dev/null +++ b/tests/e2e/presets/2pages/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl @@ -0,0 +1 @@ +{"id": "qlbz49xq2emx9ip4", "type": "page", "content": {"key": "page1"}, "position": 0, "parentId": "root", "handlers": {}, "visible": true} diff --git a/tests/e2e/presets/2pages/.wf/components-page-1-6gnhb317w7k76uhw.jsonl b/tests/e2e/presets/2pages/.wf/components-page-1-6gnhb317w7k76uhw.jsonl new file mode 100644 index 000000000..50e12e43f --- /dev/null +++ b/tests/e2e/presets/2pages/.wf/components-page-1-6gnhb317w7k76uhw.jsonl @@ -0,0 +1 @@ +{"id": "6gnhb317w7k76uhw", "type": "page", "parentId": "root", "content": {"key": "page2"}, "handlers": {}, "position": 1, "visible": true} diff --git a/tests/e2e/presets/2pages/.wf/components-root.jsonl b/tests/e2e/presets/2pages/.wf/components-root.jsonl new file mode 100644 index 000000000..600a9dbdf --- /dev/null +++ b/tests/e2e/presets/2pages/.wf/components-root.jsonl @@ -0,0 +1 @@ +{"id": "root", "type": "root", "content": {"appName": "My App"}, "position": 0, "handlers": {}, "visible": true} \ No newline at end of file diff --git a/tests/e2e/presets/2pages/.wf/metadata.json b/tests/e2e/presets/2pages/.wf/metadata.json new file mode 100644 index 000000000..5e57f3d40 --- /dev/null +++ b/tests/e2e/presets/2pages/.wf/metadata.json @@ -0,0 +1,3 @@ +{ + "writer_version": "0.3.0" +} \ No newline at end of file diff --git a/tests/e2e/presets/2pages/ui.json b/tests/e2e/presets/2pages/ui.json deleted file mode 100644 index 5f220d1b9..000000000 --- a/tests/e2e/presets/2pages/ui.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "metadata": { - "writer_version": "0.3.0" - }, - "components": { - "root": { - "id": "root", - "type": "root", - "content": { - "appName": "My App" - }, - "position": 0, - "handlers": {}, - "visible": true - }, - "qlbz49xq2emx9ip4": { - "id": "qlbz49xq2emx9ip4", - "type": "page", - "content": { - "key": "page1" - }, - "position": 0, - "parentId": "root", - "handlers": {}, - "visible": true - }, - "6gnhb317w7k76uhw": { - "id": "6gnhb317w7k76uhw", - "type": "page", - "parentId": "root", - "content": { - "key": "page2" - }, - "handlers": {}, - "position": 1, - "visible": true - } - } -} \ No newline at end of file diff --git a/tests/e2e/presets/empty_page/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl b/tests/e2e/presets/empty_page/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl new file mode 100644 index 000000000..1590ab3a5 --- /dev/null +++ b/tests/e2e/presets/empty_page/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl @@ -0,0 +1 @@ +{"id": "qlbz49xq2emx9ip4", "type": "page", "content": {}, "parentId": "root", "position": 0, "handlers": {}, "visible": true} diff --git a/tests/e2e/presets/empty_page/.wf/components-root.jsonl b/tests/e2e/presets/empty_page/.wf/components-root.jsonl new file mode 100644 index 000000000..bfb175410 --- /dev/null +++ b/tests/e2e/presets/empty_page/.wf/components-root.jsonl @@ -0,0 +1 @@ +{"id": "root", "type": "root", "content": {"appName": "My App"}, "parentId": null, "position": 0, "handlers": {}, "visible": true} \ No newline at end of file diff --git a/tests/e2e/presets/empty_page/.wf/metadata.json b/tests/e2e/presets/empty_page/.wf/metadata.json new file mode 100644 index 000000000..5e57f3d40 --- /dev/null +++ b/tests/e2e/presets/empty_page/.wf/metadata.json @@ -0,0 +1,3 @@ +{ + "writer_version": "0.3.0" +} \ No newline at end of file diff --git a/tests/e2e/presets/empty_page/ui.json b/tests/e2e/presets/empty_page/ui.json deleted file mode 100644 index 419411f87..000000000 --- a/tests/e2e/presets/empty_page/ui.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "metadata": { - "writer_version": "0.3.0" - }, - "components": { - "root": { - "id": "root", - "type": "root", - "content": { - "appName": "My App" - }, - "parentId": null, - "position": 0, - "handlers": {}, - "visible": true - }, - "qlbz49xq2emx9ip4": { - "id": "qlbz49xq2emx9ip4", - "type": "page", - "content": {}, - "parentId": "root", - "position": 0, - "handlers": {}, - "visible": true - } - } -} diff --git a/tests/e2e/presets/jsonviewer/.wf/components-page-0-bb4d0e86-619e-4367-a180-be28ab6059f4.jsonl b/tests/e2e/presets/jsonviewer/.wf/components-page-0-bb4d0e86-619e-4367-a180-be28ab6059f4.jsonl new file mode 100644 index 000000000..05daf9e82 --- /dev/null +++ b/tests/e2e/presets/jsonviewer/.wf/components-page-0-bb4d0e86-619e-4367-a180-be28ab6059f4.jsonl @@ -0,0 +1,2 @@ +{"id": "bb4d0e86-619e-4367-a180-be28ab6059f4", "type": "page", "content": {"pageMode": "", "key": "main"}, "isCodeManaged": false, "position": 0, "parentId": "root"} +{"id": "fa1r81mv2rrdhfh9", "type": "jsonviewer", "content": {"data": "{\"name\":\"JSON Viewer\",\"description\":\"A JSON tree viewer where you can expand the keys.\",\"sample\":{\"description\":\"This sample is opened by default\",\"bool\":true,\"null\":null,\"list\":[1,\"two\",{\"key\":3}]},\"sampleClosed\":{\"description\":\"This sample is not opened by default\"},\"createdAt\":\"2024-08-13T20:45:15.668Z\"}", "initialDepth": "0"}, "isCodeManaged": false, "position": 0, "parentId": "bb4d0e86-619e-4367-a180-be28ab6059f4", "handlers": {}, "visible": true} diff --git a/tests/e2e/presets/jsonviewer/.wf/components-root.jsonl b/tests/e2e/presets/jsonviewer/.wf/components-root.jsonl new file mode 100644 index 000000000..746b76e3a --- /dev/null +++ b/tests/e2e/presets/jsonviewer/.wf/components-root.jsonl @@ -0,0 +1 @@ +{"id": "root", "type": "root", "content": {"appName": "Hello", "emptinessColor": "#ffffff"}, "isCodeManaged": false, "position": 0} \ No newline at end of file diff --git a/tests/e2e/presets/jsonviewer/.wf/metadata.json b/tests/e2e/presets/jsonviewer/.wf/metadata.json new file mode 100644 index 000000000..d22b58623 --- /dev/null +++ b/tests/e2e/presets/jsonviewer/.wf/metadata.json @@ -0,0 +1,3 @@ +{ + "writer_version": "0.6.2rc3" +} \ No newline at end of file diff --git a/tests/e2e/presets/jsonviewer/ui.json b/tests/e2e/presets/jsonviewer/ui.json deleted file mode 100644 index a74a63408..000000000 --- a/tests/e2e/presets/jsonviewer/ui.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "metadata": { - "writer_version": "0.6.2rc3" - }, - "components": { - "root": { - "id": "root", - "type": "root", - "content": { - "appName": "Hello", - "emptinessColor": "#ffffff" - }, - "isCodeManaged": false, - "position": 0 - }, - "bb4d0e86-619e-4367-a180-be28ab6059f4": { - "id": "bb4d0e86-619e-4367-a180-be28ab6059f4", - "type": "page", - "content": { - "pageMode": "", - "key": "main" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "root" - }, - "fa1r81mv2rrdhfh9": { - "id": "fa1r81mv2rrdhfh9", - "type": "jsonviewer", - "content": { - "data": "{\"name\":\"JSON Viewer\",\"description\":\"A JSON tree viewer where you can expand the keys.\",\"sample\":{\"description\":\"This sample is opened by default\",\"bool\":true,\"null\":null,\"list\":[1,\"two\",{\"key\":3}]},\"sampleClosed\":{\"description\":\"This sample is not opened by default\"},\"createdAt\":\"2024-08-13T20:45:15.668Z\"}", - "initialDepth": "0" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "bb4d0e86-619e-4367-a180-be28ab6059f4", - "handlers": {}, - "visible": true - } - } -} - diff --git a/tests/e2e/presets/low_code/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl b/tests/e2e/presets/low_code/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl new file mode 100644 index 000000000..ce51b7928 --- /dev/null +++ b/tests/e2e/presets/low_code/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl @@ -0,0 +1,7 @@ +{"id": "qlbz49xq2emx9ip4", "type": "page", "content": {"key": "setup"}, "isCodeManaged": false, "position": 0, "parentId": "root", "handlers": {}, "visible": true} +{"id": "0jbl2x7sl5gbjdnl", "type": "section", "content": {"title": "Test"}, "isCodeManaged": false, "position": 0, "parentId": "qlbz49xq2emx9ip4", "handlers": {}, "visible": true} +{"id": "byk3srfwyj1hn4wl", "type": "button", "content": {"text": "Run test", "cssClasses": "TestExec"}, "isCodeManaged": false, "position": 1, "parentId": "0jbl2x7sl5gbjdnl", "handlers": {"wf-click": "execute_test"}, "visible": true} +{"id": "1ybermv0ttvw4lhk", "type": "textareainput", "content": {"label": "Input Label", "rows": "5", "cssClasses": "TestInput"}, "isCodeManaged": false, "position": 0, "parentId": "0jbl2x7sl5gbjdnl", "handlers": {}, "visible": true, "binding": {"eventType": "wf-change", "stateRef": "code"}} +{"id": "results", "type": "section", "content": {"title": "Test Results", "cssClasses": "results"}, "isCodeManaged": false, "position": 1, "parentId": "qlbz49xq2emx9ip4", "handlers": {}, "visible": true} +{"id": "5756wvfy52nzjnrl", "type": "textinput", "parentId": "0jbl2x7sl5gbjdnl", "content": {"label": "Input Label"}, "handlers": {}, "position": 2, "visible": true} +{"id": "initialization", "type": "section", "parentId": "qlbz49xq2emx9ip4", "content": {"title": "Initialization", "cssClasses": "initialization"}, "handlers": {}, "position": 2, "visible": true} diff --git a/tests/e2e/presets/low_code/.wf/components-root.jsonl b/tests/e2e/presets/low_code/.wf/components-root.jsonl new file mode 100644 index 000000000..0ae8fa025 --- /dev/null +++ b/tests/e2e/presets/low_code/.wf/components-root.jsonl @@ -0,0 +1 @@ +{"id": "root", "type": "root", "content": {"appName": "My App"}, "isCodeManaged": false, "position": 0, "handlers": {}, "visible": true} \ No newline at end of file diff --git a/tests/e2e/presets/low_code/.wf/metadata.json b/tests/e2e/presets/low_code/.wf/metadata.json new file mode 100644 index 000000000..5e57f3d40 --- /dev/null +++ b/tests/e2e/presets/low_code/.wf/metadata.json @@ -0,0 +1,3 @@ +{ + "writer_version": "0.3.0" +} \ No newline at end of file diff --git a/tests/e2e/presets/low_code/ui.json b/tests/e2e/presets/low_code/ui.json deleted file mode 100644 index 2747b5685..000000000 --- a/tests/e2e/presets/low_code/ui.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "metadata": { - "writer_version": "0.3.0" - }, - "components": { - "root": { - "id": "root", - "type": "root", - "content": { - "appName": "My App" - }, - "isCodeManaged": false, - "position": 0, - "handlers": {}, - "visible": true - }, - "qlbz49xq2emx9ip4": { - "id": "qlbz49xq2emx9ip4", - "type": "page", - "content": { - "key": "setup" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "root", - "handlers": {}, - "visible": true - }, - "0jbl2x7sl5gbjdnl": { - "id": "0jbl2x7sl5gbjdnl", - "type": "section", - "content": { - "title": "Test" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "qlbz49xq2emx9ip4", - "handlers": {}, - "visible": true - }, - "byk3srfwyj1hn4wl": { - "id": "byk3srfwyj1hn4wl", - "type": "button", - "content": { - "text": "Run test", - "cssClasses": "TestExec" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "0jbl2x7sl5gbjdnl", - "handlers": { - "wf-click": "execute_test" - }, - "visible": true - }, - "1ybermv0ttvw4lhk": { - "id": "1ybermv0ttvw4lhk", - "type": "textareainput", - "content": { - "label": "Input Label", - "rows": "5", - "cssClasses": "TestInput" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "0jbl2x7sl5gbjdnl", - "handlers": {}, - "visible": true, - "binding": { - "eventType": "wf-change", - "stateRef": "code" - } - }, - "results": { - "id": "results", - "type": "section", - "content": { - "title": "Test Results", - "cssClasses": "results" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "qlbz49xq2emx9ip4", - "handlers": {}, - "visible": true - }, - "5756wvfy52nzjnrl": { - "id": "5756wvfy52nzjnrl", - "type": "textinput", - "parentId": "0jbl2x7sl5gbjdnl", - "content": { - "label": "Input Label" - }, - "handlers": {}, - "position": 2, - "visible": true - }, - "initialization": { - "id": "initialization", - "type": "section", - "parentId": "qlbz49xq2emx9ip4", - "content": { - "title": "Initialization", - "cssClasses": "initialization" - }, - "handlers": {}, - "position": 2, - "visible": true - } - } -} diff --git a/tests/e2e/presets/section/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl b/tests/e2e/presets/section/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl new file mode 100644 index 000000000..992c59edd --- /dev/null +++ b/tests/e2e/presets/section/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl @@ -0,0 +1,2 @@ +{"id": "qlbz49xq2emx9ip4", "type": "page", "content": {}, "parentId": "root", "position": 0, "handlers": {}, "visible": true} +{"id": "3fzi2hkb6fzfgf40", "type": "section", "parentId": "qlbz49xq2emx9ip4", "content": {"title": ""}, "handlers": {}, "position": 0, "visible": true} diff --git a/tests/e2e/presets/section/.wf/components-root.jsonl b/tests/e2e/presets/section/.wf/components-root.jsonl new file mode 100644 index 000000000..bfb175410 --- /dev/null +++ b/tests/e2e/presets/section/.wf/components-root.jsonl @@ -0,0 +1 @@ +{"id": "root", "type": "root", "content": {"appName": "My App"}, "parentId": null, "position": 0, "handlers": {}, "visible": true} \ No newline at end of file diff --git a/tests/e2e/presets/section/.wf/metadata.json b/tests/e2e/presets/section/.wf/metadata.json new file mode 100644 index 000000000..5e57f3d40 --- /dev/null +++ b/tests/e2e/presets/section/.wf/metadata.json @@ -0,0 +1,3 @@ +{ + "writer_version": "0.3.0" +} \ No newline at end of file diff --git a/tests/e2e/presets/section/ui.json b/tests/e2e/presets/section/ui.json deleted file mode 100644 index da150f98a..000000000 --- a/tests/e2e/presets/section/ui.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "metadata": { - "writer_version": "0.3.0" - }, - "components": { - "root": { - "id": "root", - "type": "root", - "content": { - "appName": "My App" - }, - "parentId": null, - "position": 0, - "handlers": {}, - "visible": true - }, - "qlbz49xq2emx9ip4": { - "id": "qlbz49xq2emx9ip4", - "type": "page", - "content": {}, - "parentId": "root", - "position": 0, - "handlers": {}, - "visible": true - }, - "3fzi2hkb6fzfgf40": { - "id": "3fzi2hkb6fzfgf40", - "type": "section", - "parentId": "qlbz49xq2emx9ip4", - "content": { - "title": "" - }, - "handlers": {}, - "position": 0, - "visible": true - } - } -} diff --git a/tests/e2e/presets/state/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl b/tests/e2e/presets/state/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl new file mode 100644 index 000000000..52831b530 --- /dev/null +++ b/tests/e2e/presets/state/.wf/components-page-0-qlbz49xq2emx9ip4.jsonl @@ -0,0 +1,5 @@ +{"id": "qlbz49xq2emx9ip4", "type": "page", "content": {}, "parentId": "root", "position": 0, "handlers": {}, "visible": true} +{"id": "0jbl2x7sl5gbjdnl", "type": "section", "content": {"title": "Section Title"}, "parentId": "qlbz49xq2emx9ip4", "position": 0, "handlers": {}, "visible": true} +{"id": "byk3srfwyj1hn4wl", "type": "button", "content": {"text": "Run test", "cssClasses": "TestExec"}, "parentId": "0jbl2x7sl5gbjdnl", "position": 2, "handlers": {"wf-click": "execute_test"}, "visible": true} +{"id": "kdoy3ak62vcre8or", "type": "text", "content": {"text": "@{data.counter}", "cssClasses": "TestResult"}, "parentId": "0jbl2x7sl5gbjdnl", "position": 0, "handlers": {}, "visible": true} +{"id": "1ybermv0ttvw4lhk", "type": "textareainput", "content": {"label": "Input Label", "rows": "5", "cssClasses": "TestInput"}, "parentId": "0jbl2x7sl5gbjdnl", "position": 1, "handlers": {}, "binding": {"eventType": "wf-change", "stateRef": "code"}, "visible": true} diff --git a/tests/e2e/presets/state/.wf/components-root.jsonl b/tests/e2e/presets/state/.wf/components-root.jsonl new file mode 100644 index 000000000..bfb175410 --- /dev/null +++ b/tests/e2e/presets/state/.wf/components-root.jsonl @@ -0,0 +1 @@ +{"id": "root", "type": "root", "content": {"appName": "My App"}, "parentId": null, "position": 0, "handlers": {}, "visible": true} \ No newline at end of file diff --git a/tests/e2e/presets/state/.wf/metadata.json b/tests/e2e/presets/state/.wf/metadata.json new file mode 100644 index 000000000..5e57f3d40 --- /dev/null +++ b/tests/e2e/presets/state/.wf/metadata.json @@ -0,0 +1,3 @@ +{ + "writer_version": "0.3.0" +} \ No newline at end of file diff --git a/tests/e2e/presets/state/ui.json b/tests/e2e/presets/state/ui.json deleted file mode 100644 index f2c418f79..000000000 --- a/tests/e2e/presets/state/ui.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "metadata": { - "writer_version": "0.3.0" - }, - "components": { - "root": { - "id": "root", - "type": "root", - "content": { - "appName": "My App" - }, - "parentId": null, - "position": 0, - "handlers": {}, - "visible": true - }, - "qlbz49xq2emx9ip4": { - "id": "qlbz49xq2emx9ip4", - "type": "page", - "content": {}, - "parentId": "root", - "position": 0, - "handlers": {}, - "visible": true - }, - "0jbl2x7sl5gbjdnl": { - "id": "0jbl2x7sl5gbjdnl", - "type": "section", - "content": { - "title": "Section Title" - }, - "parentId": "qlbz49xq2emx9ip4", - "position": 0, - "handlers": {}, - "visible": true - }, - "byk3srfwyj1hn4wl": { - "id": "byk3srfwyj1hn4wl", - "type": "button", - "content": { - "text": "Run test", - "cssClasses": "TestExec" - }, - "parentId": "0jbl2x7sl5gbjdnl", - "position": 2, - "handlers": { - "wf-click": "execute_test" - }, - "visible": true - }, - "kdoy3ak62vcre8or": { - "id": "kdoy3ak62vcre8or", - "type": "text", - "content": { - "text": "@{data.counter}", - "cssClasses": "TestResult" - }, - "parentId": "0jbl2x7sl5gbjdnl", - "position": 0, - "handlers": {}, - "visible": true - }, - "1ybermv0ttvw4lhk": { - "id": "1ybermv0ttvw4lhk", - "type": "textareainput", - "content": { - "label": "Input Label", - "rows": "5", - "cssClasses": "TestInput" - }, - "parentId": "0jbl2x7sl5gbjdnl", - "position": 1, - "handlers": {}, - "binding": { - "eventType": "wf-change", - "stateRef": "code" - }, - "visible": true - } - } -} \ No newline at end of file