UNPKG

vcc-ui

Version:

VCC UI is a collection of React UI Components that can be used for developing front-end applications at Volvo Car Corporation.

62 lines (57 loc) 1.56 kB
"use strict"; var _react = _interopRequireDefault(require("react")); var _ = require("."); var _createSnapshot = _interopRequireDefault(require("../../test/create-snapshot")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } describe("<SelectInput /> snapshot tests", function () { var selectInputProps = { onChange: function onChange() {}, options: [{ value: "bilmodell", label: "Bilmodell" }, { value: "c70", label: "Volvo C70" }, { value: "c90", label: "Volvo C90" }, { value: "c99", label: "Volvo C99", disabled: true }, { value: "s40", label: "Volvo S40" }, { value: "s60", label: "Volvo S60" }, { value: "s80", label: "Volvo S80" }, { value: "s90", label: "Volvo S90" }], value: "v70" }; it("renders <SelectInput /> correctly", function () { var snapshot = (0, _createSnapshot.default)(_react.default.createElement(_.SelectInput, selectInputProps)); expect(snapshot).toMatchSnapshot(); }); it("renders <SelectInput /> correctly with theme", function () { var theme = { colors: { primary: "pink" }, selectInput: { border: "1px solid #000" }, selectInputValue: { fontSize: "17px" }, tokens: {} }; var snapshot = (0, _createSnapshot.default)(_react.default.createElement(_.SelectInput, selectInputProps), theme); expect(snapshot).toMatchSnapshot(); }); });