<commit_before>import {expect} from 'chai'
import {describeComponent, it} from 'ember-mocha'
import hbs from 'htmlbars-inline-precompile'

describeComponent(
  'frost-radio-button-input',
  'Integration: FrostRadioButtonInputComponent',
  {
    integration: true
  },
  function () {
    it('renders default values', function () {
      this.set('_setupAssertions', function () {
        return
      })

      this.render(hbs`
        {{frost-radio-button-input
          _setupAssertions=_setupAssertions
        }}
      `)

      expect(
        this.$('.frost-radio-button-input').attr('type'),
        'type is set'
      ).to.eql('radio')
    })

    it('throws error when not in frost-radio-button', function () {
      expect(
        () => {
          this.render(hbs`
            {{frost-radio-button-input}}
          `)
        },
        'assertion thrown when used without frost-radio-group'
      ).to.throw(/frost-radio-button-input/)
    })

    it('sets disabled property', function () {
      this.set('_setupAssertions', function () {
        return
      })

      this.render(hbs`
        {{frost-radio-button-input
          disabled=true
          _setupAssertions=_setupAssertions
        }}
      `)

      expect(
        this.$('.frost-radio-button-input').attr('disabled'),
        'disabled class is set'
      ).to.eql('disabled')
    })

    it('sets value property', function () {
      const value = 'test value'

      this.set('value', value)
      this.set('_setupAssertions', function () {
        return
      })

      this.render(hbs`
        {{frost-radio-button-input
          _setupAssertions=_setupAssertions
          value=value
        }}
     `)

      expect(
        this.$('.frost-radio-button-input').prop('value'),
        'value is set'
      ).to.eql(value)
    })

    it('sets checked property', function () {
      const groupValue = 'testValue'
      const value = 'testValue'

      this.set('groupValue', groupValue)
      this.set('value', value)<commit_msg>updates a few integration tests for radio-input<commit_after>import {expect} from 'chai'
import {describeComponent, it} from 'ember-mocha'
import hbs from 'htmlbars-inline-precompile'

describeComponent(
  'frost-radio-button-input',
  'Integration: FrostRadioButtonInputComponent',
  {
    integration: true
  },
  function () {
    it('renders default values', function () {
      this.set('_setupAssertions', function () {
        return
      })

      this.render(hbs`
        {{frost-radio-button-input
          _setupAssertions=_setupAssertions
        }}
      `)

      expect(
        this.$('.frost-radio-button-input').prop('type'),
        'type is set'
      ).to.eql('radio')
    })

    it('throws error when not in frost-radio-button', function () {
      expect(
        () => {
          this.render(hbs`
            {{frost-radio-button-input}}
          `)
        },
        'assertion thrown when used without frost-radio-group'
      ).to.throw(/frost-radio-button-input/)
    })

    it('sets disabled property', function () {
      this.set('_setupAssertions', function () {
        return
      })

      this.render(hbs`
        {{frost-radio-button-input
          disabled=true
          _setupAssertions=_setupAssertions
        }}
      `)

      expect(
        this.$('.frost-radio-button-input').prop('disabled'),
        'disabled class is set'
      ).to.be.true
    })

    it('sets value property', function () {
      const value = 'test value'

      this.set('value', value)
      this.set('_setupAssertions', function () {
        return
      })

      this.render(hbs`
        {{frost-radio-button-input
          _setupAssertions=_setupAssertions
          value=value
        }}
     `)

      expect(
        this.$('.frost-radio-button-input').prop('value'),
        'value is set'
      ).to.eql(value)
    })

    it('sets checked property', function () {
      const groupValue = 'testValue'
      const value = 'testValue'

      this.set('groupValue', groupValue)
      this.set('value', value)
{'fraction_non_alphanumeric': 0.14096267190569745, 'fraction_numerical': 0.0, 'mean_word_length': 2.087945413191812, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6270875', 'n_tokens_mistral': 1230, 'n_tokens_neox': 1192, 'n_words': 221}