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.

55 lines 1.35 kB
import React from "react"; import { SelectInput } from "."; import createSnapshot from "../../test/create-snapshot"; 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 = createSnapshot(React.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 = createSnapshot(React.createElement(SelectInput, selectInputProps), theme); expect(snapshot).toMatchSnapshot(); }); });