dmn-js-shared
Advanced tools
Comparing version 2.0.2 to 2.1.0
{ | ||
"name": "dmn-js-shared", | ||
"description": "Shared components used by dmn-js", | ||
"version": "2.0.2", | ||
"version": "2.1.0", | ||
"scripts": { | ||
@@ -11,2 +11,3 @@ "test": "karma start", | ||
"devDependencies": { | ||
"didi": "^3.0.0", | ||
"inferno-test-utils": "^4.0.0", | ||
@@ -17,3 +18,2 @@ "stringify": "^5.1.0" | ||
"diagram-js": "^0.29.0", | ||
"didi": "^3.0.0", | ||
"dmn-moddle": "^3.0.1", | ||
@@ -20,0 +20,0 @@ "ids": "^0.2.0", |
@@ -0,1 +1,3 @@ | ||
import { query as domQuery } from 'min-dom'; | ||
export function triggerInputEvent(element, text) { | ||
@@ -16,7 +18,7 @@ if (element.tagName === 'INPUT') { | ||
export function triggerClick(el, clientX, clientY) { | ||
triggerMouseEvent(el, 'click', clientX, clientY); | ||
export function triggerClick(el, clientX, clientY, ctrlKey) { | ||
triggerMouseEvent(el, 'click', clientX, clientY, ctrlKey); | ||
} | ||
export function triggerMouseEvent(element, event, clientX, clientY) { | ||
export function triggerMouseEvent(element, event, clientX, clientY, ctrlKey = false) { | ||
const e = document.createEvent('MouseEvent'); | ||
@@ -27,3 +29,3 @@ | ||
event, true, true, window, 0, 0, 0, | ||
clientX, clientY, false, false, false, false, | ||
clientX, clientY, ctrlKey, false, false, false, | ||
0, null | ||
@@ -57,2 +59,10 @@ ); | ||
element.dispatchEvent(e); | ||
} | ||
export function triggerInputSelectChange(inputSelect, value, testContainer) { | ||
triggerClick(inputSelect); | ||
const option = domQuery(`.option[data-value="${ value }"]`, testContainer); | ||
triggerClick(option); | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60231
8
35
2149
3
- Removeddidi@^3.0.0