<commit_before>import faker from 'faker'
import React from 'react'

import Portal from 'src/addons/Portal/Portal'
import Dimmer from 'src/modules/Dimmer/Dimmer'
import DimmerDimmable from 'src/modules/Dimmer/DimmerDimmable'
import * as common from 'test/specs/commonTests'
import { sandbox } from 'test/utils'

describe('Dimmer', () => {
  common.isConformant(Dimmer)
  common.hasSubComponents(Dimmer[DimmerDimmable])
  common.hasUIClassName(Dimmer)
  common.rendersChildren(Dimmer)

  common.propKeyOnlyToClassName(Dimmer, 'active')
  common.propKeyOnlyToClassName(Dimmer, 'inverted')
  common.propKeyOnlyToClassName(Dimmer, 'simple')

  common.implementsCreateMethod(Dimmer)

  describe('content', () => {
    it('renders text', () => {
      const text = faker.hacker.phrase()

      shallow(<Dimmer content={text} />)
        .should.contain.text(text)
    })

  })

  describe('active', () => {
    it('removes the `disabled` className when true', () => {
      shallow(<Dimmer active />)
        .should.not.have.className('disabled')
    })
    it('adds the `disabled` className when false', () => {
      shallow(<Dimmer active={false} />)
        .should.have.className('disabled')
    })
  })

  describe('onClickOutside', () => {
    it('omitted when not defined', () => {
      const wrapper = shallow(<Dimmer>{faker.hacker.phrase()}</Dimmer>)
      const click = () => wrapper.find('div.center').simulate('click')<commit_msg>style(Dimmer): remove white space<commit_after>import faker from 'faker'
import React from 'react'

import Portal from 'src/addons/Portal/Portal'
import Dimmer from 'src/modules/Dimmer/Dimmer'
import DimmerDimmable from 'src/modules/Dimmer/DimmerDimmable'
import * as common from 'test/specs/commonTests'
import { sandbox } from 'test/utils'

describe('Dimmer', () => {
  common.isConformant(Dimmer)
  common.hasSubComponents(Dimmer[DimmerDimmable])
  common.hasUIClassName(Dimmer)
  common.rendersChildren(Dimmer)

  common.propKeyOnlyToClassName(Dimmer, 'active')
  common.propKeyOnlyToClassName(Dimmer, 'inverted')
  common.propKeyOnlyToClassName(Dimmer, 'simple')

  common.implementsCreateMethod(Dimmer)

  describe('content', () => {
    it('renders text', () => {
      const text = faker.hacker.phrase()

      shallow(<Dimmer content={text} />)
        .should.contain.text(text)
    })
  })

  describe('active', () => {
    it('removes the `disabled` className when true', () => {
      shallow(<Dimmer active />)
        .should.not.have.className('disabled')
    })
    it('adds the `disabled` className when false', () => {
      shallow(<Dimmer active={false} />)
        .should.have.className('disabled')
    })
  })

  describe('onClickOutside', () => {
    it('omitted when not defined', () => {
      const wrapper = shallow(<Dimmer>{faker.hacker.phrase()}</Dimmer>)
      const click = () => wrapper.find('div.center').simulate('click')
{'fraction_non_alphanumeric': 0.15924006908462868, 'fraction_numerical': 0.0, 'mean_word_length': 4.089630931458699, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '810764', 'n_tokens_mistral': 939, 'n_tokens_neox': 921, 'n_words': 162}