@gisce/ooui 2.12.0 → 2.12.2
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/package.json +1 -1
- package/src/spec/Form.spec.ts +35 -0
package/package.json
CHANGED
package/src/spec/Form.spec.ts
CHANGED
|
@@ -5796,4 +5796,39 @@ describe("A Form", () => {
|
|
|
5796
5796
|
expect(alert1.invisible).toBeFalsy();
|
|
5797
5797
|
expect(alert2.invisible).toBeTruthy();
|
|
5798
5798
|
});
|
|
5799
|
+
// it("Should not be able to view the Autoconsum tab since it's invisible due to tags and attrs", () => {
|
|
5800
|
+
// const xml = `
|
|
5801
|
+
// <form string="polisses">
|
|
5802
|
+
// <notebook
|
|
5803
|
+
// colspan="6">
|
|
5804
|
+
// <page name="page-autoconsum" string="Autoconsum"
|
|
5805
|
+
// attrs="{'invisible':[('autoconsum_id', '=', False)]}" invisible="1"
|
|
5806
|
+
// json_attrs="{"invisible": {"rules": [{"operator": "=", "field": "autoconsum_id", "value": false}], "condition": "AND"}}">
|
|
5807
|
+
// <field name="autoconsum_id" />
|
|
5808
|
+
// </page>
|
|
5809
|
+
// </notebook>
|
|
5810
|
+
// </form>
|
|
5811
|
+
// `;
|
|
5812
|
+
// const form = new Form({
|
|
5813
|
+
// autoconsum_id: {
|
|
5814
|
+
// context: "",
|
|
5815
|
+
// digits: [16, 2],
|
|
5816
|
+
// domain: [],
|
|
5817
|
+
// is_function: true,
|
|
5818
|
+
// readonly: 1,
|
|
5819
|
+
// relation: "giscedata.autoconsum",
|
|
5820
|
+
// string: "Autoconsum",
|
|
5821
|
+
// type: "many2one",
|
|
5822
|
+
// views: {},
|
|
5823
|
+
// },
|
|
5824
|
+
// });
|
|
5825
|
+
// form.parse(xml, {
|
|
5826
|
+
// values: {
|
|
5827
|
+
// autoconsum_id: [1, "ES0318363477145938GEA000"],
|
|
5828
|
+
// },
|
|
5829
|
+
// });
|
|
5830
|
+
// const pageAutoconsum = form.findById("page-autoconsum") as Page;
|
|
5831
|
+
// expect(pageAutoconsum).toBeDefined();
|
|
5832
|
+
// expect(pageAutoconsum.invisible).toBeTruthy();
|
|
5833
|
+
// });
|
|
5799
5834
|
});
|