@schukai/monster 4.125.2 → 4.125.3
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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"author":"Volker Schukai","dependencies":{"@floating-ui/dom":"^1.7.5","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"4.125.
|
|
1
|
+
{"author":"Volker Schukai","dependencies":{"@floating-ui/dom":"^1.7.5","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"4.125.3"}
|
|
@@ -426,6 +426,50 @@ describe('Select', function () {
|
|
|
426
426
|
}, 50);
|
|
427
427
|
});
|
|
428
428
|
|
|
429
|
+
it('should remove the last badge without applyRemoval errors', function (done) {
|
|
430
|
+
this.timeout(2000);
|
|
431
|
+
|
|
432
|
+
let mocks = document.getElementById('mocks');
|
|
433
|
+
const select = document.createElement('monster-select');
|
|
434
|
+
select.setOption('type', 'checkbox');
|
|
435
|
+
select.setOption('features.clear', true);
|
|
436
|
+
select.setOption('options', [{label: 'One', value: '1'}]);
|
|
437
|
+
mocks.appendChild(select);
|
|
438
|
+
|
|
439
|
+
select.addEventListener('monster-selection-removed', (event) => {
|
|
440
|
+
try {
|
|
441
|
+
expect(event.detail.value).to.equal('1');
|
|
442
|
+
expect(select.getOption('selection')).to.deep.equal([]);
|
|
443
|
+
} catch (e) {
|
|
444
|
+
return done(e);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
done();
|
|
448
|
+
}, {once: true});
|
|
449
|
+
|
|
450
|
+
setTimeout(() => {
|
|
451
|
+
try {
|
|
452
|
+
select.value = ['1'];
|
|
453
|
+
} catch (e) {
|
|
454
|
+
return done(e);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
setTimeout(() => {
|
|
458
|
+
try {
|
|
459
|
+
const removeBadge = select.shadowRoot.querySelector('[data-monster-role=remove-badge]');
|
|
460
|
+
expect(removeBadge).to.be.instanceof(HTMLDivElement);
|
|
461
|
+
|
|
462
|
+
removeBadge.dispatchEvent(new Event('click', {
|
|
463
|
+
bubbles: true,
|
|
464
|
+
composed: true
|
|
465
|
+
}));
|
|
466
|
+
} catch (e) {
|
|
467
|
+
return done(e);
|
|
468
|
+
}
|
|
469
|
+
}, 50);
|
|
470
|
+
}, 50);
|
|
471
|
+
});
|
|
472
|
+
|
|
429
473
|
it('should skip lookup for empty equivalent selection values', function (done) {
|
|
430
474
|
this.timeout(2000);
|
|
431
475
|
|