pull/721/head
Cory LaViska 2022-03-23 09:35:15 -04:00
rodzic f34960d82a
commit 347808e86c
1 zmienionych plików z 12 dodań i 6 usunięć

Wyświetl plik

@ -2,13 +2,19 @@ import { expect, fixture, html } from '@open-wc/testing';
import sinon from 'sinon';
import type SlButton from './button';
describe('<sl-button>', () => {
describe('when provided no parameters', () => {
it('passes accessibility test', async () => {
const el = await fixture<SlButton>(html` <sl-button>Button Label</sl-button> `);
await expect(el).to.be.accessible();
});
const variants = ['default', 'primary', 'success', 'neutral', 'warning', 'danger'];
describe('<sl-button>', () => {
describe('accessibility tests', () => {
variants.forEach(variant => {
it(`is should be accessible when variant is "${variant}"`, async () => {
const el = await fixture<SlButton>(html` <sl-button variant="${variant}"> Button Label </sl-button> `);
await expect(el).to.be.accessible();
});
});
});
describe('when provided no parameters', () => {
it('default values are set correctly', async () => {
const el = await fixture<SlButton>(html` <sl-button>Button Label</sl-button> `);