diff --git a/package-lock.json b/package-lock.json index 96aede138..56f267f6e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,6 +36,7 @@ "socket.io-client": "^4.7.2", "svg-inline-loader": "^0.8.2", "tinycolor2": "^1.4.2", + "uuid": "^13.0.0", "vue": "^2.6.12", "vue-deepset": "^0.6.3", "vue-inline-svg": "^2.1.3", @@ -2586,6 +2587,16 @@ "node": ">= 6" } }, + "node_modules/@cypress/request/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@cypress/webpack-preprocessor": { "version": "6.0.0", "dev": true, @@ -16442,6 +16453,16 @@ "node": ">=8" } }, + "node_modules/istanbul-lib-processinfo/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/istanbul-lib-processinfo/node_modules/which": { "version": "2.0.2", "dev": true, @@ -18293,6 +18314,15 @@ "node": ">=6" } }, + "node_modules/jest-junit/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/jest-leak-detector": { "version": "27.5.1", "dev": true, @@ -22585,6 +22615,18 @@ "node": ">=10" } }, + "node_modules/node-notifier/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/node-notifier/node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -25526,6 +25568,16 @@ "websocket-driver": "^0.7.4" } }, + "node_modules/sockjs/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/source-map": { "version": "0.6.1", "license": "BSD-3-Clause", @@ -27619,10 +27671,16 @@ } }, "node_modules/uuid": { - "version": "8.3.2", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-13.0.0.tgz", + "integrity": "sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], "license": "MIT", "bin": { - "uuid": "dist/bin/uuid" + "uuid": "dist-node/bin/uuid" } }, "node_modules/v8-compile-cache": { diff --git a/package.json b/package.json index 14e41831b..e6c88adb7 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "socket.io-client": "^4.7.2", "svg-inline-loader": "^0.8.2", "tinycolor2": "^1.4.2", + "uuid": "^13.0.0", "vue": "^2.6.12", "vue-deepset": "^0.6.3", "vue-inline-svg": "^2.1.3", diff --git a/src/components/inspectors/ConditionalRedirect/ConditionalRedirect.vue b/src/components/inspectors/ConditionalRedirect/ConditionalRedirect.vue new file mode 100644 index 000000000..6e87862af --- /dev/null +++ b/src/components/inspectors/ConditionalRedirect/ConditionalRedirect.vue @@ -0,0 +1,165 @@ + + + diff --git a/src/components/inspectors/ConditionalRedirect/TaskDestination.vue b/src/components/inspectors/ConditionalRedirect/TaskDestination.vue new file mode 100644 index 000000000..d9d716f82 --- /dev/null +++ b/src/components/inspectors/ConditionalRedirect/TaskDestination.vue @@ -0,0 +1,243 @@ + + + + + diff --git a/src/components/inspectors/ConditionalRedirect/conditionalRedirect.js b/src/components/inspectors/ConditionalRedirect/conditionalRedirect.js new file mode 100644 index 000000000..ac8198844 --- /dev/null +++ b/src/components/inspectors/ConditionalRedirect/conditionalRedirect.js @@ -0,0 +1,18 @@ +import ConditionalRedirect from './ConditionalRedirect.vue'; + +export default { + component: ConditionalRedirect, + config: { + label: 'Conditional Redirects', + name: 'conditionalRedirect', + options: [ + { value: 'taskSource', content: 'Task Source (Default)' }, + { value: 'taskList', content: 'Task List' }, + { value: 'processLaunchpad', content: 'Process Launchpad' }, + { value: 'homepageDashboard', content: 'Home Page' }, + { value: 'customDashboard', content: 'Custom Dashboard' }, + { value: 'externalURL', content: 'External URL' }, + { value: 'displayNextAssignedTask', content: 'Display Next Assigned Task' }, + ], + }, +}; diff --git a/src/components/nodes/task/index.js b/src/components/nodes/task/index.js index 9ba195ffc..af04d9647 100644 --- a/src/components/nodes/task/index.js +++ b/src/components/nodes/task/index.js @@ -5,6 +5,7 @@ import defaultNames from '@/components/nodes/task/defaultNames'; import advancedAccordionConfigWithMarkerFlags from '@/components/inspectors/advancedAccordionConfigWithMarkerFlags'; import elementDestination from '@/components/inspectors/taskElementDestination'; +import conditionalRedirect from '@/components/inspectors/ConditionalRedirect/conditionalRedirect'; import loopCharacteristicsInspector from '@/components/inspectors/LoopCharacteristics'; import { loopCharacteristicsHandler, loopCharacteristicsData } from '@/components/inspectors/LoopCharacteristics'; import documentationAccordionConfig from '@/components/inspectors/documentationAccordionConfig'; @@ -70,6 +71,7 @@ export default { loopCharacteristicsHandler(value, node, setNodeProp, moddle, definitions, isMultiplayer); defaultInspectorHandler(omit(value, 'markerFlags', '$loopCharactetistics'), isMultiplayer); handleElementDestination(value.elementDestination, node, setNodeProp); + handleConditionalRedirect(value.conditionalRedirect, node, setNodeProp); }, inspectorData(node, defaultDataTransform, inspector) { const inspectorData = defaultDataTransform(node); @@ -100,6 +102,7 @@ export default { config: nameConfigSettings, }, elementDestination, + conditionalRedirect, ], }, loopCharacteristicsInspector, @@ -131,3 +134,9 @@ function handleElementDestination(value, node, setNodeProp) { setNodeProp(node, 'elementDestination', value); } } + +function handleConditionalRedirect(value, node, setNodeProp) { + if (value) { + setNodeProp(node, 'conditionalRedirect', value); + } +} diff --git a/tests/e2e/specs/Documentation.cy.js b/tests/e2e/specs/Documentation.cy.js index e3a01281a..0595f2341 100644 --- a/tests/e2e/specs/Documentation.cy.js +++ b/tests/e2e/specs/Documentation.cy.js @@ -49,7 +49,7 @@ describe('Documentation accordion', { scrollBehavior: false }, () => { cy.contains('Advanced').click({ force: true }); cy.tick(accordionOpenAnimationTime); cy.get('iframe.tox-edit-area__iframe').should('not.be.visible'); - cy.contains('Documentation').click(); + cy.contains('Documentation').click({ force: true }); cy.tick(accordionOpenAnimationTime); getTinyMceEditor().should('be.visible'); @@ -67,7 +67,7 @@ describe('Documentation accordion', { scrollBehavior: false }, () => { clickAndDropElement(type, position); waitToRenderAllShapes(); - cy.contains('Documentation').click(); + cy.contains('Documentation').click({ force: true }); cy.tick(accordionOpenAnimationTime); getTinyMceEditor().clear().type(docString); assertDownloadedXmlContainsExpected(docString); @@ -84,14 +84,14 @@ describe('Documentation accordion', { scrollBehavior: false }, () => { it('can allow the documentation editor modal to edit the documentation', () => { clickAndDropElement(nodeTypes.task, position); waitToRenderAllShapes(); - cy.contains('Documentation').click(); + cy.contains('Documentation').click({ force: true }); cy.wait(accordionOpenAnimationTime); const documentationFromInspector = 'some documentation'; getTinyMceEditor().type(documentationFromInspector); cy.wait(modalAnimationTime); - cy.get('[data-test="documentation-modal-button"]').click(); + cy.get('[data-test="documentation-modal-button"]').click({ force: true }); const documentationFromModal = 'this is the documentation modal'; getTinyMceEditorInModal().type(documentationFromModal);