"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const test_utilities_1 = require("../../test-utilities");
const TextField_1 = require("../TextField");
const Select_1 = require("../Select");
const FormLayout_1 = require("./FormLayout");
describe('<FormLayout />', () => {
    it('renders its children', () => {
        const selectCountryProps = {
            id: 'select',
            name: 'country',
            label: 'Country',
            options: [
                {
                    value: 'CA',
                    label: 'Canada',
                },
                {
                    value: 'US',
                    label: 'United States',
                },
                {
                    value: 'UK',
                    label: 'United Kingdom',
                },
            ],
        };
        const selectProvinceProps = {
            id: 'select',
            name: 'province',
            label: 'Province',
            options: [
                {
                    value: 'QC',
                    label: 'Quebec',
                },
                {
                    value: 'ON',
                    label: 'Ontario',
                },
                {
                    value: 'PEI',
                    label: 'Prince Edward Island',
                },
            ],
        };
        const formLayout = test_utilities_1.mountWithContext(<FormLayout_1.FormLayout>
        <FormLayout_1.FormLayoutGroup>
          <Select_1.Select {...selectCountryProps}/>
          <Select_1.Select {...selectProvinceProps}/>
        </FormLayout_1.FormLayoutGroup>
        <TextField_1.TextField name="address1" id="address1" label="Address"/>
        <TextField_1.TextField name="address2" id="address2" label="Apartment, suite, etc."/>
      </FormLayout_1.FormLayout>);
        expect(formLayout).toContainReactComponentTimes(FormLayout_1.FormLayoutGroup, 1);
        expect(formLayout).toContainReactComponentTimes(TextField_1.TextField, 2);
    });
});
