Skip to content

Commit

Permalink
test: start the breadcrumb test.
Browse files Browse the repository at this point in the history
  • Loading branch information
christoshrousis committed Sep 25, 2021
1 parent 1a08f06 commit 86e06ce
Showing 1 changed file with 30 additions and 4 deletions.
34 changes: 30 additions & 4 deletions src/components/breadcrumb/breadcrumb.test.ts
Original file line number Diff line number Diff line change
@@ -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');
// });
});
});

0 comments on commit 86e06ce

Please sign in to comment.