@kumologica/sdk 3.2.0-beta9 → 4.0.0-alpha2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/kl.js +1 -1
- package/cli/cli.js +0 -2
- package/cli/commands/create-commands/create-project-iteratively.js +14 -7
- package/cli/commands/create.js +16 -15
- package/cli/commands/open.js +12 -5
- package/cli/commands/start.js +165 -0
- package/cli/commands/test/TestSuiteRunner.js +76 -0
- package/cli/commands/test.js +92 -120
- package/cli/utils/fs/parse.js +1 -1
- package/cli/utils/logger.js +9 -3
- package/package.json +12 -114
- package/src/api/core/comms.js +141 -0
- package/src/api/core/context.js +296 -0
- package/src/api/core/flows.js +286 -0
- package/src/api/core/index.js +29 -0
- package/src/api/core/library.js +106 -0
- package/src/api/core/nodes.js +476 -0
- package/src/api/core/projects.js +426 -0
- package/src/{app/ui/editor-api/lib/admin → api/core/rest}/context.js +1 -1
- package/src/{app/ui/editor-api/lib/admin → api/core/rest}/flow.js +2 -4
- package/src/{app/ui/editor-api/lib/admin → api/core/rest}/flows.js +1 -1
- package/src/{app/ui/editor-api/lib/admin → api/core/rest}/index.js +43 -27
- package/src/{app/ui/editor-api/lib/admin → api/core/rest}/nodes.js +1 -1
- package/src/{app/ui/editor-api/lib → api/core/rest}/util.js +6 -4
- package/src/api/core/settings.js +287 -0
- package/src/api/tools/base/DesignerTool.js +108 -0
- package/src/api/tools/core/flow.js +58 -0
- package/src/api/tools/core/index.js +18 -0
- package/src/api/tools/core/node.js +77 -0
- package/src/api/tools/debugger/index.js +193 -0
- package/src/api/tools/filemanager/index.js +127 -0
- package/src/api/tools/git/index.js +103 -0
- package/src/api/tools/index.js +13 -0
- package/src/api/tools/test/index.js +56 -0
- package/src/api/tools/test/lib/TestCaseRunner.js +105 -0
- package/src/api/tools/test/lib/reporters/index.js +120 -0
- package/src/server/DesignerServer.js +141 -0
- package/cli/.DS_Store +0 -0
- package/cli/commands/test-utils/TestSuiteController.js +0 -363
- package/cli/commands/test-utils/TestSuiteController.test.js +0 -171
- package/cli/commands/test-utils/util/output.js +0 -14
- package/cli/commands/test-utils/util/updates/index.js +0 -17
- package/cli/commands/test-utils/util/updates/pkg.js +0 -13
- package/cli/commands/test-utils/util/updates/templates/default-settings.js +0 -209
- package/src/app/lib/aws/aws-profile.js +0 -43
- package/src/app/lib/aws/ca-alexa-api.js +0 -29
- package/src/app/lib/aws/ca-apigw-api.js +0 -216
- package/src/app/lib/aws/ca-cloudwatch-api.js +0 -78
- package/src/app/lib/aws/ca-codecommit-api.js +0 -63
- package/src/app/lib/aws/ca-dynamodb-api.js +0 -27
- package/src/app/lib/aws/ca-elb-api.js +0 -44
- package/src/app/lib/aws/ca-events-api.js +0 -27
- package/src/app/lib/aws/ca-iot-api.js +0 -105
- package/src/app/lib/aws/ca-s3-api.js +0 -115
- package/src/app/lib/aws/ca-sns-api.js +0 -38
- package/src/app/lib/aws/ca-sqs-api.js +0 -51
- package/src/app/lib/aws/cf.js +0 -449
- package/src/app/lib/aws/index.js +0 -988
- package/src/app/lib/aws/kl-iam-api.js +0 -27
- package/src/app/lib/aws/kl-rekognition-api.js +0 -66
- package/src/app/lib/aws/kl-ssm-api.js +0 -24
- package/src/app/lib/azure/index.js +0 -80
- package/src/app/lib/dependencies.js +0 -50
- package/src/app/lib/kumohub/index.js +0 -201
- package/src/app/lib/runtime-loader/index.js +0 -42
- package/src/app/lib/serverless/index.js +0 -318
- package/src/app/lib/stores/aws-cloud-config-store.js +0 -35
- package/src/app/lib/stores/azure-config-store.js +0 -24
- package/src/app/lib/stores/kumohub-config-store.js +0 -24
- package/src/app/lib/stores/project-info-config-store.js +0 -26
- package/src/app/lib/stores/settings-cloud-store.js +0 -120
- package/src/app/lib/stores/settings-cloud-store.spec.js +0 -26
- package/src/app/lib/stores/settings-network-store.js +0 -118
- package/src/app/lib/stores/settings-network-store.spec.js +0 -27
- package/src/app/lib/stores/store.js +0 -97
- package/src/app/lib/stores/test-config-store.js +0 -159
- package/src/app/lib/stores/user-preference-store.js +0 -44
- package/src/app/lib/stores/util/iniParser.js +0 -46
- package/src/app/lib/stores/util/iniParser.spec.js +0 -72
- package/src/app/lib/utils/editor.js +0 -98
- package/src/app/lib/utils/fix-path.js +0 -15
- package/src/app/main-process/editor-manager.js +0 -177
- package/src/app/main-process/favicon.ico +0 -0
- package/src/app/main-process/main-window.js +0 -214
- package/src/app/main-process/menu.js +0 -420
- package/src/app/main-process/modal-home.js +0 -122
- package/src/app/main-process/modal-newproject.js +0 -123
- package/src/app/main-process/modal-newtab.js +0 -96
- package/src/app/main-process/modal-nodelibrary.js +0 -94
- package/src/app/main-process/modal-welcome.js +0 -119
- package/src/app/main.js +0 -620
- package/src/app/preload.js +0 -649
- package/src/app/ui/editor-api/lib/auth/clients.js +0 -17
- package/src/app/ui/editor-api/lib/auth/index.js +0 -269
- package/src/app/ui/editor-api/lib/auth/permissions.js +0 -51
- package/src/app/ui/editor-api/lib/auth/strategies.js +0 -144
- package/src/app/ui/editor-api/lib/auth/tokens.js +0 -138
- package/src/app/ui/editor-api/lib/auth/users.js +0 -122
- package/src/app/ui/editor-api/lib/editor/comms.js +0 -247
- package/src/app/ui/editor-api/lib/editor/credentials.js +0 -22
- package/src/app/ui/editor-api/lib/editor/index.js +0 -242
- package/src/app/ui/editor-api/lib/editor/library.js +0 -69
- package/src/app/ui/editor-api/lib/editor/locales.js +0 -37
- package/src/app/ui/editor-api/lib/editor/projects.js +0 -497
- package/src/app/ui/editor-api/lib/editor/settings.js +0 -118
- package/src/app/ui/editor-api/lib/editor/sshkeys.js +0 -87
- package/src/app/ui/editor-api/lib/editor/theme.js +0 -184
- package/src/app/ui/editor-api/lib/editor/ui.js +0 -170
- package/src/app/ui/editor-api/lib/index.js +0 -149
- package/src/app/ui/editor-api/lib/runner/index.js +0 -81
- package/src/app/ui/editor-client/README.md +0 -10
- package/src/app/ui/editor-client/constants.js +0 -5
- package/src/app/ui/editor-client/index.js +0 -3
- package/src/app/ui/editor-client/public/favicon.ico +0 -0
- package/src/app/ui/editor-client/public/red/images/bolt.png +0 -0
- package/src/app/ui/editor-client/public/red/images/debugger/continue-full.png +0 -0
- package/src/app/ui/editor-client/public/red/images/debugger/continue-outline.png +0 -0
- package/src/app/ui/editor-client/public/red/images/debugger/pause.png +0 -0
- package/src/app/ui/editor-client/public/red/images/debugger/restart.png +0 -0
- package/src/app/ui/editor-client/public/red/images/debugger/stepover.png +0 -0
- package/src/app/ui/editor-client/public/red/images/debugger/stop.png +0 -0
- package/src/app/ui/editor-client/public/red/images/deploy-flows-o.png +0 -0
- package/src/app/ui/editor-client/public/red/images/deploy-flows.png +0 -0
- package/src/app/ui/editor-client/public/red/images/deploy-full-o.png +0 -0
- package/src/app/ui/editor-client/public/red/images/deploy-full.png +0 -0
- package/src/app/ui/editor-client/public/red/images/deploy-nodes-o.png +0 -0
- package/src/app/ui/editor-client/public/red/images/deploy-nodes.png +0 -0
- package/src/app/ui/editor-client/public/red/images/deploy-reload.png +0 -0
- package/src/app/ui/editor-client/public/red/images/grip.png +0 -0
- package/src/app/ui/editor-client/public/red/images/icons/arrow-in.png +0 -0
- package/src/app/ui/editor-client/public/red/images/icons/bolt.png +0 -0
- package/src/app/ui/editor-client/public/red/images/icons/node-changed.png +0 -0
- package/src/app/ui/editor-client/public/red/images/icons/node-error.png +0 -0
- package/src/app/ui/editor-client/public/red/images/icons/node-play.png +0 -0
- package/src/app/ui/editor-client/public/red/images/kumologica-app.png +0 -0
- package/src/app/ui/editor-client/public/red/images/node-red-256.png +0 -0
- package/src/app/ui/editor-client/public/red/images/node-red-icon-black.svg +0 -9
- package/src/app/ui/editor-client/public/red/images/node-red-icon.svg +0 -33
- package/src/app/ui/editor-client/public/red/images/node-red.png +0 -0
- package/src/app/ui/editor-client/public/red/images/pw_maze_white.png +0 -0
- package/src/app/ui/editor-client/public/red/images/spin.svg +0 -41
- package/src/app/ui/editor-client/public/red/images/spinner.gif +0 -0
- package/src/app/ui/editor-client/public/red/images/subflow_tab.png +0 -0
- package/src/app/ui/editor-client/public/red/images/test-icon.png +0 -0
- package/src/app/ui/editor-client/public/red/images/typedInput/09.png +0 -0
- package/src/app/ui/editor-client/public/red/images/typedInput/az.png +0 -0
- package/src/app/ui/editor-client/public/red/images/typedInput/bin.png +0 -0
- package/src/app/ui/editor-client/public/red/images/typedInput/bool.png +0 -0
- package/src/app/ui/editor-client/public/red/images/typedInput/env.png +0 -0
- package/src/app/ui/editor-client/public/red/images/typedInput/expr.png +0 -0
- package/src/app/ui/editor-client/public/red/images/typedInput/json.png +0 -0
- package/src/app/ui/editor-client/public/red/images/typedInput/re.png +0 -0
- package/src/app/ui/editor-client/public/red/keymap.json +0 -54
- package/src/app/ui/editor-client/public/red/main-modals.js +0 -14
- package/src/app/ui/editor-client/public/red/main-modals.min.js +0 -1
- package/src/app/ui/editor-client/public/red/main.js +0 -10
- package/src/app/ui/editor-client/public/red/main.min.js +0 -1
- package/src/app/ui/editor-client/public/red/red.js +0 -45913
- package/src/app/ui/editor-client/public/red/red.min.js +0 -19
- package/src/app/ui/editor-client/public/red/style.min.css +0 -9
- package/src/app/ui/editor-client/public/vendor/ace/LICENSE +0 -24
- package/src/app/ui/editor-client/public/vendor/ace/ace.js +0 -17
- package/src/app/ui/editor-client/public/vendor/ace/ext-language_tools.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/ext-searchbox.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-css.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-handlebars.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-html.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-javascript.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-json.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-jsonata.js +0 -1
- package/src/app/ui/editor-client/public/vendor/ace/mode-markdown.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-properties.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-python.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-sql.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-swift.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-text.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-xml.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-yaml.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/css.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/handlebars.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/html.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/javascript.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/json.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/jsonata.js +0 -1
- package/src/app/ui/editor-client/public/vendor/ace/snippets/markdown.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/properties.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/python.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/sql.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/swift.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/text.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/xml.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/yaml.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/theme-chrome.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/theme-tomorrow.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/worker-css.js +0 -1
- package/src/app/ui/editor-client/public/vendor/ace/worker-html.js +0 -1
- package/src/app/ui/editor-client/public/vendor/ace/worker-javascript.js +0 -1
- package/src/app/ui/editor-client/public/vendor/ace/worker-json.js +0 -1
- package/src/app/ui/editor-client/public/vendor/ace/worker-jsonata.js +0 -2140
- package/src/app/ui/editor-client/public/vendor/ace/worker-xml.js +0 -1
- package/src/app/ui/editor-client/public/vendor/beautifyjs/beautify.min.js +0 -1
- package/src/app/ui/editor-client/public/vendor/bootstrap/css/bootstrap.min.css +0 -9
- package/src/app/ui/editor-client/public/vendor/bootstrap/img/glyphicons-halflings-white.png +0 -0
- package/src/app/ui/editor-client/public/vendor/bootstrap/img/glyphicons-halflings.png +0 -0
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/active-line.js +0 -72
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/coffeescript-lint.js +0 -47
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/javascript-hint.js +0 -157
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/javascript-lint.js +0 -63
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/jshint.js +0 -29591
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/lint.css +0 -73
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/lint.js +0 -252
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/show-hint.css +0 -36
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/show-hint.js +0 -460
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/sql-hint.js +0 -304
- package/src/app/ui/editor-client/public/vendor/code-mirror/lib/codemirror.css +0 -350
- package/src/app/ui/editor-client/public/vendor/code-mirror/lib/codemirror.js +0 -9800
- package/src/app/ui/editor-client/public/vendor/code-mirror/mode/javascript.js +0 -927
- package/src/app/ui/editor-client/public/vendor/code-mirror/mode/sql.js +0 -494
- package/src/app/ui/editor-client/public/vendor/code-mirror/theme/base16-dark.css +0 -38
- package/src/app/ui/editor-client/public/vendor/code-mirror/theme/monokai.css +0 -42
- package/src/app/ui/editor-client/public/vendor/code-mirror/theme/solarized.css +0 -168
- package/src/app/ui/editor-client/public/vendor/d3-context-menu/d3-context-menu.css +0 -43
- package/src/app/ui/editor-client/public/vendor/d3-context-menu/d3-context-menu.js +0 -86
- package/src/app/ui/editor-client/public/vendor/easy-json-schema/index.js +0 -88
- package/src/app/ui/editor-client/public/vendor/electron-tabs/electron-tabs.js +0 -2907
- package/src/app/ui/editor-client/public/vendor/font-awesome/css/font-awesome.min.css +0 -4
- package/src/app/ui/editor-client/public/vendor/font-awesome/fonts/FontAwesome.otf +0 -0
- package/src/app/ui/editor-client/public/vendor/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- package/src/app/ui/editor-client/public/vendor/font-awesome/fonts/fontawesome-webfont.svg +0 -2671
- package/src/app/ui/editor-client/public/vendor/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- package/src/app/ui/editor-client/public/vendor/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- package/src/app/ui/editor-client/public/vendor/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- package/src/app/ui/editor-client/public/vendor/icofont/fonts/icofont.eot +0 -0
- package/src/app/ui/editor-client/public/vendor/icofont/fonts/icofont.svg +0 -2105
- package/src/app/ui/editor-client/public/vendor/icofont/fonts/icofont.ttf +0 -0
- package/src/app/ui/editor-client/public/vendor/icofont/fonts/icofont.woff +0 -0
- package/src/app/ui/editor-client/public/vendor/icofont/fonts/icofont.woff2 +0 -0
- package/src/app/ui/editor-client/public/vendor/icofont/icofont.min.css +0 -7
- package/src/app/ui/editor-client/public/vendor/jqtree/tree.jquery.js +0 -119
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/animated-overlay.gif +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css +0 -5
- package/src/app/ui/editor-client/public/vendor/jsonata/jsonata.min.js +0 -190
- package/src/app/ui/editor-client/public/vendor/kumologica/http-test-case.js +0 -131
- package/src/app/ui/editor-client/public/vendor/misc/toggleswitch.css +0 -181
- package/src/app/ui/editor-client/public/vendor/misc/toggleswitch.js +0 -48
- package/src/app/ui/editor-client/public/vendor/simplemde/simplemde.min.css +0 -7
- package/src/app/ui/editor-client/public/vendor/simplemde/simplemde.min.js +0 -15
- package/src/app/ui/editor-client/public/vendor/vendor.css +0 -517
- package/src/app/ui/editor-client/public/vendor/vendor.js +0 -2769
- package/src/app/ui/editor-client/public/vendor/xterm/lib/xterm.js +0 -2
- package/src/app/ui/editor-client/src/ace/README.md +0 -50
- package/src/app/ui/editor-client/src/ace/mode/nrjavascript.js +0 -35
- package/src/app/ui/editor-client/src/ace/mode/nrjavascript_worker.js +0 -189
- package/src/app/ui/editor-client/src/favicon.ico +0 -0
- package/src/app/ui/editor-client/src/images/bolt.png +0 -0
- package/src/app/ui/editor-client/src/images/debugger/continue-full.png +0 -0
- package/src/app/ui/editor-client/src/images/debugger/continue-outline.png +0 -0
- package/src/app/ui/editor-client/src/images/debugger/pause.png +0 -0
- package/src/app/ui/editor-client/src/images/debugger/restart.png +0 -0
- package/src/app/ui/editor-client/src/images/debugger/stepover.png +0 -0
- package/src/app/ui/editor-client/src/images/debugger/stop.png +0 -0
- package/src/app/ui/editor-client/src/images/deploy-flows-o.png +0 -0
- package/src/app/ui/editor-client/src/images/deploy-flows.png +0 -0
- package/src/app/ui/editor-client/src/images/deploy-full-o.png +0 -0
- package/src/app/ui/editor-client/src/images/deploy-full.png +0 -0
- package/src/app/ui/editor-client/src/images/deploy-nodes-o.png +0 -0
- package/src/app/ui/editor-client/src/images/deploy-nodes.png +0 -0
- package/src/app/ui/editor-client/src/images/deploy-reload.png +0 -0
- package/src/app/ui/editor-client/src/images/grip.png +0 -0
- package/src/app/ui/editor-client/src/images/icons/arrow-in.png +0 -0
- package/src/app/ui/editor-client/src/images/icons/bolt.png +0 -0
- package/src/app/ui/editor-client/src/images/icons/node-changed.png +0 -0
- package/src/app/ui/editor-client/src/images/icons/node-error.png +0 -0
- package/src/app/ui/editor-client/src/images/icons/node-play.png +0 -0
- package/src/app/ui/editor-client/src/images/kumologica-app.png +0 -0
- package/src/app/ui/editor-client/src/images/node-red-256.png +0 -0
- package/src/app/ui/editor-client/src/images/node-red-icon-black.svg +0 -9
- package/src/app/ui/editor-client/src/images/node-red-icon.svg +0 -33
- package/src/app/ui/editor-client/src/images/node-red.png +0 -0
- package/src/app/ui/editor-client/src/images/pw_maze_white.png +0 -0
- package/src/app/ui/editor-client/src/images/spin.svg +0 -41
- package/src/app/ui/editor-client/src/images/spinner.gif +0 -0
- package/src/app/ui/editor-client/src/images/subflow_tab.png +0 -0
- package/src/app/ui/editor-client/src/images/test-icon.png +0 -0
- package/src/app/ui/editor-client/src/images/typedInput/09.png +0 -0
- package/src/app/ui/editor-client/src/images/typedInput/az.png +0 -0
- package/src/app/ui/editor-client/src/images/typedInput/bin.png +0 -0
- package/src/app/ui/editor-client/src/images/typedInput/bool.png +0 -0
- package/src/app/ui/editor-client/src/images/typedInput/env.png +0 -0
- package/src/app/ui/editor-client/src/images/typedInput/expr.png +0 -0
- package/src/app/ui/editor-client/src/images/typedInput/json.png +0 -0
- package/src/app/ui/editor-client/src/images/typedInput/re.png +0 -0
- package/src/app/ui/editor-client/src/js/comms.js +0 -174
- package/src/app/ui/editor-client/src/js/events.js +0 -39
- package/src/app/ui/editor-client/src/js/font-awesome.js +0 -818
- package/src/app/ui/editor-client/src/js/history.js +0 -337
- package/src/app/ui/editor-client/src/js/i18n.js +0 -81
- package/src/app/ui/editor-client/src/js/jquery-addons.js +0 -21
- package/src/app/ui/editor-client/src/js/keymap.json +0 -54
- package/src/app/ui/editor-client/src/js/main-modals.js +0 -14
- package/src/app/ui/editor-client/src/js/main.js +0 -10
- package/src/app/ui/editor-client/src/js/modals/modal-home.js +0 -162
- package/src/app/ui/editor-client/src/js/modals/modal-new-project.js +0 -86
- package/src/app/ui/editor-client/src/js/modals/modal-new-tab.js +0 -58
- package/src/app/ui/editor-client/src/js/modals/modal-node-library.js +0 -255
- package/src/app/ui/editor-client/src/js/modals/modal-welcome.js +0 -102
- package/src/app/ui/editor-client/src/js/nodes.js +0 -1762
- package/src/app/ui/editor-client/src/js/red.js +0 -707
- package/src/app/ui/editor-client/src/js/settings.js +0 -275
- package/src/app/ui/editor-client/src/js/text/bidi.js +0 -116
- package/src/app/ui/editor-client/src/js/text/format.js +0 -1316
- package/src/app/ui/editor-client/src/js/ui/actions.js +0 -39
- package/src/app/ui/editor-client/src/js/ui/clipboard.js +0 -510
- package/src/app/ui/editor-client/src/js/ui/common/checkboxSet.js +0 -117
- package/src/app/ui/editor-client/src/js/ui/common/editableList.js +0 -322
- package/src/app/ui/editor-client/src/js/ui/common/menu.js +0 -277
- package/src/app/ui/editor-client/src/js/ui/common/panels.js +0 -104
- package/src/app/ui/editor-client/src/js/ui/common/popover.js +0 -268
- package/src/app/ui/editor-client/src/js/ui/common/searchBox.js +0 -98
- package/src/app/ui/editor-client/src/js/ui/common/stack.js +0 -184
- package/src/app/ui/editor-client/src/js/ui/common/tabs.js +0 -805
- package/src/app/ui/editor-client/src/js/ui/common/treeList.js +0 -170
- package/src/app/ui/editor-client/src/js/ui/common/typedInput.js +0 -819
- package/src/app/ui/editor-client/src/js/ui/common/typedInputLong.js +0 -829
- package/src/app/ui/editor-client/src/js/ui/deploy.js +0 -422
- package/src/app/ui/editor-client/src/js/ui/diff.js +0 -2225
- package/src/app/ui/editor-client/src/js/ui/editor.js +0 -3021
- package/src/app/ui/editor-client/src/js/ui/editors/buffer.js +0 -195
- package/src/app/ui/editor-client/src/js/ui/editors/expression.js +0 -655
- package/src/app/ui/editor-client/src/js/ui/editors/js.js +0 -90
- package/src/app/ui/editor-client/src/js/ui/editors/json.js +0 -107
- package/src/app/ui/editor-client/src/js/ui/editors/markdown.js +0 -267
- package/src/app/ui/editor-client/src/js/ui/editors/string.js +0 -75
- package/src/app/ui/editor-client/src/js/ui/event-log.js +0 -107
- package/src/app/ui/editor-client/src/js/ui/header.js +0 -373
- package/src/app/ui/editor-client/src/js/ui/keyboard.js +0 -565
- package/src/app/ui/editor-client/src/js/ui/library.js +0 -570
- package/src/app/ui/editor-client/src/js/ui/logviewer.js +0 -137
- package/src/app/ui/editor-client/src/js/ui/notifications.js +0 -282
- package/src/app/ui/editor-client/src/js/ui/palette-editor.js +0 -1061
- package/src/app/ui/editor-client/src/js/ui/palette-navigator.js +0 -144
- package/src/app/ui/editor-client/src/js/ui/palette-nodes.js +0 -789
- package/src/app/ui/editor-client/src/js/ui/palette.js +0 -62
- package/src/app/ui/editor-client/src/js/ui/project-info.js +0 -234
- package/src/app/ui/editor-client/src/js/ui/projects/projectSettings.js +0 -1651
- package/src/app/ui/editor-client/src/js/ui/projects/projectUserSettings.js +0 -404
- package/src/app/ui/editor-client/src/js/ui/projects/projects.js +0 -2395
- package/src/app/ui/editor-client/src/js/ui/projects/tab-versionControl.js +0 -1383
- package/src/app/ui/editor-client/src/js/ui/search.js +0 -374
- package/src/app/ui/editor-client/src/js/ui/sidebar.js +0 -341
- package/src/app/ui/editor-client/src/js/ui/state.js +0 -14
- package/src/app/ui/editor-client/src/js/ui/subflow.js +0 -748
- package/src/app/ui/editor-client/src/js/ui/tab-awsDeploy.js +0 -1427
- package/src/app/ui/editor-client/src/js/ui/tab-azure.js +0 -852
- package/src/app/ui/editor-client/src/js/ui/tab-config.js +0 -452
- package/src/app/ui/editor-client/src/js/ui/tab-context.js +0 -406
- package/src/app/ui/editor-client/src/js/ui/tab-git.js +0 -320
- package/src/app/ui/editor-client/src/js/ui/tab-info.js +0 -661
- package/src/app/ui/editor-client/src/js/ui/tab-kumohub.js +0 -827
- package/src/app/ui/editor-client/src/js/ui/tab-nodeInfo.js +0 -60
- package/src/app/ui/editor-client/src/js/ui/tab-test.js +0 -987
- package/src/app/ui/editor-client/src/js/ui/terminal.js +0 -240
- package/src/app/ui/editor-client/src/js/ui/touch/radialMenu.js +0 -170
- package/src/app/ui/editor-client/src/js/ui/tray.js +0 -411
- package/src/app/ui/editor-client/src/js/ui/typeSearch.js +0 -411
- package/src/app/ui/editor-client/src/js/ui/ui-settings.js +0 -499
- package/src/app/ui/editor-client/src/js/ui/update-panel.js +0 -84
- package/src/app/ui/editor-client/src/js/ui/userSettings.js +0 -673
- package/src/app/ui/editor-client/src/js/ui/utils.js +0 -1287
- package/src/app/ui/editor-client/src/js/ui/view-navigator.js +0 -169
- package/src/app/ui/editor-client/src/js/ui/view-tools.js +0 -123
- package/src/app/ui/editor-client/src/js/ui/view.js +0 -5428
- package/src/app/ui/editor-client/src/js/ui/workspaces.js +0 -555
- package/src/app/ui/editor-client/src/js/user.js +0 -282
- package/src/app/ui/editor-client/src/js/validators.js +0 -54
- package/src/app/ui/editor-client/src/kumologica-app.png +0 -0
- package/src/app/ui/editor-client/src/sass/ace.scss +0 -29
- package/src/app/ui/editor-client/src/sass/bootstrap.scss +0 -21
- package/src/app/ui/editor-client/src/sass/colors.scss +0 -78
- package/src/app/ui/editor-client/src/sass/debug.scss +0 -383
- package/src/app/ui/editor-client/src/sass/diff.scss +0 -695
- package/src/app/ui/editor-client/src/sass/dragdrop.scss +0 -37
- package/src/app/ui/editor-client/src/sass/dropdownMenu.scss +0 -93
- package/src/app/ui/editor-client/src/sass/editor.scss +0 -691
- package/src/app/ui/editor-client/src/sass/flow.scss +0 -330
- package/src/app/ui/editor-client/src/sass/forms.scss +0 -1093
- package/src/app/ui/editor-client/src/sass/header.scss +0 -524
- package/src/app/ui/editor-client/src/sass/jquery.scss +0 -152
- package/src/app/ui/editor-client/src/sass/keyboard.scss +0 -136
- package/src/app/ui/editor-client/src/sass/library.scss +0 -54
- package/src/app/ui/editor-client/src/sass/mixins.scss +0 -283
- package/src/app/ui/editor-client/src/sass/modals/modalHome.scss +0 -138
- package/src/app/ui/editor-client/src/sass/modals/modalNewProject.scss +0 -96
- package/src/app/ui/editor-client/src/sass/modals/modalNewTab.scss +0 -96
- package/src/app/ui/editor-client/src/sass/modals/modalNodeLibrary.scss +0 -131
- package/src/app/ui/editor-client/src/sass/modals/modalWelcome.scss +0 -102
- package/src/app/ui/editor-client/src/sass/notifications.scss +0 -118
- package/src/app/ui/editor-client/src/sass/palette-editor.scss +0 -275
- package/src/app/ui/editor-client/src/sass/palette.scss +0 -383
- package/src/app/ui/editor-client/src/sass/panels.scss +0 -61
- package/src/app/ui/editor-client/src/sass/popover.scss +0 -166
- package/src/app/ui/editor-client/src/sass/project-info.scss +0 -74
- package/src/app/ui/editor-client/src/sass/projects.scss +0 -875
- package/src/app/ui/editor-client/src/sass/search.scss +0 -201
- package/src/app/ui/editor-client/src/sass/sidebar.scss +0 -201
- package/src/app/ui/editor-client/src/sass/style.scss +0 -172
- package/src/app/ui/editor-client/src/sass/tab-azure.scss +0 -68
- package/src/app/ui/editor-client/src/sass/tab-cloud.scss +0 -67
- package/src/app/ui/editor-client/src/sass/tab-config.scss +0 -100
- package/src/app/ui/editor-client/src/sass/tab-context.scss +0 -54
- package/src/app/ui/editor-client/src/sass/tab-git.scss +0 -54
- package/src/app/ui/editor-client/src/sass/tab-info.scss +0 -307
- package/src/app/ui/editor-client/src/sass/tab-kumohub.scss +0 -68
- package/src/app/ui/editor-client/src/sass/tab-test.scss +0 -262
- package/src/app/ui/editor-client/src/sass/tabs.scss +0 -420
- package/src/app/ui/editor-client/src/sass/terminal.scss +0 -247
- package/src/app/ui/editor-client/src/sass/ui/common/checkboxSet.scss +0 -29
- package/src/app/ui/editor-client/src/sass/ui/common/editableList.scss +0 -81
- package/src/app/ui/editor-client/src/sass/ui/common/nodeList.scss +0 -65
- package/src/app/ui/editor-client/src/sass/ui/common/searchBox.scss +0 -78
- package/src/app/ui/editor-client/src/sass/ui/common/stack.scss +0 -26
- package/src/app/ui/editor-client/src/sass/ui/common/treeList.scss +0 -108
- package/src/app/ui/editor-client/src/sass/ui/common/typedInput.scss +0 -181
- package/src/app/ui/editor-client/src/sass/ui/common/typedInputLong.scss +0 -183
- package/src/app/ui/editor-client/src/sass/ui-settings.scss +0 -125
- package/src/app/ui/editor-client/src/sass/update-panel.scss +0 -18
- package/src/app/ui/editor-client/src/sass/userSettings.scss +0 -93
- package/src/app/ui/editor-client/src/sass/widgetStyle.scss +0 -23
- package/src/app/ui/editor-client/src/sass/workspace.scss +0 -123
- package/src/app/ui/editor-client/src/sass/workspaceToolbar.scss +0 -85
- package/src/app/ui/editor-client/src/vendor/ace/LICENSE +0 -24
- package/src/app/ui/editor-client/src/vendor/ace/ace.js +0 -17
- package/src/app/ui/editor-client/src/vendor/ace/ext-language_tools.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/ext-searchbox.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-css.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-handlebars.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-html.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-javascript.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-json.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-markdown.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-properties.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-python.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-sql.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-swift.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-text.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-xml.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-yaml.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/css.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/handlebars.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/html.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/javascript.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/json.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/markdown.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/properties.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/python.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/sql.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/swift.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/text.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/xml.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/yaml.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/theme-chrome.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/theme-tomorrow.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/worker-css.js +0 -1
- package/src/app/ui/editor-client/src/vendor/ace/worker-html.js +0 -1
- package/src/app/ui/editor-client/src/vendor/ace/worker-javascript.js +0 -1
- package/src/app/ui/editor-client/src/vendor/ace/worker-json.js +0 -1
- package/src/app/ui/editor-client/src/vendor/ace/worker-xml.js +0 -1
- package/src/app/ui/editor-client/src/vendor/beautifyjs/beautify.min.js +0 -1
- package/src/app/ui/editor-client/src/vendor/bootstrap/css/bootstrap.css +0 -5406
- package/src/app/ui/editor-client/src/vendor/bootstrap/css/bootstrap.min.css +0 -9
- package/src/app/ui/editor-client/src/vendor/bootstrap/img/glyphicons-halflings-white.png +0 -0
- package/src/app/ui/editor-client/src/vendor/bootstrap/img/glyphicons-halflings.png +0 -0
- package/src/app/ui/editor-client/src/vendor/bootstrap/js/bootstrap.min.js +0 -6
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/active-line.js +0 -72
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/coffeescript-lint.js +0 -47
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/javascript-hint.js +0 -157
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/javascript-lint.js +0 -63
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/jshint.js +0 -29591
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/lint.css +0 -73
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/lint.js +0 -252
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/show-hint.css +0 -36
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/show-hint.js +0 -460
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/sql-hint.js +0 -304
- package/src/app/ui/editor-client/src/vendor/code-mirror/lib/codemirror.css +0 -350
- package/src/app/ui/editor-client/src/vendor/code-mirror/lib/codemirror.js +0 -9800
- package/src/app/ui/editor-client/src/vendor/code-mirror/mode/javascript.js +0 -927
- package/src/app/ui/editor-client/src/vendor/code-mirror/mode/sql.js +0 -494
- package/src/app/ui/editor-client/src/vendor/code-mirror/theme/base16-dark.css +0 -38
- package/src/app/ui/editor-client/src/vendor/code-mirror/theme/monokai.css +0 -42
- package/src/app/ui/editor-client/src/vendor/code-mirror/theme/solarized.css +0 -168
- package/src/app/ui/editor-client/src/vendor/d3/d3.v3.min.js +0 -4
- package/src/app/ui/editor-client/src/vendor/d3/d3.v4.min.js +0 -2
- package/src/app/ui/editor-client/src/vendor/d3-context-menu/d3-context-menu.css +0 -43
- package/src/app/ui/editor-client/src/vendor/d3-context-menu/d3-context-menu.js +0 -86
- package/src/app/ui/editor-client/src/vendor/easy-json-schema/index.js +0 -88
- package/src/app/ui/editor-client/src/vendor/electron-tabs/electron-tabs.js +0 -2907
- package/src/app/ui/editor-client/src/vendor/font-awesome/css/font-awesome.min.css +0 -4
- package/src/app/ui/editor-client/src/vendor/font-awesome/fonts/FontAwesome.otf +0 -0
- package/src/app/ui/editor-client/src/vendor/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- package/src/app/ui/editor-client/src/vendor/font-awesome/fonts/fontawesome-webfont.svg +0 -2671
- package/src/app/ui/editor-client/src/vendor/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- package/src/app/ui/editor-client/src/vendor/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- package/src/app/ui/editor-client/src/vendor/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- package/src/app/ui/editor-client/src/vendor/i18next/i18next.min.js +0 -5
- package/src/app/ui/editor-client/src/vendor/icofont/fonts/icofont.eot +0 -0
- package/src/app/ui/editor-client/src/vendor/icofont/fonts/icofont.svg +0 -2105
- package/src/app/ui/editor-client/src/vendor/icofont/fonts/icofont.ttf +0 -0
- package/src/app/ui/editor-client/src/vendor/icofont/fonts/icofont.woff +0 -0
- package/src/app/ui/editor-client/src/vendor/icofont/fonts/icofont.woff2 +0 -0
- package/src/app/ui/editor-client/src/vendor/icofont/icofont.min.css +0 -7
- package/src/app/ui/editor-client/src/vendor/jqtree/jqTreeContextMenu.js +0 -98
- package/src/app/ui/editor-client/src/vendor/jqtree/jqtree.css +0 -209
- package/src/app/ui/editor-client/src/vendor/jqtree/tree.jquery.js +0 -21
- package/src/app/ui/editor-client/src/vendor/jqtree/tree.jquery.js.map +0 -1
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/animated-overlay.gif +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css +0 -5
- package/src/app/ui/editor-client/src/vendor/jquery/js/jquery-1.11.3.min.js +0 -5
- package/src/app/ui/editor-client/src/vendor/jquery/js/jquery-ui-1.10.3.custom.min.js +0 -7
- package/src/app/ui/editor-client/src/vendor/jquery/js/jquery.ui.touch-punch.min.js +0 -11
- package/src/app/ui/editor-client/src/vendor/jquery-contextMenu/jquery-contextMenu.css +0 -309
- package/src/app/ui/editor-client/src/vendor/jquery-contextMenu/jquery-contextMenu.js +0 -2134
- package/src/app/ui/editor-client/src/vendor/jquery-contextMenu/jquery-ui-position.js +0 -513
- package/src/app/ui/editor-client/src/vendor/jsonata/formatter.js +0 -190
- package/src/app/ui/editor-client/src/vendor/jsonata/mode-jsonata.js +0 -134
- package/src/app/ui/editor-client/src/vendor/jsonata/snippets-jsonata.js +0 -11
- package/src/app/ui/editor-client/src/vendor/jsonata/worker-jsonata.js +0 -2140
- package/src/app/ui/editor-client/src/vendor/kumologica/http-test-case.js +0 -131
- package/src/app/ui/editor-client/src/vendor/marked/marked.min.js +0 -6
- package/src/app/ui/editor-client/src/vendor/misc/toggleswitch.css +0 -181
- package/src/app/ui/editor-client/src/vendor/misc/toggleswitch.js +0 -48
- package/src/app/ui/editor-client/templates/index.mst +0 -284
- package/src/app/ui/editor-client/templates/modals/modalHome.mst +0 -107
- package/src/app/ui/editor-client/templates/modals/modalNewProject.mst +0 -104
- package/src/app/ui/editor-client/templates/modals/modalNewTab.mst +0 -78
- package/src/app/ui/editor-client/templates/modals/modalNodeLibrary.mst +0 -72
- package/src/app/ui/editor-client/templates/modals/modalWelcome.mst +0 -111
- package/src/app/util.js +0 -9
- package/src/assets/eula.txt +0 -170
- package/src/assets/icon.icns +0 -0
- package/src/assets/kumologica-app.png +0 -0
- package/src/assets/license_en.txt +0 -170
- /package/{cli/commands/test-utils → src/api/tools/test/lib}/fixtures/example3-flow.json +0 -0
- /package/{cli/commands/test-utils → src/api/tools/test/lib}/fixtures/package.json +0 -0
- /package/{cli/commands/test-utils → src/api/tools/test/lib}/fixtures/s3-event.js +0 -0
|
@@ -1,987 +0,0 @@
|
|
|
1
|
-
RED.sidebar.test = (function() {
|
|
2
|
-
let editors = {};
|
|
3
|
-
|
|
4
|
-
// html anchors
|
|
5
|
-
let tabContent;
|
|
6
|
-
let sections;
|
|
7
|
-
let testCaseSection;
|
|
8
|
-
let stackContainer;
|
|
9
|
-
let testNodes;
|
|
10
|
-
let triggeredTest; // Flag to indicate when launch a test. As we dont want to launch test for every deployment
|
|
11
|
-
|
|
12
|
-
// control variables
|
|
13
|
-
let testCaseIdSelected; // nodeID | __runall | undefined
|
|
14
|
-
let environmentSelected;
|
|
15
|
-
|
|
16
|
-
const RUN_ALL_TEST_CASES = '__runAll';
|
|
17
|
-
|
|
18
|
-
// properties section state
|
|
19
|
-
let propertiesOpened = false;
|
|
20
|
-
|
|
21
|
-
// references
|
|
22
|
-
let ipcRenderer = window.__kumologica.electron.ipcRenderer;
|
|
23
|
-
|
|
24
|
-
function updateTestCaseInit(event, msg) {
|
|
25
|
-
let { testCaseID, testCaseDescription } = msg.payload.testCase;
|
|
26
|
-
|
|
27
|
-
// sanitize the testCaseId, i.e. removing dots as jquery selector does not like it
|
|
28
|
-
let testCaseId = testCaseID.replace(/\./g, '_');
|
|
29
|
-
|
|
30
|
-
testCaseSection = sections.add({
|
|
31
|
-
title: testCaseDescription,
|
|
32
|
-
collapsible: true,
|
|
33
|
-
titleId: `section-${testCaseId}`
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
let wrapperTestCaseResults = $(`<div style="margin-top: 6px"></div>`);
|
|
37
|
-
wrapperTestCaseResults.appendTo(testCaseSection.content);
|
|
38
|
-
|
|
39
|
-
// Attach the tabs part selector for the testcase
|
|
40
|
-
let testcaseTabs = $(
|
|
41
|
-
`<div class="testcase-info-selector button-group"></div>`
|
|
42
|
-
);
|
|
43
|
-
testcaseTabs.appendTo(wrapperTestCaseResults);
|
|
44
|
-
|
|
45
|
-
// Response tab
|
|
46
|
-
$(
|
|
47
|
-
`<button id=testcase-tab-response-${testCaseId} href="#" class="editor-button-small testcase-tab selected">Response</button>`
|
|
48
|
-
)
|
|
49
|
-
.click((e) => {
|
|
50
|
-
e.preventDefault();
|
|
51
|
-
selectTestcaseTab('response', testCaseId);
|
|
52
|
-
})
|
|
53
|
-
.appendTo(testcaseTabs);
|
|
54
|
-
|
|
55
|
-
// Assertion tab
|
|
56
|
-
$(
|
|
57
|
-
`<button id=testcase-tab-assertion-${testCaseId} href="#" class="editor-button-small testcase-tab" style="margin-right: -2px">Assertions</button>`
|
|
58
|
-
)
|
|
59
|
-
.click((e) => {
|
|
60
|
-
e.preventDefault();
|
|
61
|
-
selectTestcaseTab('assertion', testCaseId);
|
|
62
|
-
})
|
|
63
|
-
.appendTo(testcaseTabs);
|
|
64
|
-
|
|
65
|
-
// Traces tab
|
|
66
|
-
$(
|
|
67
|
-
`<button id=testcase-tab-traces-${testCaseId} href="#" class="editor-button-small testcase-tab">Traces</button>`
|
|
68
|
-
)
|
|
69
|
-
.click((e) => {
|
|
70
|
-
e.preventDefault();
|
|
71
|
-
// Go to main workspace when debug message is hovered
|
|
72
|
-
// $('#view-main-flow').click();
|
|
73
|
-
selectTestcaseTab('traces', testCaseId);
|
|
74
|
-
})
|
|
75
|
-
.appendTo(testcaseTabs);
|
|
76
|
-
|
|
77
|
-
// This is the dropzone for content that will be selected in the tabs
|
|
78
|
-
$(`<div class="testcase-info-container">
|
|
79
|
-
<div id="testcase-info-response-${testCaseId}" class="testcase-info selected">
|
|
80
|
-
<div style="display: flex; justify-content: flex-end; margin-right: 10px"><span class="testcase-resp-status">Status: </span><span id="testcase-status-${testCaseId}" style="font-size: 12px; color:#2979ff; margin-right: 4px"></span></div>
|
|
81
|
-
<div id="testcase-info-response-header">
|
|
82
|
-
<div id="testcase-info-response-bodyheaders">
|
|
83
|
-
<span id="tab-body-selected-${testCaseId}" class="tab-label-bh tab-separation selected">Body</span>
|
|
84
|
-
<span id="tab-headers-selected-${testCaseId}" class="tab-label-bh tab-separation">Headers</span>
|
|
85
|
-
</div>
|
|
86
|
-
<div id="testcase-info-response-bodyformat-container-${testCaseId}" class="testcase-info-response-bodyformat-container">
|
|
87
|
-
<select id="testcase-info-response-bodyformat-${testCaseId}" class="testcase-info-response-bodyformat">
|
|
88
|
-
<option value="text" selected="selected">Text</option>
|
|
89
|
-
<option value="json">JSON</option>
|
|
90
|
-
<option value="xml">XML</option>
|
|
91
|
-
<option value="html">HTML</option>
|
|
92
|
-
</select>
|
|
93
|
-
</div>
|
|
94
|
-
<div id="testcase-info-wrap-container-${testCaseId}" class="testcase-info-wrap-container">
|
|
95
|
-
<a id="testcase-wrap-btn-${testCaseId}" class="testcase-wrap-btn-clazz" href="#">
|
|
96
|
-
<i class="fa fa-paragraph"></i>
|
|
97
|
-
</a>
|
|
98
|
-
</div>
|
|
99
|
-
|
|
100
|
-
<div id="testcase-info-copypaste-container-${testCaseId}" class="testcase-info-copypaste-container">
|
|
101
|
-
<a id="testcase-copypaste-btn-${testCaseId}" class="testcase-wrap-btn-clazz" href="#">
|
|
102
|
-
<i class="fa fa-copy"></i>
|
|
103
|
-
</a>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
<div id="testcase-resp-body-${testCaseId}" class="tab-content-bh selected selectable" style="height: 45vh"></div>
|
|
108
|
-
<div id="testcase-resp-headers-${testCaseId}" class="tab-content-bh selectable"></div>
|
|
109
|
-
</div>
|
|
110
|
-
<div id="testcase-info-assertion-${testCaseId}" class="testcase-info"></div>
|
|
111
|
-
<div id="testcase-info-traces-${testCaseId}" class="testcase-info testcase-info-traces"></div>
|
|
112
|
-
</div>`).appendTo(wrapperTestCaseResults);
|
|
113
|
-
|
|
114
|
-
// Put an ref element in place ready to attach debug messages from the nodes ...
|
|
115
|
-
$(`#test-debug-message-cache-${testCaseId}`).appendTo($(`#testcase-info-traces-${testCaseId}`));
|
|
116
|
-
|
|
117
|
-
// attach events to the selection of the tabs
|
|
118
|
-
$(`#tab-body-selected-${testCaseId}`).click(event => {
|
|
119
|
-
event.preventDefault();
|
|
120
|
-
changeTabSelection('body', testCaseId);
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
$(`#tab-headers-selected-${testCaseId}`).click(event => {
|
|
124
|
-
event.preventDefault();
|
|
125
|
-
changeTabSelection('headers', testCaseId);
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
// Create an editor the the response body
|
|
129
|
-
editors[testCaseId] = RED.editor.createEditor({
|
|
130
|
-
id: `testcase-resp-body-${testCaseId}`,
|
|
131
|
-
lineNumbers: true,
|
|
132
|
-
showFoldWidgets: true,
|
|
133
|
-
mode:"ace/mode/text",
|
|
134
|
-
options: {
|
|
135
|
-
wrap: true
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
// Listen for the editor format to be set
|
|
140
|
-
$(`#testcase-info-response-bodyformat-${testCaseId}`).on('change', function (e) {
|
|
141
|
-
var valueSelected = this.value;
|
|
142
|
-
switch (valueSelected) {
|
|
143
|
-
case 'json':
|
|
144
|
-
let rjson = editors[testCaseId].getSession().getValue();
|
|
145
|
-
let prjson = JSON.parse(rjson);
|
|
146
|
-
editors[testCaseId].getSession().setValue(JSON.stringify(prjson, null, 2));
|
|
147
|
-
editors[testCaseId].getSession().setMode('ace/mode/json');
|
|
148
|
-
break;
|
|
149
|
-
case 'xml':
|
|
150
|
-
editors[testCaseId].getSession().setMode('ace/mode/xml');
|
|
151
|
-
let vxml = editors[testCaseId].getSession().getValue();
|
|
152
|
-
editors[testCaseId].getSession().setValue(formatXml(vxml));
|
|
153
|
-
break;
|
|
154
|
-
case 'html':
|
|
155
|
-
editors[testCaseId].getSession().setMode('ace/mode/html');
|
|
156
|
-
let vhtml = editors[testCaseId].getSession().getValue();
|
|
157
|
-
editors[testCaseId].getSession().setValue(formatXml(vhtml));
|
|
158
|
-
break;
|
|
159
|
-
default:
|
|
160
|
-
editors[testCaseId].getSession().setMode('ace/mode/text');
|
|
161
|
-
break
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
// Listen to wrap mode
|
|
166
|
-
$(`#testcase-wrap-btn-${testCaseId}`).click(e => {
|
|
167
|
-
editors[testCaseId].getSession().setOptions({
|
|
168
|
-
wrap: !editors[testCaseId].getSession().getUseWrapMode()
|
|
169
|
-
})
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
$(`#testcase-info-copypaste-container-${testCaseId}`).click(e=> {
|
|
173
|
-
RED.clipboard.copyText(
|
|
174
|
-
editors[testCaseId].getSession().getValue(),
|
|
175
|
-
$(`#testcase-info-copypaste-container-${testCaseId}`),
|
|
176
|
-
'Response Copied to Clipboard');
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
RED.popover.tooltip($(`#testcase-info-wrap-container-${testCaseId}`), 'Wrap Line');
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function formatXml(xml, tab) { // tab = optional indent value, default is tab (\t)
|
|
183
|
-
var formatted = '', indent= '';
|
|
184
|
-
tab = tab || '\t';
|
|
185
|
-
xml.split(/>\s*</).forEach(function(node) {
|
|
186
|
-
if (node.match( /^\/\w/ )) indent = indent.substring(tab.length); // decrease indent by one 'tab'
|
|
187
|
-
formatted += indent + '<' + node + '>\r\n';
|
|
188
|
-
if (node.match( /^<?\w[^>]*[^\/]$/ )) indent += tab; // increase indent
|
|
189
|
-
});
|
|
190
|
-
return formatted.substring(1, formatted.length-3);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
function updateTestCaseStart(event, msg) {
|
|
194
|
-
let { testCaseID, targetOutput } = msg.payload.testCaseResults;
|
|
195
|
-
|
|
196
|
-
// sanitize the testCaseId, i.e. removing dots as jquery selector does not like it
|
|
197
|
-
let testCaseId = testCaseID.replace(/\./g, '_')
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
let flowres = targetOutput.response;
|
|
201
|
-
|
|
202
|
-
// Attach the response and the status
|
|
203
|
-
$(`#testcase-status-${testCaseId}`).text(`${flowres.statusCode} ${flowres.statusMessage}`);
|
|
204
|
-
//$(`#testcase-resp-body-${testCaseId}`).text(convertBodyToString(flowres.body));
|
|
205
|
-
editors[testCaseId].getSession().setValue(convertBodyToString(flowres.body));
|
|
206
|
-
editors[testCaseId].resize();
|
|
207
|
-
// attach the response headers
|
|
208
|
-
attachHeaders(flowres.headers, testCaseId);
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
function convertBodyToString(body){
|
|
213
|
-
let typeBody = typeof body;
|
|
214
|
-
|
|
215
|
-
if (typeBody === 'object'){
|
|
216
|
-
return JSON.stringify(body, null, 2);
|
|
217
|
-
}else if (typeBody === 'string') {
|
|
218
|
-
//return body.replace(/['"]+/g, '');;
|
|
219
|
-
return body;
|
|
220
|
-
} else {
|
|
221
|
-
return ""
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
function attachHeaders(headers, testCaseId){
|
|
227
|
-
let headersContainerEl = $(`#testcase-resp-headers-${testCaseId}`);
|
|
228
|
-
for (let header in headers) {
|
|
229
|
-
$(`
|
|
230
|
-
<div>
|
|
231
|
-
<span class="testcase-resp-header" style="color: #757575; font-weight: 500">
|
|
232
|
-
${header} <i class="fa fa-long-arrow-right" style="color: #757575;"></i>
|
|
233
|
-
</span>
|
|
234
|
-
<span style="color: #757575;">
|
|
235
|
-
${headers[header]}
|
|
236
|
-
</span>
|
|
237
|
-
</div>`).appendTo(headersContainerEl)
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
function changeTabSelection(key, testCaseId){
|
|
242
|
-
// if headers selected, then disable the output format and wrap line option
|
|
243
|
-
if (key === 'headers') {
|
|
244
|
-
$(`#testcase-info-response-bodyformat-container-${testCaseId}`).hide();
|
|
245
|
-
$(`#testcase-info-wrap-container-${testCaseId}`).hide();
|
|
246
|
-
$(`#testcase-info-copypaste-container-${testCaseId}`).hide();
|
|
247
|
-
} else {
|
|
248
|
-
$(`#testcase-info-response-bodyformat-container-${testCaseId}`).show();
|
|
249
|
-
$(`#testcase-info-wrap-container-${testCaseId}`).show();
|
|
250
|
-
$(`#testcase-info-copypaste-container-${testCaseId}`).show();
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
// Reset selectors
|
|
255
|
-
$(`#tab-body-selected-${testCaseId}`).removeClass('selected');
|
|
256
|
-
$(`#tab-headers-selected-${testCaseId}`).removeClass('selected');
|
|
257
|
-
|
|
258
|
-
// Reset containers
|
|
259
|
-
$(`#testcase-resp-body-${testCaseId}`).removeClass('selected');
|
|
260
|
-
$(`#testcase-resp-headers-${testCaseId}`).removeClass('selected');
|
|
261
|
-
|
|
262
|
-
// Mark it as selected
|
|
263
|
-
$(`#tab-${key}-selected-${testCaseId}`).addClass('selected');
|
|
264
|
-
$(`#testcase-resp-${key}-${testCaseId}`).addClass('selected');
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
function selectTestcaseTab(key, testCaseID){
|
|
268
|
-
// Reset the tabs
|
|
269
|
-
$(`#testcase-tab-assertion-${testCaseID}`).removeClass('selected');
|
|
270
|
-
$(`#testcase-tab-response-${testCaseID}`).removeClass('selected');
|
|
271
|
-
$(`#testcase-tab-traces-${testCaseID}`).removeClass('selected');
|
|
272
|
-
|
|
273
|
-
// Reset the content
|
|
274
|
-
$(`#testcase-info-assertion-${testCaseID}`).removeClass('selected');
|
|
275
|
-
$(`#testcase-info-response-${testCaseID}`).removeClass('selected');
|
|
276
|
-
$(`#testcase-info-traces-${testCaseID}`).removeClass('selected');
|
|
277
|
-
|
|
278
|
-
// Add the selection
|
|
279
|
-
$(`#testcase-tab-${key}-${testCaseID}`).addClass('selected');
|
|
280
|
-
$(`#testcase-info-${key}-${testCaseID}`).addClass('selected');
|
|
281
|
-
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
function updateTestCaseEnd(event, msg) {
|
|
285
|
-
hideDebuggerControls();
|
|
286
|
-
let { testCaseID, assertionResults } = msg.payload.testCaseResults;
|
|
287
|
-
// sanitize the testCaseId, i.e. removing dots as jquery selector does not like it
|
|
288
|
-
let testCaseId = testCaseID.replace(/\./g, '_')
|
|
289
|
-
let status = 'passed';
|
|
290
|
-
|
|
291
|
-
// Check whether the testcase is failed or not ...
|
|
292
|
-
for (let i=0; i < assertionResults.length; i++){
|
|
293
|
-
if (assertionResults[i].status === 'failed') {
|
|
294
|
-
status = 'failed';
|
|
295
|
-
break;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
// Find the testcase section
|
|
299
|
-
if (status === 'failed'){
|
|
300
|
-
$(`#section-${testCaseId}`).parent().parent().addClass('failed');
|
|
301
|
-
} else {
|
|
302
|
-
$(`#section-${testCaseId}`).parent().parent().addClass('passed');
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
function updateTestCaseAssertion(event, msg) {
|
|
307
|
-
const { testCaseID, description, status, diffReported } = msg.payload;
|
|
308
|
-
// sanitize the testCaseId, i.e. removing dots as jquery selector does not like it
|
|
309
|
-
let testCaseId = testCaseID.replace(/\./g, '_')
|
|
310
|
-
|
|
311
|
-
let assertionSectionHtml
|
|
312
|
-
if (status === 'failed'){
|
|
313
|
-
assertionSectionHtml = `
|
|
314
|
-
<div class="assertion assertion-failed" style="display: flex; flex-direction: column;">
|
|
315
|
-
<div style="display:flex; align-items: center;">
|
|
316
|
-
<i class="fa fa-times" style="color:red"></i>
|
|
317
|
-
<span style="padding-left: 5px">${description}</span><br/>
|
|
318
|
-
</div>
|
|
319
|
-
<div style="font-size: 10px; padding-left: 17px; margin-top:-3px">${diffReported}</div>
|
|
320
|
-
</div>
|
|
321
|
-
`;
|
|
322
|
-
} else {
|
|
323
|
-
assertionSectionHtml = `
|
|
324
|
-
<div class="assertion assertion-passed">
|
|
325
|
-
<i class="fa fa-check" style="color:green"></i>
|
|
326
|
-
<span>${description}</span>
|
|
327
|
-
</div>
|
|
328
|
-
`;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
let testCaseAssertionsContainer = $(`#testcase-info-assertion-${testCaseId}`)
|
|
332
|
-
|
|
333
|
-
$(assertionSectionHtml).appendTo(testCaseAssertionsContainer);
|
|
334
|
-
testCaseSection.container.show();
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
function onsame(){
|
|
338
|
-
RED.actions.invoke('core:hide-sidebar');
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
// Refresh the test tab
|
|
342
|
-
// silently - if true, we will update the nodes if required, but do not show the sidebar. Used primarily for the save button
|
|
343
|
-
function refreshTab(silently) {
|
|
344
|
-
if (!silently){
|
|
345
|
-
RED.actions.invoke('core:show-sidebar');
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
// Append to the selector all testcases found in the project
|
|
349
|
-
let $testSidebarTestcases = $('#test-sidebar-testcases');
|
|
350
|
-
|
|
351
|
-
// Searching for all testcases in the test.flow node.
|
|
352
|
-
let testcasenodes = App.nodes.filterNodes({ type: 'TestCase' });
|
|
353
|
-
// Searching for all HTTP testcases in the test.flow node.
|
|
354
|
-
let httptestcasenodes = App.nodes.filterNodes({ type: 'HTTPTestCase' });
|
|
355
|
-
|
|
356
|
-
testNodes = testcasenodes.concat(httptestcasenodes);
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
if (testNodes && Array.isArray(testNodes) && testNodes.length > 0) {
|
|
360
|
-
$('#test-sidebar-notestfound-explainer').hide();
|
|
361
|
-
$testSidebarTestcases.empty();
|
|
362
|
-
|
|
363
|
-
testNodes.forEach(tn => {
|
|
364
|
-
let tabName = RED.nodes.getTabLabel(tn.z);
|
|
365
|
-
$testSidebarTestcases.append(
|
|
366
|
-
`<option value=${tn.id}>${tabName} > ${tn.name}</option>`
|
|
367
|
-
);
|
|
368
|
-
});
|
|
369
|
-
$testSidebarTestcases.append(
|
|
370
|
-
`<option disabled>────────────────────</option>`
|
|
371
|
-
);
|
|
372
|
-
$testSidebarTestcases.append(
|
|
373
|
-
`<option value="${RUN_ALL_TEST_CASES}"> Run all TestCases</option>`
|
|
374
|
-
);
|
|
375
|
-
// Check which option will be selected
|
|
376
|
-
// a) If nothing was selected, select the empty
|
|
377
|
-
if (testCaseIdSelected === undefined || testCaseIdSelected === null) {
|
|
378
|
-
$('#test-sidebar-testcases').val('');
|
|
379
|
-
} else {
|
|
380
|
-
// b) Otherwise select the testcase previously selected
|
|
381
|
-
$(`#test-sidebar-testcases option[value="${testCaseIdSelected}"]`).attr(
|
|
382
|
-
'selected',
|
|
383
|
-
true
|
|
384
|
-
);
|
|
385
|
-
}
|
|
386
|
-
} else {
|
|
387
|
-
$testSidebarTestcases.empty();
|
|
388
|
-
$testSidebarTestcases.append(
|
|
389
|
-
`<option disabled>No testcases found</option>`
|
|
390
|
-
);
|
|
391
|
-
// Add image in the sidebar explaining why this space is empty
|
|
392
|
-
$('#test-sidebar-notestfound-explainer').show();
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
refreshEnvironments();
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
function refreshTestCases() {
|
|
399
|
-
let config = window.__kumologica.settings.testConfig;
|
|
400
|
-
if (config) {
|
|
401
|
-
// Preselect the last testCase selected
|
|
402
|
-
testCaseIdSelected = config.getLatestSelectedTestCase();
|
|
403
|
-
|
|
404
|
-
$(`#test-sidebar-testcases option[value="${testCaseIdSelected}"]`).attr(
|
|
405
|
-
'selected',
|
|
406
|
-
true
|
|
407
|
-
);
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
function refreshEnvironments() {
|
|
413
|
-
let config = window.__kumologica.settings.testConfig;
|
|
414
|
-
if (config) {
|
|
415
|
-
let environmentsList =config.listEnvironments();
|
|
416
|
-
|
|
417
|
-
let $testSidebarEnvironments = $('#test-sidebar-environments');
|
|
418
|
-
$testSidebarEnvironments.empty();
|
|
419
|
-
|
|
420
|
-
// Attach the "no environments" option
|
|
421
|
-
$testSidebarEnvironments.append(
|
|
422
|
-
`<option value="__no_environment__">No Environment</option>`
|
|
423
|
-
);
|
|
424
|
-
environmentsList.forEach(e => {
|
|
425
|
-
$testSidebarEnvironments.append(
|
|
426
|
-
`<option value=${e}>${e}</option>`
|
|
427
|
-
);
|
|
428
|
-
});
|
|
429
|
-
|
|
430
|
-
// Select the latest environment
|
|
431
|
-
environmentSelected = window.__kumologica.settings.testConfig.getLatestSelectedEnvironment();
|
|
432
|
-
$(`#test-sidebar-environments option[value="${environmentSelected}"]`).attr('selected', true);
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
/**
|
|
437
|
-
* Add properties (key, value)
|
|
438
|
-
* interacting with reverse order because attachPropertyRow
|
|
439
|
-
* calls prependTo so its always as first row.
|
|
440
|
-
* this to keep fake new row at the bottom.
|
|
441
|
-
*/
|
|
442
|
-
function refreshProperties() {
|
|
443
|
-
if (window.__kumologica.settings.testConfig){
|
|
444
|
-
let envvars = window.__kumologica.settings.testConfig.listVariablesByEnvironment();
|
|
445
|
-
// Clean up the table before starting injecting the new variables.
|
|
446
|
-
$('#table-test-properties').empty();
|
|
447
|
-
|
|
448
|
-
envvars.forEach(ev => {
|
|
449
|
-
attachPropertyRow(ev.key, ev.value);
|
|
450
|
-
})
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
function init() {
|
|
456
|
-
// Subcribe to runtime events for test
|
|
457
|
-
ipcRenderer.removeAllListeners('test:testcase-init');
|
|
458
|
-
ipcRenderer.removeAllListeners('test:testcase-start');
|
|
459
|
-
ipcRenderer.removeAllListeners('test:testcase-end');
|
|
460
|
-
ipcRenderer.removeAllListeners('test:testcase-start');
|
|
461
|
-
ipcRenderer.removeAllListeners('debugger:stopped');
|
|
462
|
-
|
|
463
|
-
ipcRenderer.on('test:testcase-init', updateTestCaseInit);
|
|
464
|
-
ipcRenderer.on('test:testcase-start', updateTestCaseStart);
|
|
465
|
-
ipcRenderer.on('test:testcase-end', updateTestCaseEnd);
|
|
466
|
-
ipcRenderer.on('test:assertion-report', updateTestCaseAssertion);
|
|
467
|
-
|
|
468
|
-
ipcRenderer.on('debugger:stopped', debuggerStoppedOnBreakpoint);
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
// Prepare the html wrappers
|
|
472
|
-
initHtml();
|
|
473
|
-
|
|
474
|
-
// Attach click event to the "run test" button
|
|
475
|
-
$('#test-sidebar-run-btn').click(triggerExecuteTestSuite);
|
|
476
|
-
|
|
477
|
-
// Attach a click event to the debu button
|
|
478
|
-
$('#test-sidebar-debug-btn').click(triggerDebugTestSuite);
|
|
479
|
-
|
|
480
|
-
// Attach click event to the "clear tests" button
|
|
481
|
-
$('#test-sidebar-clear').click(clearTestSuite)
|
|
482
|
-
|
|
483
|
-
// Attach the change event to the "testcase" select
|
|
484
|
-
$('#test-sidebar-testcases').change(e => {
|
|
485
|
-
testCaseIdSelected = e.target.value;
|
|
486
|
-
saveSettings();
|
|
487
|
-
});
|
|
488
|
-
$('#test-sidebar-environments').change(e => {
|
|
489
|
-
environmentSelected = e.target.value;
|
|
490
|
-
saveSettings();
|
|
491
|
-
refreshProperties();
|
|
492
|
-
})
|
|
493
|
-
|
|
494
|
-
// Attach edit button click event
|
|
495
|
-
$('#edit-environments').click((e) => {
|
|
496
|
-
e.stopPropagation();
|
|
497
|
-
RED.actions.invoke('core:settings:select-environments');
|
|
498
|
-
});
|
|
499
|
-
|
|
500
|
-
// Attach debugger events
|
|
501
|
-
$('#test-sidebar-debug-continue').click( async (e)=> {
|
|
502
|
-
await window.__kumologica.debugger.continue()
|
|
503
|
-
});
|
|
504
|
-
|
|
505
|
-
$('#test-sidebar-debug-terminate').click( async (e)=> {
|
|
506
|
-
await window.__kumologica.debugger.terminate();
|
|
507
|
-
});
|
|
508
|
-
|
|
509
|
-
$('#test-sidebar-debug-next').click( async (e)=> {
|
|
510
|
-
await window.__kumologica.debugger.next();
|
|
511
|
-
});
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
$('#test-sidebar-debug-restart').click( async (e)=> {
|
|
515
|
-
await window.__kumologica.debugger.terminate();
|
|
516
|
-
// give 1 sec to clean up the tab
|
|
517
|
-
setTimeout(async()=> {
|
|
518
|
-
await triggerDebugTestSuite();
|
|
519
|
-
}, 500);
|
|
520
|
-
});
|
|
521
|
-
|
|
522
|
-
RED.events.on('deploy:finished', async()=> {
|
|
523
|
-
if (triggeredTest){
|
|
524
|
-
await executeTestSuite();
|
|
525
|
-
triggeredTest = false;
|
|
526
|
-
}
|
|
527
|
-
});
|
|
528
|
-
|
|
529
|
-
// Case where the environment variables config has change
|
|
530
|
-
RED.events.on('settings:environment-variables-changed', ()=> {
|
|
531
|
-
refreshEnvironments();
|
|
532
|
-
})
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
function show() {
|
|
538
|
-
RED.sidebar.show('test');
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
function clearTestSuite() {
|
|
542
|
-
$('#test-results-wrapper').empty();
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
async function triggerExecuteTestSuite(opts){
|
|
546
|
-
// Clean up the test results from the secion
|
|
547
|
-
if (sections) {
|
|
548
|
-
sections.removeAll();
|
|
549
|
-
}
|
|
550
|
-
// Enable debug?
|
|
551
|
-
if (opts && opts.debug) {
|
|
552
|
-
await window.__kumologica.debugger.enable();
|
|
553
|
-
} else {
|
|
554
|
-
await window.__kumologica.debugger.disable();
|
|
555
|
-
}
|
|
556
|
-
// The test will be triggered automatically, when the deployment is finished.
|
|
557
|
-
triggeredTest = true;
|
|
558
|
-
RED.deploy.save(); // onDeploy finished --> invoke `executeTestSuite()`;
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
async function executeTestSuite() {
|
|
562
|
-
editors = {};
|
|
563
|
-
//Update the testCase selected
|
|
564
|
-
testCaseIdSelected = $(`#test-sidebar-testcases`).children("option:selected").val();
|
|
565
|
-
|
|
566
|
-
// Clean up the previous test results
|
|
567
|
-
$('#test-results-wrapper').empty();
|
|
568
|
-
|
|
569
|
-
// Show the terminal if close
|
|
570
|
-
let terminalOpen = $('#workspace-terminal').is(":visible");
|
|
571
|
-
if (!terminalOpen){
|
|
572
|
-
$('#shelve-middle').click();
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
// Clear the cache of debug messages
|
|
576
|
-
$('#test-debug-messages-caches').empty();
|
|
577
|
-
|
|
578
|
-
// Run the selected case
|
|
579
|
-
// - check whether there is only one test case to run or we should run all of them
|
|
580
|
-
if (testCaseIdSelected) {
|
|
581
|
-
// Get the environment
|
|
582
|
-
let environment = {};
|
|
583
|
-
const aEnvironmentVars = window.__kumologica.settings.testConfig.listVariablesByEnvironment();
|
|
584
|
-
aEnvironmentVars.forEach(env => {
|
|
585
|
-
environment[env.key] = env.value;
|
|
586
|
-
});
|
|
587
|
-
|
|
588
|
-
// Trigger the testcases
|
|
589
|
-
if (RUN_ALL_TEST_CASES === testCaseIdSelected) {
|
|
590
|
-
for (let i=0; i < testNodes.length; i++) {
|
|
591
|
-
createDebugMessageCache(testNodes[i].id);
|
|
592
|
-
try{
|
|
593
|
-
// console.log(`[tab-test] Running testcase: ${testNodes[i].id} ...`, )
|
|
594
|
-
await window.__kumologica.libs.testFlow('{}', testNodes[i].id, environment);
|
|
595
|
-
}catch(err){
|
|
596
|
-
console.log('[tab-test] error found: ', err);
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
} else {
|
|
600
|
-
try {
|
|
601
|
-
createDebugMessageCache(testCaseIdSelected);
|
|
602
|
-
await window.__kumologica.libs.testFlow('{}', testCaseIdSelected, environment);
|
|
603
|
-
} catch(err) {
|
|
604
|
-
console.log('[tab-test] error found: ', err);
|
|
605
|
-
//App.notify(`Error found: ${JSON.stringify(err)}`, { type: 'error'});
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
} else {
|
|
609
|
-
RED.notify('No selected Testcase', { type: 'warning' });
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
function createDebugMessageCache(testCaseID){
|
|
614
|
-
let sanitizeTestCaseID = testCaseID.replace(/\./g, '_')
|
|
615
|
-
$(`<div id="test-debug-message-cache-${sanitizeTestCaseID}" style="margin-right: 2px"></div>`).appendTo($('#test-debug-messages-caches'));
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
function initHtml() {
|
|
619
|
-
tabContent = document.createElement('div');
|
|
620
|
-
tabContent.className = 'sidebar-test';
|
|
621
|
-
|
|
622
|
-
RED.actions.add('core:show-test-tab', show);
|
|
623
|
-
|
|
624
|
-
stackContainer = $('<div>', {
|
|
625
|
-
class: 'sidebar-node-info-stack'
|
|
626
|
-
}).appendTo(tabContent);
|
|
627
|
-
|
|
628
|
-
// Append the header
|
|
629
|
-
let headerContentHtml = `
|
|
630
|
-
<div class="sidebar-title-wrapper">
|
|
631
|
-
|
|
632
|
-
<div style="display:flex;width:100%;padding-right:10px">
|
|
633
|
-
|
|
634
|
-
<div id="sidebar-title-wrapper-left" style="display:flex; width:50%">
|
|
635
|
-
<span>Tests</span>
|
|
636
|
-
</div>
|
|
637
|
-
|
|
638
|
-
<div id="sidebar-title-wrapper-right" style="text-align: right; display: block; width: 50%;">
|
|
639
|
-
|
|
640
|
-
<!-- environments section -->
|
|
641
|
-
<div id="test-info-environments-wrapper" style="display:flex; height: 24px">
|
|
642
|
-
<select id="test-sidebar-environments" style="width: 100%; padding-left: 5px !important; padding: 0px; height: 23px !important;" class="palette-textinput-alt">
|
|
643
|
-
<option value="__no_environment__">No Environment</option>
|
|
644
|
-
</select>
|
|
645
|
-
</div>
|
|
646
|
-
<span id="edit-environments" class="pointer" style="font-weight: 500;font-size: 12px; color: #2979ff;">Edit</span>
|
|
647
|
-
|
|
648
|
-
</div>
|
|
649
|
-
|
|
650
|
-
</div>
|
|
651
|
-
|
|
652
|
-
</div>
|
|
653
|
-
|
|
654
|
-
<div id="test-sidebar-header" class="sidebar-header">
|
|
655
|
-
<div id="test-info-wrapper" style="display:flex">
|
|
656
|
-
<div id="test-sidebar-header-wrapper-left">
|
|
657
|
-
<select id="test-sidebar-testcases" style="width: 100%; padding: 0px; padding-left: 5px; height: 23px !important;" class="palette-textinput">
|
|
658
|
-
<option disabled>No Testcases Found</option>
|
|
659
|
-
</select>
|
|
660
|
-
</div>
|
|
661
|
-
<div id="test-sidebar-header-wrapper-right">
|
|
662
|
-
<!-- run btn -->
|
|
663
|
-
<a id="test-sidebar-run-btn" class="sidebar-header-button" href="#" style="color: white !important; background: #2979ff;">
|
|
664
|
-
<i class="fa fa-play"></i>
|
|
665
|
-
Run
|
|
666
|
-
</a>
|
|
667
|
-
|
|
668
|
-
<!-- debug btn -->
|
|
669
|
-
<a id="test-sidebar-debug-btn" class="sidebar-header-button" href="#">
|
|
670
|
-
<i class="fa fa-bug"></i>
|
|
671
|
-
</a>
|
|
672
|
-
|
|
673
|
-
<!-- Environment properties btn -->
|
|
674
|
-
|
|
675
|
-
<a id="switchPropertiesBtn" class="sidebar-header-button" href="#">
|
|
676
|
-
<i class="icofont-eye-alt"></i>
|
|
677
|
-
</a>
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
<!-- clear btn -->
|
|
681
|
-
<a id="test-sidebar-clear" class="sidebar-header-button" href="#">
|
|
682
|
-
<i class="fa fa-trash"></i></a>
|
|
683
|
-
</div>
|
|
684
|
-
</div>
|
|
685
|
-
<div id="debugger-wrapper" style="display:none">
|
|
686
|
-
<div id="test-sidebar-debug-continue" class="sidebar-header-button debugger-button" href="#">
|
|
687
|
-
<img src="red/images/debugger/continue-full.png" width="20" height="20" style="filter: invert(55%)">
|
|
688
|
-
<span class="debug-button-label" style="margin-left:2px" >Continue</span>
|
|
689
|
-
</div>
|
|
690
|
-
<div id="test-sidebar-debug-next" class="sidebar-header-button debugger-button" href="#">
|
|
691
|
-
<img src="red/images/debugger/stepover.png" width="20" height="20" style="filter: invert(55%)">
|
|
692
|
-
<span class="debug-button-label">Next</span>
|
|
693
|
-
</div>
|
|
694
|
-
<div id="test-sidebar-debug-restart" class="sidebar-header-button debugger-button" href="#">
|
|
695
|
-
<img src="red/images/debugger/restart.png" width="20" height="20" style="filter: invert(55%)">
|
|
696
|
-
<span class="debug-button-label">Restart</span>
|
|
697
|
-
</div>
|
|
698
|
-
<div id="test-sidebar-debug-terminate" class="sidebar-header-button debugger-button" href="#">
|
|
699
|
-
<img src="red/images/debugger/stop.png" width="20" height="20" style="filter: invert(55%)">
|
|
700
|
-
<span class="debug-button-label">Stop</span>
|
|
701
|
-
</div>
|
|
702
|
-
</div>
|
|
703
|
-
<div id="properties-wrapper">
|
|
704
|
-
<div id="propertiesWrapperHeader" style="display: flex; padding-bottom: 10px;">
|
|
705
|
-
<div id="enableTraceabilityWrapper" style="width: 50%; padding: 5px 0px 5px 5px;">
|
|
706
|
-
<!--
|
|
707
|
-
<input type="checkbox" id="isTraceabilitySelected" style="margin-top:0px"> Enable traceability
|
|
708
|
-
</input>
|
|
709
|
-
-->
|
|
710
|
-
</div>
|
|
711
|
-
</div>
|
|
712
|
-
<div id="propertiesSection" style="display:none">
|
|
713
|
-
<div id="propertiesLabel">Environment Variables</div>
|
|
714
|
-
<div id="table-test-properties">
|
|
715
|
-
</div>
|
|
716
|
-
</div>
|
|
717
|
-
</div>
|
|
718
|
-
<div id="test-debug-messages-caches" style="display:none">
|
|
719
|
-
</div>
|
|
720
|
-
<div id="test-debug-messages-caches" style="display:none">
|
|
721
|
-
</div>
|
|
722
|
-
</div>
|
|
723
|
-
`;
|
|
724
|
-
|
|
725
|
-
$(headerContentHtml).appendTo(stackContainer);
|
|
726
|
-
|
|
727
|
-
// Append the testResults wrapper
|
|
728
|
-
let testResultsWrapperHtml = `
|
|
729
|
-
|
|
730
|
-
<div id="test-results-wrapper">
|
|
731
|
-
<div id="test-sidebar-notestfound-explainer" style="display:none">
|
|
732
|
-
<div style="display:flex; flex-direction: column; align-items: center; margin-top: 150px">
|
|
733
|
-
<img style="width: 80px" src="red/images/test-icon.png" />
|
|
734
|
-
<div style="font-weight: bold; font-size: 22px; margin-top: 15px;color: grey;">No test found</div>
|
|
735
|
-
<div style="margin-top: 5px; color: grey;">Add a new <b>TestCase</b> node into the <b>Test</b> tab.</div>
|
|
736
|
-
</div>
|
|
737
|
-
</div>
|
|
738
|
-
</div>`;
|
|
739
|
-
|
|
740
|
-
let testResultsWrapper = $(testResultsWrapperHtml).appendTo(stackContainer);
|
|
741
|
-
|
|
742
|
-
sections = RED.stack.create({
|
|
743
|
-
container: testResultsWrapper
|
|
744
|
-
});
|
|
745
|
-
|
|
746
|
-
RED.sidebar.addTab({
|
|
747
|
-
id: 'test',
|
|
748
|
-
label: ' Test',
|
|
749
|
-
name: 'Test Case Runner',
|
|
750
|
-
iconClass: 'fa fa-flask',
|
|
751
|
-
action: 'core:show-test-tab',
|
|
752
|
-
content: tabContent,
|
|
753
|
-
pinned: true,
|
|
754
|
-
enableOnEdit: true,
|
|
755
|
-
onchange: refreshTab,
|
|
756
|
-
onsame: onsame
|
|
757
|
-
});
|
|
758
|
-
|
|
759
|
-
// Attach events
|
|
760
|
-
|
|
761
|
-
// Click event for toggle properties
|
|
762
|
-
$('#switchPropertiesBtn').click(e => {
|
|
763
|
-
toggleProperties();
|
|
764
|
-
});
|
|
765
|
-
|
|
766
|
-
// ==> Load initial data to the screen
|
|
767
|
-
refreshScreen();
|
|
768
|
-
|
|
769
|
-
// Append to the list of properties a fake record to append a new property
|
|
770
|
-
// attachAppendPropertyRow(); // TODO: Javier review
|
|
771
|
-
|
|
772
|
-
// Load the tooltips
|
|
773
|
-
RED.popover.tooltip($('#test-sidebar-header-wrapper-left'), 'Select Test Case to Run');
|
|
774
|
-
RED.popover.tooltip(
|
|
775
|
-
$('#test-sidebar-run-btn'),
|
|
776
|
-
'Run Test Case'
|
|
777
|
-
);
|
|
778
|
-
RED.popover.tooltip(
|
|
779
|
-
$('#test-sidebar-debug-btn'),
|
|
780
|
-
'Debug Test Case'
|
|
781
|
-
);
|
|
782
|
-
RED.popover.tooltip(
|
|
783
|
-
$('#test-sidebar-clear'),
|
|
784
|
-
'Clear Test Case Results'
|
|
785
|
-
);
|
|
786
|
-
RED.popover.tooltip(
|
|
787
|
-
$('#switchPropertiesBtn'),
|
|
788
|
-
'Environment Configuration'
|
|
789
|
-
);
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
// event triggered from header.js when test-config.json file has been loaded
|
|
793
|
-
// re-set properties in case they were not loaded during init
|
|
794
|
-
//
|
|
795
|
-
RED.events.on('test-config', function () {
|
|
796
|
-
refreshScreen();
|
|
797
|
-
attachAppendPropertyRow();
|
|
798
|
-
});
|
|
799
|
-
|
|
800
|
-
function toggleProperties(){
|
|
801
|
-
if (propertiesOpened){
|
|
802
|
-
// close the properties window
|
|
803
|
-
$('#propertiesSection').hide();
|
|
804
|
-
} else {
|
|
805
|
-
// open the properties window
|
|
806
|
-
$('#propertiesSection').show();
|
|
807
|
-
}
|
|
808
|
-
// toggle the global switch
|
|
809
|
-
propertiesOpened = !propertiesOpened;
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
/**
|
|
813
|
-
*
|
|
814
|
-
* @param {object} properties - { key:value, key:value, key: value,... }
|
|
815
|
-
*/
|
|
816
|
-
function refreshScreen() {
|
|
817
|
-
refreshTestCases();
|
|
818
|
-
refreshEnvironments();
|
|
819
|
-
refreshProperties();
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
function attachPropertyRow(key, value){
|
|
825
|
-
const s = key;
|
|
826
|
-
const keyid = s.replace(/[^a-zA-Z0-9-]/g, '_');
|
|
827
|
-
let propertyRow = `
|
|
828
|
-
<div class="table-row" id="row-${keyid}">
|
|
829
|
-
<div class="table-cell">
|
|
830
|
-
<input readonly id="key-${keyid}" class="palette-textinput" type="text" style="width:100%; font-size:12px" onfocus="this.blur()"></input>
|
|
831
|
-
</div>
|
|
832
|
-
<div class="table-cell">
|
|
833
|
-
<input readonly id="value-${keyid}" class="palette-textinput" type="text" style="width:100%; font-size:12px" onfocus="this.blur()"></input>
|
|
834
|
-
</div>
|
|
835
|
-
</div>
|
|
836
|
-
`;
|
|
837
|
-
$(propertyRow).prependTo($('#table-test-properties'));
|
|
838
|
-
|
|
839
|
-
// Add values
|
|
840
|
-
$(`#key-${keyid}`).val(key);
|
|
841
|
-
$(`#value-${keyid}`).val(value);
|
|
842
|
-
|
|
843
|
-
// auto save post property update
|
|
844
|
-
$(`#key-${keyid}, #value-${keyid}`).change(function () {
|
|
845
|
-
saveSettings();
|
|
846
|
-
});
|
|
847
|
-
|
|
848
|
-
// remove property button click event
|
|
849
|
-
$(`#remove-property-${keyid}`).click((e) => {
|
|
850
|
-
deleteProperty(keyid);
|
|
851
|
-
});
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
function deleteProperty(key){
|
|
855
|
-
// detach the DOM element
|
|
856
|
-
$(`#row-${key}`).remove();
|
|
857
|
-
saveSettings();
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
function addProperty(key, value){
|
|
861
|
-
// reset the errors have happened in the past,... pity we cannot do the same in real life
|
|
862
|
-
$('#new-prop-key').removeClass('wrong-value');
|
|
863
|
-
$('#new-prop-value').removeClass('wrong-value');
|
|
864
|
-
|
|
865
|
-
let errorsFound = false;
|
|
866
|
-
|
|
867
|
-
if (!key){
|
|
868
|
-
errorsFound = true;
|
|
869
|
-
$('#new-prop-key').addClass('wrong-value');
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
if (!value){
|
|
873
|
-
errorsFound = true;
|
|
874
|
-
$('#new-prop-value').addClass('wrong-value');
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
if (!errorsFound){
|
|
878
|
-
// remove the addPropertyRow...
|
|
879
|
-
$('#table-row-append').remove();
|
|
880
|
-
// Sanitize the key. As this will be used as a valid `id` property of the html element
|
|
881
|
-
key = key.trim();
|
|
882
|
-
|
|
883
|
-
// add the new property
|
|
884
|
-
attachPropertyRow(key, value);
|
|
885
|
-
attachAppendPropertyRow();
|
|
886
|
-
saveSettings();
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
function getValues() {
|
|
891
|
-
let testcase = testCaseIdSelected || "";
|
|
892
|
-
let environment = environmentSelected || "__no_environment__"
|
|
893
|
-
|
|
894
|
-
return {
|
|
895
|
-
testcase,
|
|
896
|
-
environment
|
|
897
|
-
};
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
function saveSettings() {
|
|
901
|
-
window.__kumologica.settings.testConfig.saveTestValuesIntoConfig(getValues());
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
function attachAppendPropertyRow() {
|
|
905
|
-
if ($('#table-row-append').length) {
|
|
906
|
-
return; // no need to add append row, already defined
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
// add property button click event
|
|
910
|
-
let addPropertyRow = `
|
|
911
|
-
<div id="table-row-append">
|
|
912
|
-
<div class="table-cell">
|
|
913
|
-
<input id="new-prop-key" class="palette-textinput" type="text" style="width:100%; font-size:12px" placeholder="key"></input>
|
|
914
|
-
</div>
|
|
915
|
-
<div class="table-cell">
|
|
916
|
-
<input id="new-prop-value" class="palette-textinput" type="text" style="width:100%; font-size:12px" placeholder="value"></input>
|
|
917
|
-
</div>
|
|
918
|
-
<div id="addSaveProperty" class="table-cell-btn"><i class="icofont-save"></i></div>
|
|
919
|
-
</div>
|
|
920
|
-
`;
|
|
921
|
-
$(addPropertyRow).appendTo($('#table-test-properties'));
|
|
922
|
-
|
|
923
|
-
// Attach the save event
|
|
924
|
-
$('#addSaveProperty').click(e => {
|
|
925
|
-
let key = $('#new-prop-key').val();
|
|
926
|
-
let value = $('#new-prop-value').val();
|
|
927
|
-
addProperty(key, value);
|
|
928
|
-
});
|
|
929
|
-
// Do not allow spaces on the key - replace if for dashes
|
|
930
|
-
$('#new-prop-key').on('input', () => {
|
|
931
|
-
let old = $('#new-prop-key').val();
|
|
932
|
-
$('#new-prop-key').val(old.replace(/\s+/g, '-') );
|
|
933
|
-
});
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
// Debugger operations
|
|
937
|
-
async function triggerDebugTestSuite() {
|
|
938
|
-
// console.log('[tab-test] Debugger started ...');
|
|
939
|
-
let { body} = await window.__kumologica.debugger.listBreakpoints();
|
|
940
|
-
// console.log('[tab-test] Breakpoints =', body);
|
|
941
|
-
if ( body.length === 0 ) {
|
|
942
|
-
// case of no breakpoints found in the flow
|
|
943
|
-
await triggerExecuteTestSuite({ debug: false });
|
|
944
|
-
RED.notifications.notify('No breakpoints found in the flow', 'warning', undefined, 2000);
|
|
945
|
-
} else{
|
|
946
|
-
$('#test-info-wrapper').hide();
|
|
947
|
-
$('#properties-wrapper').hide();
|
|
948
|
-
$('#debugger-wrapper').show();
|
|
949
|
-
await triggerExecuteTestSuite({ debug: true });
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
async function hideDebuggerControls() {
|
|
955
|
-
// console.log('[tab-test] Hiding debugger controls...');
|
|
956
|
-
$('#test-info-wrapper').show();
|
|
957
|
-
$('#properties-wrapper').show();
|
|
958
|
-
$('#debugger-wrapper').hide();
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
function showDebuggerControls() {
|
|
962
|
-
// console.log('[tab-test] Showing debugger controls ...');
|
|
963
|
-
$('#test-info-wrapper').hide();
|
|
964
|
-
$('#properties-wrapper').hide();
|
|
965
|
-
$('#debugger-wrapper').show();
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
function debuggerStoppedOnBreakpoint(e,msg) {
|
|
969
|
-
// console.log('[tab-test] Debugger stopped on breakpoint ...e=', e);
|
|
970
|
-
// console.log('[tab-test] Debugger stopped on breakpoint ...msg=', msg);
|
|
971
|
-
|
|
972
|
-
showDebuggerControls();
|
|
973
|
-
|
|
974
|
-
let universalNodeId = msg.payload.nodeId;
|
|
975
|
-
let testCaseID = universalNodeId.split('::')[0];
|
|
976
|
-
// sanitize the testCaseId, i.e. removing dots as jquery selector does not like it
|
|
977
|
-
testCaseId = testCaseID.replace(/\./g, '_');
|
|
978
|
-
|
|
979
|
-
sections.expandLastEntry();
|
|
980
|
-
selectTestcaseTab('traces', testCaseId);
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
return {
|
|
984
|
-
init,
|
|
985
|
-
refreshTab,
|
|
986
|
-
};
|
|
987
|
-
})();
|