mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
test: start the breadcrumb test.
This commit is contained in:
@@ -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 & 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');
|
||||
// });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user