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

import BranchInfoRow  from '../../src/container/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);
    });

});

@@ -32,18 +32,22 @@
 rt %7B
+%0A   
  expect
- %7D 
+%0A%7D%0A
 from
@@ -63,24 +63,28 @@
 import %7B
+%0A   
  shallow
  %7D from 
@@ -79,11 +79,11 @@
 llow
- %7D 
+%0A%7D%0A
 from
@@ -115,17 +115,16 @@
 InfoRow 
- 
 from '..
@@ -267,16 +267,25 @@
 anch = %7B
+%0A        
 name: BR
@@ -293,16 +293,21 @@
 NCH_NAME
+%0A    
 %7D;%0A    c
@@ -334,18 +334,11 @@
 low(
-%0A       
  %3C
+ 
 Bran
@@ -357,17 +357,49 @@
 anch
-=%7Bbranch%7D
+ = %7B%0A            branch%0A        %7D%0A       
  /%3E%0A
@@ -539,126 +539,8 @@
 );%0A%0A
-    xit('should have class warning', () =%3E %7B%0A        expect(dashComp.props().className).to.equal('warning');%0A    %7D);%0A%0A
     
@@ -680,16 +680,25 @@
 %0A    it(
+%0A        
 'first c
@@ -763,32 +763,36 @@
 hName', () =%3E %7B%0A
+    
         const fi
@@ -828,24 +828,28 @@
 0);%0A        
+    
 const aLink 
@@ -870,24 +870,28 @@
 find('a');%0A%0A
+    
         expe
@@ -940,16 +940,20 @@
 _NAME);%0A
+    
     %7D);%0A

remove waste: skipped, ignored unit test