import React from 'react'

import ReportList from '../index'

describe('ReportList', () => {
  const testbed = createTestbed(ReportList, {
    children: [
      <div key="0">Moocow</div>,
      <span key="1">Gorilla</span>,
      <div key="2">Bunny</div>
    ]
  })

  shouldRenderComponent(testbed, {}, ReportList)

  it('should render title', () => {
    testbed.render()

    expect(testbed.getText()).to.include('Reports')
  })

  it('should render children', () => {
    testbed.render()

    expect(testbed.getText()).to.include('Moocow')
    expect(testbed.getText()).to.include('Gorilla')
    expect(testbed.getText()).to.include('Bunny')
  })

  describe('a11y tests', () => {
    it('should meet a11y standards', (done) => {
      testbed.renderShallowly()
      testbed.checkA11yStandards(done)
    })
  })
})
