test: start the breadcrumb test.

This commit is contained in:
Christos Hrousis
2021-09-21 20:43:32 +10:00
parent 1a08f063a6
commit 86e06ce1e6

View File

@@ -1,13 +1,39 @@
import { expect, fixture, html, waitUntil } from '@open-wc/testing';
import { expect, fixture, html } from '@open-wc/testing';
// import sinon from 'sinon';
import '../../../dist/shoelace.js';
import type SlBreadcrumb from './breadcrumb';
describe('<sl-breadcrumb>', () => {
it('should render a component', async () => {
const el = await fixture(html` <sl-breadcrumb></sl-breadcrumb> `);
let el;
expect(el).to.exist;
describe('when provided a standard list of el-breadcrumb-item children and no parameters', async () => {
before(async () => {
el = await fixture<SlBreadcrumb>(html`
<sl-breadcrumb>
<sl-breadcrumb-item>Catalog</sl-breadcrumb-item>
<sl-breadcrumb-item>Clothing</sl-breadcrumb-item>
<sl-breadcrumb-item>Women's</sl-breadcrumb-item>
<sl-breadcrumb-item>Shirts &amp; Tops</sl-breadcrumb-item>
</sl-breadcrumb>
`);
});
it('should render a component that passes accessibility test', async () => {
await expect(el).to.be.accessible();
});
it('should render a component that passes accessibility test', async () => {
await expect(el).to.be.accessible();
});
// it('should render the child content provided', async () => {
// expect(el.innerText).to.eq('Badge');
// });
// it('should default to square styling, with the primary color', async () => {
// const part = el.shadowRoot?.querySelector('[part="base"]') as HTMLElement;
// expect(part.classList.value).to.eq('badge badge--primary');
// });
});
});