@schukai/monster 4.138.0 → 4.139.0

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.
@@ -0,0 +1,37 @@
1
+ import * as chai from "chai";
2
+ import { chaiDom } from "../../../util/chai-dom.mjs";
3
+ import { initJSDOM } from "../../../util/jsdom.mjs";
4
+
5
+ let expect = chai.expect;
6
+ chai.use(chaiDom);
7
+
8
+ let InputGroup;
9
+
10
+ describe("InputGroup", function () {
11
+ before(function (done) {
12
+ initJSDOM()
13
+ .then(() => import("../../../../source/components/form/input-group.mjs"))
14
+ .then((m) => {
15
+ InputGroup = m.InputGroup;
16
+ done();
17
+ })
18
+ .catch((e) => done(e));
19
+ });
20
+
21
+ it("should create an input group element", function () {
22
+ const inputGroup = document.createElement("monster-input-group");
23
+
24
+ expect(inputGroup).to.be.instanceof(InputGroup);
25
+ });
26
+
27
+ it("should allow the input group to stretch within constrained controls", function () {
28
+ const cssText = InputGroup.getCSSStyleSheet()
29
+ .flatMap((styleSheet) => Array.from(styleSheet.cssRules))
30
+ .map((rule) => rule.cssText)
31
+ .join("\n");
32
+
33
+ expect(cssText).to.contain("display: flex");
34
+ expect(cssText).to.contain("box-sizing: border-box");
35
+ expect(cssText).to.contain("height: 100%");
36
+ });
37
+ });
@@ -129,6 +129,18 @@ describe('Select', function () {
129
129
  });
130
130
  })
131
131
 
132
+ it('should expose compact layout variables for constrained control contexts', function () {
133
+ const cssText = SelectStyleSheet
134
+ .cssRules
135
+ ? Array.from(SelectStyleSheet.cssRules).map((rule) => rule.cssText).join("\n")
136
+ : "";
137
+
138
+ expect(cssText).to.contain("--monster-select-container-overflow");
139
+ expect(cssText).to.contain("--monster-select-control-padding");
140
+ expect(cssText).to.contain("--monster-select-selection-margin");
141
+ expect(cssText).to.contain("--monster-select-selection-flex-wrap");
142
+ });
143
+
132
144
  describe('With fetch', function () {
133
145
 
134
146
  beforeEach((done) => {