"use strict";
/* tslint:disable:no-unused-variable */
var React = require("react");
/* tslint:enable:no-unused-variable */
var ReactDOM = require("react-dom");
var ReactTestUtils = require("react-addons-test-utils");
var expect = chai.expect;
var Image_1 = require("./Image");
var Image_Props_1 = require("./Image.Props");
describe('Image', function () {
    it('renders an image', function (done) {
        ReactTestUtils.renderIntoDocument(React.createElement(Image_1.Image, { src: 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', onLoad: function () {
                done();
            } }));
    });
    it('can cover a portrait (tall) frame with a square image', function (done) {
        var root = document.createElement('div');
        document.body.appendChild(root);
        ReactDOM.render(React.createElement(Image_1.Image, { src: 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', width: 1, height: 3, imageFit: Image_Props_1.ImageFit.cover, className: 'is-portraitFrame' }), root);
        var image = document.querySelector('.ms-Image.is-portraitFrame .ms-Image-image');
        try {
            expect(image.className).to.contain('ms-Image-image--landscape');
        }
        catch (e) {
            done(e);
        }
        done();
    });
    it('can cover a landscape (wide) frame with a square image', function (done) {
        var root = document.createElement('div');
        document.body.appendChild(root);
        ReactDOM.render(React.createElement(Image_1.Image, { src: 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', width: 3, height: 1, imageFit: Image_Props_1.ImageFit.cover, className: 'is-landscapeFrame' }), root);
        var image = document.querySelector('.ms-Image.is-landscapeFrame .ms-Image-image');
        try {
            expect(image.className).to.contain('ms-Image-image--portrait');
        }
        catch (e) {
            done(e);
        }
        done();
    });
});

//# sourceMappingURL=Image.test.js.map
