diff --git a/package-lock.json b/package-lock.json index 5609b351f..800a494a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4484,6 +4484,7 @@ "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", @@ -19449,6 +19450,7 @@ "table-js": "^9.1.0" }, "devDependencies": { + "@testing-library/dom": "^10.4.0", "dmn-font": "^0.6.2", "inferno-test-utils": "~5.6.2" } @@ -25205,6 +25207,7 @@ "version": "file:packages/dmn-js-literal-expression", "requires": { "@bpmn-io/dmn-variable-resolver": "^0.7.0", + "@testing-library/dom": "^10.4.0", "diagram-js": "^14.7.1", "dmn-font": "^0.6.2", "dmn-js-shared": "^16.8.0", diff --git a/packages/dmn-js-literal-expression/package.json b/packages/dmn-js-literal-expression/package.json index 87c10bc79..397608f49 100644 --- a/packages/dmn-js-literal-expression/package.json +++ b/packages/dmn-js-literal-expression/package.json @@ -26,6 +26,7 @@ "literal expression" ], "devDependencies": { + "@testing-library/dom": "^10.4.0", "dmn-font": "^0.6.2", "inferno-test-utils": "~5.6.2" }, diff --git a/packages/dmn-js-literal-expression/test/spec/features/textarea/TextareaEditorSpec.js b/packages/dmn-js-literal-expression/test/spec/features/textarea/TextareaEditorSpec.js index 0945bd031..90324ed08 100644 --- a/packages/dmn-js-literal-expression/test/spec/features/textarea/TextareaEditorSpec.js +++ b/packages/dmn-js-literal-expression/test/spec/features/textarea/TextareaEditorSpec.js @@ -2,6 +2,8 @@ import { bootstrapModeler, inject } from 'test/helper'; +import { waitFor } from '@testing-library/dom'; + import { query as domQuery } from 'min-dom'; import { queryEditor } from 'dmn-js-shared/test/util/EditorUtil'; @@ -112,7 +114,9 @@ describe('textarea editor', function() { await changeInput(document.activeElement, 'Var'); // then - expect(getVariablesSpy).to.have.been.called; + await waitFor(() => { + expect(getVariablesSpy).to.have.been.called; + }); }); });