<commit_before>import { moduleForComponent, test } from 'ember-qunit';
import InputBasedMixin from 'sl-ember-components/mixins/sl-input-based';
import TooltipEnabledMixin from 'sl-ember-components/mixins/sl-tooltip-enabled';

moduleForComponent( 'sl-checkbox', 'Unit | Component | sl checkbox', {
    unit: true
});

test( 'Expected Mixins are present', function( assert ) {
    assert.ok(
        InputBasedMixin.detect( this.subject() ),
        'InputBased Mixin is present'
    );
    assert.ok(
        TooltipEnabledMixin.detect( this.subject() ),
        'TooltipEnabled Mixin is present'
    );
});

test( 'Default property values', function( assert ) {
    const component = this.subject();

    assert.strictEqual(
        component.get( 'checked' ),
        false,
        '"checked" property is false by default'
    );

    assert.strictEqual(
        component.get( 'label' ),
        null,
        '"label" property is null by default'
    );
});<commit_msg>added unit tests for inline property as well as dependant keys<commit_after>import { moduleForComponent, test } from 'ember-qunit';
import InputBasedMixin from 'sl-ember-components/mixins/sl-input-based';
import TooltipEnabledMixin from 'sl-ember-components/mixins/sl-tooltip-enabled';

moduleForComponent( 'sl-checkbox', 'Unit | Component | sl checkbox', {
    unit: true
});

test( 'Expected Mixins are present', function( assert ) {
    assert.ok(
        InputBasedMixin.detect( this.subject() ),
        'InputBased Mixin is present'
    );
    assert.ok(
        TooltipEnabledMixin.detect( this.subject() ),
        'TooltipEnabled Mixin is present'
    );
});

test( 'Default property values', function( assert ) {
    const component = this.subject();

    assert.strictEqual(
        component.get( 'checked' ),
        false,
        '"checked" property is false by default'
    );

    assert.strictEqual(
        component.get( 'label' ),
        null,
        '"label" property is null by default'
    );
});

test( 'checkboxType property sets relevant class', function( assert ) {
    const component = this.subject();

    assert.strictEqual(
        component.get( 'checkboxType' ),
        'checkbox',
        'checkboxType defaults to "checkbox"'
    );

    assert.notStrictEqual(
        component.get( 'checkboxType' ),
        'checkbox-inline',
        'checkboxType is not inline'
    );

    Ember.run( () => {
        component.set( 'inline', true );
    });

    assert.strictEqual(
        component.get( 'checkboxType' ),
        'checkbox-inline',
        'checkboxType is inline'
    );

    assert.notStrictEqual(
        component.get( 'checkboxType' ),
        'checkbox',
        'checkboxType is not inline'
    );
});

test( 'Dependent keys are correct', function( assert ) {
    const component = this.subject();

    const checkboxTypeDependentKeys = [
        'inline'
    ];

    assert.deepEqual(
        component.checkboxType._dependentKeys,
        checkboxTypeDependentKeys,
        'Dependent keys are correct for checkboxType()'
    );
});
{'fraction_non_alphanumeric': 0.1231623652401176, 'fraction_numerical': 0.0, 'mean_word_length': 2.770935960591133, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '5888552', 'n_tokens_mistral': 869, 'n_tokens_neox': 853, 'n_words': 220}