bettblake08/Neo-UI

View on GitHub
src/components/inputs/textInput/__snapshots__/textInput.spec.js.snap

Summary

Maintainability
Test Coverage
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`TextInput  renders as expected 1`] = `
ShallowWrapper {
  Symbol(enzyme.__root__): [Circular],
  Symbol(enzyme.__unrendered__): <TextInput
    componentStateKey="neoComponents"
    config={
      Object {
        "floatingLabel": true,
        "label": "Name",
        "length": 30,
        "placeholder": "Brian Bett",
        "text": "",
        "type": "neo-text-input",
      }
    }
    defaultStatus={0}
    name="Name"
    parent={
      Object {
        "setState": [MockFunction] {
          "calls": Array [
            Array [
              [Function],
            ],
          ],
          "results": Array [
            Object {
              "isThrow": false,
              "value": undefined,
            },
          ],
        },
        "state": Object {},
      }
    }
  />,
  Symbol(enzyme.__renderer__): Object {
    "batchedUpdates": [Function],
    "getNode": [Function],
    "render": [Function],
    "simulateEvent": [Function],
    "unmount": [Function],
  },
  Symbol(enzyme.__node__): Object {
    "instance": null,
    "key": undefined,
    "nodeType": "host",
    "props": Object {
      "children": Array [
        <div
          className="neo-text-input__label neo-font--input"
        >
          Name
        </div>,
        <input
          className="neo-font--input"
          id="Name"
          onChange={[Function]}
          placeholder="Brian Bett"
          type="text"
          value=""
        />,
        <label
          htmlFor="Name"
        >
          Name
        </label>,
        <div
          className="neo-font--comment neo-text-input__comment--active"
        />,
        <div
          className="neo-font--comment neo-text-input__error--disabled"
        >
          
        </div>,
      ],
      "className": "neo-text-input--normal neo-font--input has-float-label",
    },
    "ref": null,
    "rendered": Array [
      Object {
        "instance": null,
        "key": undefined,
        "nodeType": "host",
        "props": Object {
          "children": "Name",
          "className": "neo-text-input__label neo-font--input",
        },
        "ref": null,
        "rendered": "Name",
        "type": "div",
      },
      Object {
        "instance": null,
        "key": undefined,
        "nodeType": "host",
        "props": Object {
          "className": "neo-font--input",
          "id": "Name",
          "onChange": [Function],
          "placeholder": "Brian Bett",
          "type": "text",
          "value": "",
        },
        "ref": Object {
          "current": null,
        },
        "rendered": null,
        "type": "input",
      },
      Object {
        "instance": null,
        "key": undefined,
        "nodeType": "host",
        "props": Object {
          "children": "Name",
          "htmlFor": "Name",
        },
        "ref": null,
        "rendered": "Name",
        "type": "label",
      },
      Object {
        "instance": null,
        "key": undefined,
        "nodeType": "host",
        "props": Object {
          "children": undefined,
          "className": "neo-font--comment neo-text-input__comment--active",
        },
        "ref": null,
        "rendered": null,
        "type": "div",
      },
      Object {
        "instance": null,
        "key": undefined,
        "nodeType": "host",
        "props": Object {
          "children": "",
          "className": "neo-font--comment neo-text-input__error--disabled",
        },
        "ref": null,
        "rendered": "",
        "type": "div",
      },
    ],
    "type": "div",
  },
  Symbol(enzyme.__nodes__): Array [
    Object {
      "instance": null,
      "key": undefined,
      "nodeType": "host",
      "props": Object {
        "children": Array [
          <div
            className="neo-text-input__label neo-font--input"
          >
            Name
          </div>,
          <input
            className="neo-font--input"
            id="Name"
            onChange={[Function]}
            placeholder="Brian Bett"
            type="text"
            value=""
          />,
          <label
            htmlFor="Name"
          >
            Name
          </label>,
          <div
            className="neo-font--comment neo-text-input__comment--active"
          />,
          <div
            className="neo-font--comment neo-text-input__error--disabled"
          >
            
          </div>,
        ],
        "className": "neo-text-input--normal neo-font--input has-float-label",
      },
      "ref": null,
      "rendered": Array [
        Object {
          "instance": null,
          "key": undefined,
          "nodeType": "host",
          "props": Object {
            "children": "Name",
            "className": "neo-text-input__label neo-font--input",
          },
          "ref": null,
          "rendered": "Name",
          "type": "div",
        },
        Object {
          "instance": null,
          "key": undefined,
          "nodeType": "host",
          "props": Object {
            "className": "neo-font--input",
            "id": "Name",
            "onChange": [Function],
            "placeholder": "Brian Bett",
            "type": "text",
            "value": "",
          },
          "ref": Object {
            "current": null,
          },
          "rendered": null,
          "type": "input",
        },
        Object {
          "instance": null,
          "key": undefined,
          "nodeType": "host",
          "props": Object {
            "children": "Name",
            "htmlFor": "Name",
          },
          "ref": null,
          "rendered": "Name",
          "type": "label",
        },
        Object {
          "instance": null,
          "key": undefined,
          "nodeType": "host",
          "props": Object {
            "children": undefined,
            "className": "neo-font--comment neo-text-input__comment--active",
          },
          "ref": null,
          "rendered": null,
          "type": "div",
        },
        Object {
          "instance": null,
          "key": undefined,
          "nodeType": "host",
          "props": Object {
            "children": "",
            "className": "neo-font--comment neo-text-input__error--disabled",
          },
          "ref": null,
          "rendered": "",
          "type": "div",
        },
      ],
      "type": "div",
    },
  ],
  Symbol(enzyme.__options__): Object {
    "adapter": ReactSixteenAdapter {
      "options": Object {
        "enableComponentDidUpdateOnSetState": true,
        "lifecycles": Object {
          "componentDidUpdate": Object {
            "onSetState": true,
          },
          "getDerivedStateFromProps": true,
          "getSnapshotBeforeUpdate": true,
          "setState": Object {
            "skipsComponentDidUpdateOnNullish": true,
          },
        },
      },
    },
    "attachTo": undefined,
    "hydrateIn": undefined,
  },
}
`;