blob: 1fbbca6a2298c441606a81b2c4b5daaf0d89e7eb [file] [log] [blame]
/**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import '../../../test/common-test-setup-karma';
import {fixture, html} from '@open-wc/testing-helpers';
import {GrChecksChip} from './gr-checks-chip';
import {Category} from '../../../api/checks';
suite('gr-checks-chip test', () => {
let element: GrChecksChip;
setup(async () => {
element = await fixture(html`<gr-checks-chip
.statusOrCategory=${Category.SUCCESS}
.text=${'0'}
></gr-checks-chip>`);
});
test('is defined', () => {
const el = document.createElement('gr-checks-chip');
assert.instanceOf(el, GrChecksChip);
});
test('renders', () => {
expect(element).shadowDom.to.equal(/* HTML */ `<div
aria-label="0 success result"
class="check_circle checksChip font-small"
role="link"
tabindex="0"
>
<gr-icon icon="check_circle"></gr-icon>
<div class="text">0</div>
</div>`);
});
});