@gisce/ooui 2.31.0-alpha.2 → 2.31.0-alpha.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/dist/Many2one.d.ts +1 -0
- package/dist/Many2one.d.ts.map +1 -1
- package/dist/ooui.es.js +75 -72
- package/dist/ooui.es.js.map +1 -1
- package/package.json +1 -1
- package/src/Many2one.ts +4 -0
- package/src/spec/Many2one.spec.ts +19 -0
package/package.json
CHANGED
package/src/Many2one.ts
CHANGED
|
@@ -34,4 +34,23 @@ describe("A Many2one", () => {
|
|
|
34
34
|
|
|
35
35
|
expect(widget.relation).toBe("res.country");
|
|
36
36
|
});
|
|
37
|
+
it("should default showFolder to true", () => {
|
|
38
|
+
const widgetFactory = new WidgetFactory();
|
|
39
|
+
const props = {
|
|
40
|
+
name: "many2one1",
|
|
41
|
+
relation: "res.country",
|
|
42
|
+
};
|
|
43
|
+
const widget = widgetFactory.createWidget("many2one", props);
|
|
44
|
+
expect(widget.showFolder).toBe(true);
|
|
45
|
+
});
|
|
46
|
+
it("should have a property to hide the folder through widget props", () => {
|
|
47
|
+
const widgetFactory = new WidgetFactory();
|
|
48
|
+
const props = {
|
|
49
|
+
name: "many2one1",
|
|
50
|
+
relation: "res.country",
|
|
51
|
+
widget_props: "{'showFolder': false}",
|
|
52
|
+
};
|
|
53
|
+
const widget = widgetFactory.createWidget("many2one", props);
|
|
54
|
+
expect(widget.showFolder).toBe(false);
|
|
55
|
+
});
|
|
37
56
|
});
|