<commit_before>import Ember from 'ember';
import { moduleForComponent, test } from 'ember-qunit';
import sinon from 'sinon';
import StreamEnabledMixin from 'ember-stream/mixins/stream-enabled';
import TooltipEnabledMixin from 'sl-ember-components/mixins/sl-tooltip-enabled';
import { Theme as ThemeEnum } from 'sl-ember-components/components/sl-button';
import { Size as SizeEnum } from 'sl-ember-components/components/sl-button';
import * as warn from 'sl-ember-components/utils/warn';

const Size = {
    EXTRA_SMALL: 'extra-small',
    LARGE: 'large',
    MEDIUM: 'medium',
    SMALL: 'small'
};

const Theme = {
    DANGER: 'danger',
    DEFAULT: 'default',
    HOVER: 'hover',
    INFO: 'info',
    LINK: 'link',
    PRIMARY: 'primary',
    SUCCESS: 'success',
    WARNING: 'warning'
};

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

const mockStreamService = {
    send() {}
};

test( 'Expected Mixins are present', function( assert ) {
    assert.ok(
       StreamEnabledMixin.detect( this.subject() ),
       'StreamEnabled 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( 'tagName' ),
        'button',
        'Default tagName is button'
    );

    assert.strictEqual(
        component.get( 'bubbles' ),
        true,
        'bubbles is true by default'
    );

    assert.strictEqual(
        component.get( 'disabled' ),
        false,
        'disabled is false by default'
    );

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

    assert.strictEqual(
        component.get( 'pending' ),
        false,
        'pending is false by default'<commit_msg>closes #1472<commit_after>import Ember from 'ember';
import { moduleForComponent, test } from 'ember-qunit';
import sinon from 'sinon';
import StreamEnabledMixin from 'ember-stream/mixins/stream-enabled';
import TooltipEnabledMixin from 'sl-ember-components/mixins/sl-tooltip-enabled';
import { Theme as ThemeEnum } from 'sl-ember-components/components/sl-button';
import { Size as SizeEnum } from 'sl-ember-components/components/sl-button';
import * as warn from 'sl-ember-components/utils/warn';

const Size = {
    EXTRA_SMALL: 'extra-small',
    LARGE: 'large',
    MEDIUM: 'medium',
    SMALL: 'small'
};

const Theme = {
    DANGER: 'danger',
    DEFAULT: 'default',
    HOVER: 'hover',
    INFO: 'info',
    LINK: 'link',
    PRIMARY: 'primary',
    SUCCESS: 'success',
    WARNING: 'warning'
};

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

const mockStreamService = {
    send() {}
};

test( 'Expected Mixins are present', function( assert ) {
    assert.ok(
       StreamEnabledMixin.detect( this.subject() ),
       'StreamEnabled Mixin is present'
    );

    assert.ok(
        TooltipEnabledMixin.detect( this.subject() ),
        'TooltipEnabled Mixin is present'
    );
});

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

    assert.strictEqual(
        component.get( 'tagName' ),
        'button',
        'Default tagName is button'
    );

    assert.strictEqual(
        component.get( 'bubbles' ),
        true,
        'bubbles is true by default'
    );

    assert.strictEqual(
        component.get( 'disabled' ),
        false,
        'disabled is false by default'
    );

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

    assert.strictEqual(
        component.get( 'pending' ),
        false,
        'pending is false by default'
{'fraction_non_alphanumeric': 0.13054762522709576, 'fraction_numerical': 0.0010381520892810796, 'mean_word_length': 2.774730656219393, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3939985', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1165, 'n_words': 305}