/*
Copyright (c) 2018 Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { mount } from 'enzyme';
import { Card } from '../index.js';
import { header as headerImg, thumbnail as thumbnailImg } from '../images.js';
test('Card - basic functionality', function () {
  var props = {
    action: React.createElement("a", {
      href: "#test"
    }, "Link to a Place\xA0\xA0\xA0>"),
    headerImage: headerImg,
    thumbnail: thumbnailImg,
    title: 'Card title'
  };
  var wrapper = mount(React.createElement(Card, props, "Card body")); // Renders input, label and caption

  expect(wrapper.find('img')).toHaveLength(2);
});
test('Card - no images', function () {
  var props = {
    action: React.createElement("a", {
      href: "#test"
    }, "Link to a Place\xA0\xA0\xA0>"),
    title: 'Card title'
  };
  var wrapper = mount(React.createElement(Card, props, "Card body")); // Renders input, label and caption

  expect(wrapper.find('img')).toHaveLength(0);
});