From 030263efd927e42b323d6f896f28fc2ea2040233 Mon Sep 17 00:00:00 2001 From: Gervwyk Date: Thu, 19 Nov 2020 22:16:24 +0200 Subject: [PATCH] feat(blocksAntd): Drawer and tests --- packages/blocksAntd/demo/examples/Drawer.yaml | 21 +- .../blocksAntd/src/blocks/Drawer/Drawer.json | 14 + packages/blocksAntd/tests/Drawer.test.js | 21 +- .../tests/__snapshots__/Drawer.test.js.snap | 1696 ++++++++++++++++- 4 files changed, 1737 insertions(+), 15 deletions(-) diff --git a/packages/blocksAntd/demo/examples/Drawer.yaml b/packages/blocksAntd/demo/examples/Drawer.yaml index f2127e925..b89302fef 100644 --- a/packages/blocksAntd/demo/examples/Drawer.yaml +++ b/packages/blocksAntd/demo/examples/Drawer.yaml @@ -16,22 +16,23 @@ type: Drawer properties: maskClosable: false -- id: "properties.width: 300px" +- id: "properties.width: 500" type: Drawer properties: - width: 300px -- id: "properties.height: 320px" - type: Drawer - properties: - height: 320px -- id: "properties.zIndex: 1100" - type: Drawer - properties: - zIndex: 1100 + width: 500 - id: "properties.placement: top" type: Drawer properties: placement: top +- id: "properties.height: 500 placement: top" + type: Drawer + properties: + placement: top + height: 500 +- id: "properties.zIndex: 1100" + type: Drawer + properties: + zIndex: 1100 - id: "properties.placement: bottom" type: Drawer properties: diff --git a/packages/blocksAntd/src/blocks/Drawer/Drawer.json b/packages/blocksAntd/src/blocks/Drawer/Drawer.json index 4d6fe1a5f..cd03a37a8 100644 --- a/packages/blocksAntd/src/blocks/Drawer/Drawer.json +++ b/packages/blocksAntd/src/blocks/Drawer/Drawer.json @@ -1,6 +1,20 @@ { "category": "container", "loading": false, + "test": { + "methods": [ + { + "name": "toggleOpen", + "args": {} + }, + { + "name": "setOpen", + "args": { + "open": true + } + } + ] + }, "schema": { "properties": { "type": "object", diff --git a/packages/blocksAntd/tests/Drawer.test.js b/packages/blocksAntd/tests/Drawer.test.js index 0ee1a5d74..a0b98f3f8 100644 --- a/packages/blocksAntd/tests/Drawer.test.js +++ b/packages/blocksAntd/tests/Drawer.test.js @@ -14,11 +14,26 @@ limitations under the License. */ -import { runBlockSchemaTests, runRenderTests } from '@lowdefy/block-tools'; +import { runBlockSchemaTests, runMethodTests } from '@lowdefy/block-tools'; +import Enzyme, { mount } from 'enzyme'; +import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; +import { Drawer } from 'antd'; -import Drawer from '../src/blocks/Drawer/Drawer'; +Enzyme.configure({ adapter: new Adapter() }); +import DrawerBlock from '../src/blocks/Drawer/Drawer'; import examples from '../demo/examples/Drawer.yaml'; import meta from '../src/blocks/Drawer/Drawer.json'; -runRenderTests({ examples, Block: Drawer, meta }); +jest.mock('antd/lib/drawer', () => { + return jest.fn((props) => props.toString()); +}); + +const mocks = [ + { + name: 'default', + fn: Drawer, + }, +]; + +runMethodTests({ examples, Block: DrawerBlock, mocks, meta, enzyme: { mount } }); runBlockSchemaTests({ examples, meta }); diff --git a/packages/blocksAntd/tests/__snapshots__/Drawer.test.js.snap b/packages/blocksAntd/tests/__snapshots__/Drawer.test.js.snap index a66f36ef6..95de40752 100644 --- a/packages/blocksAntd/tests/__snapshots__/Drawer.test.js.snap +++ b/packages/blocksAntd/tests/__snapshots__/Drawer.test.js.snap @@ -1,13 +1,1705 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Render default - value[0] 1`] = `null`; +exports[`Render for method: {"name":"setOpen","args":{"open":true}} - default - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "default", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "default", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; -exports[`Render properties.title - value[0] 1`] = `null`; +exports[`Render for method: {"name":"setOpen","args":{"open":true}} - properties.closable: false - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": false, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.closable: false", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": false, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.closable: false", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"setOpen","args":{"open":true}} - properties.height: 500 placement: top - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": 500, + "id": "properties.height: 500 placement: top", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": "top", + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": 500, + "id": "properties.height: 500 placement: top", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": "top", + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"setOpen","args":{"open":true}} - properties.keyboard: false - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.keyboard: false", + "keyboard": false, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.keyboard: false", + "keyboard": false, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"setOpen","args":{"open":true}} - properties.maskClosable: false - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.maskClosable: false", + "keyboard": undefined, + "mask": undefined, + "maskClosable": false, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.maskClosable: false", + "keyboard": undefined, + "mask": undefined, + "maskClosable": false, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"setOpen","args":{"open":true}} - properties.placement: bottom - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.placement: bottom", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": "bottom", + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.placement: bottom", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": "bottom", + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"setOpen","args":{"open":true}} - properties.placement: left - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.placement: left", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": "left", + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.placement: left", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": "left", + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"setOpen","args":{"open":true}} - properties.placement: top - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.placement: top", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": "top", + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.placement: top", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": "top", + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"setOpen","args":{"open":true}} - properties.title - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.title", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": "Drawer title", + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.title", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": "Drawer title", + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"setOpen","args":{"open":true}} - properties.title - value[0] - default 2`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.title", + "keyboard": undefined, + "mask": false, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.title", + "keyboard": undefined, + "mask": false, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"setOpen","args":{"open":true}} - properties.width: 500 - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.width: 500", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": false, + "width": 500, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.width: 500", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": true, + "width": 500, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"setOpen","args":{"open":true}} - properties.zIndex: 1100 - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.zIndex: 1100", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": 1100, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.zIndex: 1100", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": 1100, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"toggleOpen","args":{}} - default - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "default", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "default", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"toggleOpen","args":{}} - properties.closable: false - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": false, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.closable: false", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": false, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.closable: false", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"toggleOpen","args":{}} - properties.height: 500 placement: top - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": 500, + "id": "properties.height: 500 placement: top", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": "top", + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": 500, + "id": "properties.height: 500 placement: top", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": "top", + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"toggleOpen","args":{}} - properties.keyboard: false - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.keyboard: false", + "keyboard": false, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.keyboard: false", + "keyboard": false, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"toggleOpen","args":{}} - properties.maskClosable: false - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.maskClosable: false", + "keyboard": undefined, + "mask": undefined, + "maskClosable": false, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.maskClosable: false", + "keyboard": undefined, + "mask": undefined, + "maskClosable": false, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"toggleOpen","args":{}} - properties.placement: bottom - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.placement: bottom", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": "bottom", + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.placement: bottom", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": "bottom", + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"toggleOpen","args":{}} - properties.placement: left - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.placement: left", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": "left", + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.placement: left", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": "left", + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"toggleOpen","args":{}} - properties.placement: top - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.placement: top", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": "top", + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.placement: top", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": "top", + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"toggleOpen","args":{}} - properties.title - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.title", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": "Drawer title", + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.title", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": "Drawer title", + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"toggleOpen","args":{}} - properties.title - value[0] - default 2`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.title", + "keyboard": undefined, + "mask": false, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.title", + "keyboard": undefined, + "mask": false, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"toggleOpen","args":{}} - properties.width: 500 - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.width: 500", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": false, + "width": 500, + "zIndex": undefined, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.width: 500", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": true, + "width": 500, + "zIndex": undefined, + }, + Object {}, + ], +] +`; + +exports[`Render for method: {"name":"toggleOpen","args":{}} - properties.zIndex: 1100 - value[0] - default 1`] = ` +Array [ + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.zIndex: 1100", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": false, + "width": undefined, + "zIndex": 1100, + }, + Object {}, + ], + Array [ + Object { + "bodyStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "children":
+ content +
, + "closable": undefined, + "drawerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "getContainer": undefined, + "headerStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "height": undefined, + "id": "properties.zIndex: 1100", + "keyboard": undefined, + "mask": undefined, + "maskClosable": undefined, + "maskStyle": "{\\"options\\":{\\"styleObjectOnly\\":true}}", + "onClose": [Function], + "placement": undefined, + "title": undefined, + "visible": true, + "width": undefined, + "zIndex": 1100, + }, + Object {}, + ], +] +`; exports[`Test Schema default 1`] = `true`; exports[`Test Schema default 2`] = `null`; +exports[`Test Schema properties.closable: false 1`] = `true`; + +exports[`Test Schema properties.closable: false 2`] = `null`; + +exports[`Test Schema properties.height: 500 placement: top 1`] = `true`; + +exports[`Test Schema properties.height: 500 placement: top 2`] = `null`; + +exports[`Test Schema properties.keyboard: false 1`] = `true`; + +exports[`Test Schema properties.keyboard: false 2`] = `null`; + +exports[`Test Schema properties.maskClosable: false 1`] = `true`; + +exports[`Test Schema properties.maskClosable: false 2`] = `null`; + +exports[`Test Schema properties.placement: bottom 1`] = `true`; + +exports[`Test Schema properties.placement: bottom 2`] = `null`; + +exports[`Test Schema properties.placement: left 1`] = `true`; + +exports[`Test Schema properties.placement: left 2`] = `null`; + +exports[`Test Schema properties.placement: top 1`] = `true`; + +exports[`Test Schema properties.placement: top 2`] = `null`; + exports[`Test Schema properties.title 1`] = `true`; exports[`Test Schema properties.title 2`] = `null`; + +exports[`Test Schema properties.title 3`] = `true`; + +exports[`Test Schema properties.title 4`] = `null`; + +exports[`Test Schema properties.width: 500 1`] = `true`; + +exports[`Test Schema properties.width: 500 2`] = `null`; + +exports[`Test Schema properties.zIndex: 1100 1`] = `true`; + +exports[`Test Schema properties.zIndex: 1100 2`] = `null`;