import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';

import { BranchInfoRow } from '../../src/components/BranchInfoRow';

describe('Dashboard branch component', () => {
    const BRANCH_NAME = 'someBranchName';
    const branch = {name: BRANCH_NAME};
    const dashComp = shallow(
        <BranchInfoRow branch={branch} />
    );

    it('should render to a <tr> without className per default', () => {
        expect(dashComp.type()).to.equal('tr');
    });

    xit('should have class warning', () => {
        expect(dashComp.props().className).to.equal('warning');
    });

    it('should have 3 columns', () => {
        const columns = dashComp.find('td');

        expect(columns).to.have.length(3);
    });

    it('first column should contain a link with text containing the branchName', () => {
        const firstColumn = dashComp.childAt(0);
        const aLink = firstColumn.find('a');

        expect(aLink.props().children).to.equal(BRANCH_NAME);
    });

});

@@ -92,18 +92,16 @@
 %0A%0Aimport
- %7B
  BranchI
@@ -107,17 +107,16 @@
 InfoRow 
-%7D
  from '.
@@ -130,16 +130,15 @@
 c/co
-mponents
+ntainer
 /Bra

fix unit test