import RichContentInput from '../presenter'

describe('RichContentInput', () => {
  const props = {
    textareaId: 'uniqTextareaId',
    onContinue: sinon.stub(),
    openModal: sinon.stub()
  }
  const testbed = createTestbed(withContext(RichContentInput), props)

  it('should render', () => {
    testbed.render()
    const rceComponent = testbed.findChildByType(RichContentInput)
    expect(rceComponent).to.not.be.undefined()
  })

  describe('a11y tests', () => {
    it('should meet a11y standards', (done) => {
      testbed.render()
      // ignoring button-name because of the textcolor tinymce plugin
      testbed.checkA11yStandards(done, {
        ignores: [
          'aria-allowed-role', // TODO: remove this when canvas-rce is fixed
          'button-name'
        ]
      })
    })
  })
})
