Skip to content

Commit

Permalink
test: fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideMininni-Fincons committed May 24, 2024
1 parent 991f264 commit 38331cd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ snapshots["sbb-file-selector renders default"] =
`;
/* end snapshot sbb-file-selector renders default */

snapshots["sbb-file-selector renders with dropzone area"] =
snapshots["sbb-file-selector renders with dropzone area and size s"] =
`<div class="sbb-file-selector">
<div class="sbb-file-selector__input-container">
<label>
Expand All @@ -43,7 +43,7 @@ snapshots["sbb-file-selector renders with dropzone area"] =
<sbb-icon
aria-hidden="true"
data-namespace="default"
name="folder-open-medium"
name="folder-open-small"
role="img"
>
</sbb-icon>
Expand All @@ -59,7 +59,7 @@ snapshots["sbb-file-selector renders with dropzone area"] =
data-sbb-button=""
data-slot-names="unnamed"
dir="ltr"
size="m"
size="s"
>
Choose a file
</sbb-secondary-button-static>
Expand All @@ -82,7 +82,7 @@ snapshots["sbb-file-selector renders with dropzone area"] =
</div>
</div>
`;
/* end snapshot sbb-file-selector renders with dropzone area */
/* end snapshot sbb-file-selector renders with dropzone area and size s */

snapshots["sbb-file-selector A11y tree Chrome"] =
`<p>
Expand Down
10 changes: 6 additions & 4 deletions src/components/file-selector/file-selector.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@ describe(`sbb-file-selector`, () => {
const root = await fixture(html`<sbb-file-selector></sbb-file-selector>`);

expect(root).dom.to.be.equal(`
<sbb-file-selector>
<sbb-file-selector size='m'>
</sbb-file-selector>
`);
await expect(root).shadowDom.to.be.equalSnapshot();
});

it('renders with dropzone area', async () => {
const root = await fixture(html`<sbb-file-selector variant="dropzone"></sbb-file-selector>`);
it('renders with dropzone area and size s', async () => {
const root = await fixture(
html`<sbb-file-selector variant="dropzone" size="s"></sbb-file-selector>`,
);

await waitForLitRender(root);

expect(root).dom.to.be.equal(`
<sbb-file-selector variant='dropzone'>
<sbb-file-selector variant='dropzone' size='s'>
</sbb-file-selector>
`);
await expect(root).shadowDom.to.be.equalSnapshot();
Expand Down

0 comments on commit 38331cd

Please sign in to comment.