@gisce/ooui 2.21.0-alpha.2 → 2.21.0-alpha.4
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/dist/Group.d.ts +2 -2
- package/dist/Group.d.ts.map +1 -1
- package/dist/Page.d.ts +2 -2
- package/dist/Page.d.ts.map +1 -1
- package/dist/ooui.es.js +219 -219
- package/dist/ooui.es.js.map +1 -1
- package/package.json +1 -1
- package/src/Group.ts +2 -2
- package/src/Page.ts +2 -2
- package/src/spec/Group.spec.ts +19 -0
- package/src/spec/Page.spec.ts +19 -0
package/package.json
CHANGED
package/src/Group.ts
CHANGED
package/src/Page.ts
CHANGED
package/src/spec/Group.spec.ts
CHANGED
|
@@ -40,4 +40,23 @@ describe("A Group", () => {
|
|
|
40
40
|
const widget = widgetFactory.createWidget("group", props);
|
|
41
41
|
expect(widget.icon).toEqual("home");
|
|
42
42
|
});
|
|
43
|
+
describe("working as a spinner", () => {
|
|
44
|
+
it("should be loading false as default", () => {
|
|
45
|
+
const widgetFactory = new WidgetFactory();
|
|
46
|
+
const props = {
|
|
47
|
+
string: "A group",
|
|
48
|
+
};
|
|
49
|
+
const widget = widgetFactory.createWidget("group", props);
|
|
50
|
+
expect(widget.loading).toBe(false);
|
|
51
|
+
});
|
|
52
|
+
it("should be loading true if set", () => {
|
|
53
|
+
const widgetFactory = new WidgetFactory();
|
|
54
|
+
const props = {
|
|
55
|
+
string: "A group",
|
|
56
|
+
loading: true,
|
|
57
|
+
};
|
|
58
|
+
const widget = widgetFactory.createWidget("group", props);
|
|
59
|
+
expect(widget.loading).toBe(true);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
43
62
|
});
|
package/src/spec/Page.spec.ts
CHANGED
|
@@ -14,4 +14,23 @@ describe("A Page", () => {
|
|
|
14
14
|
expect(widget.label).toBe("Page 1");
|
|
15
15
|
expect(widget.icon).toBe("home");
|
|
16
16
|
});
|
|
17
|
+
describe("working as a Spinner", () => {
|
|
18
|
+
it("should have loading to be false by default", () => {
|
|
19
|
+
const widgetFactory = new WidgetFactory();
|
|
20
|
+
const props = {
|
|
21
|
+
string: "Page 1",
|
|
22
|
+
};
|
|
23
|
+
const widget = widgetFactory.createWidget("page", props);
|
|
24
|
+
expect(widget.loading).toBe(false);
|
|
25
|
+
});
|
|
26
|
+
it("should allow setting loading to true", () => {
|
|
27
|
+
const widgetFactory = new WidgetFactory();
|
|
28
|
+
const props = {
|
|
29
|
+
string: "Page 1",
|
|
30
|
+
loading: true,
|
|
31
|
+
};
|
|
32
|
+
const widget = widgetFactory.createWidget("page", props);
|
|
33
|
+
expect(widget.loading).toBe(true);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
17
36
|
});
|