From 1f8637467e7eb2146f9849361d67160832aa9933 Mon Sep 17 00:00:00 2001 From: Philipp Date: Wed, 22 Nov 2023 12:12:14 +0100 Subject: [PATCH] test: add modeler select to `npm start` test --- test/spec/modeler/Linting.spec.js | 32 ++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/test/spec/modeler/Linting.spec.js b/test/spec/modeler/Linting.spec.js index f046c88..f2a14ed 100644 --- a/test/spec/modeler/Linting.spec.js +++ b/test/spec/modeler/Linting.spec.js @@ -152,11 +152,18 @@ describe('Linting', function() { }) }; - const linter = new Linter({ - plugins: [ - FooPlugin - ] - }); + let modeler = 'desktop'; + + const createLinter = modeler => { + return new Linter({ + modeler, + plugins: [ + FooPlugin + ] + }); + }; + + let linter = createLinter(modeler); const lint = () => { const definitions = bpmnjs.getDefinitions(); @@ -204,6 +211,11 @@ describe('Linting', function() {
+ +
@@ -221,6 +233,16 @@ describe('Linting', function() { ); }); + panel.querySelector('select').value = modeler; + + panel.querySelector('select').addEventListener('change', ({ target }) => { + modeler = target.value; + + linter = createLinter(modeler); + + lint(); + }); + panel.querySelector('button').addEventListener('click', () => { if (linting.isActive()) { linting.deactivate();