Skip to content

Commit

Permalink
chore: update failing tests (#1592)
Browse files Browse the repository at this point in the history
<!-- ## Title: Please consider adding the [skip chromatic] flag to the
PR title in case you dont need chromatic testing your changes. -->
## Description:
This PR address two failing tests in the audio component

## Definition of Reviewable:
<!-- *PR notes: Irrelevant elements should be removed.* -->
- [ ] Documentation is created/updated
- [ ] Migration Guide is created/updated
- [ ] E2E tests (features, a11y, bug fixes) are created/updated
<!-- *If this PR includes a bug fix, an E2E test is necessary to verify
the change. If the fix is purely visual, ensuring it is captured within
our chromatic screenshot tests is sufficient.* -->
- [ ] Stories (features, a11y) are created/updated
- [ ] relevant tickets are linked
  • Loading branch information
smfonseca authored Oct 30, 2024
1 parent b416555 commit d27309b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/components/src/components/audio/audio.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect, fixture, html } from '@open-wc/testing';
import base64Audio from './base64Audio';
import sinon from 'sinon';
import type SdAudio from './audio';

Expand All @@ -12,7 +13,7 @@ describe('<sd-audio>', () => {
it('should emit sd-playback-start event when play buttons is clicked', async () => {
const el = await fixture<SdAudio>(html`
<sd-audio>
<audio slot="default" src="test-audio.mp3"></audio>
<audio src="${base64Audio}"></audio>
</sd-audio>
`);

Expand All @@ -30,7 +31,7 @@ describe('<sd-audio>', () => {
it('should emit sd-playback-mute event when mute button is clicked', async () => {
const el = await fixture<SdAudio>(html`
<sd-audio>
<audio slot="default" src="test-audio.mp3"></audio>
<audio src="${base64Audio}"></audio>
</sd-audio>
`);

Expand All @@ -48,7 +49,7 @@ describe('<sd-audio>', () => {
it('should hide the timestamps when the attribute is set', async () => {
const el = await fixture<SdAudio>(html`
<sd-audio hide-timestamps>
<audio slot="default" src="test-audio.mp3"></audio>
<audio src="${base64Audio}"></audio>
</sd-audio>
`);

Expand All @@ -60,7 +61,7 @@ describe('<sd-audio>', () => {
it('should render the canvas when the animated attribute is set', async () => {
const el = await fixture<SdAudio>(html`
<sd-audio animated>
<audio slot="default" src="test-audio.mp3"></audio>
<audio src="${base64Audio}"></audio>
</sd-audio>
`);

Expand All @@ -72,7 +73,7 @@ describe('<sd-audio>', () => {
it('should emit sd-transcript-click event when transcript button is clicked', async () => {
const el = await fixture<SdAudio>(html`
<sd-audio>
<audio src="test-audio.mp3"></audio>
<audio src="${base64Audio}"></audio>
<div slot="transcript">Transcript</div>
</sd-audio>
`);
Expand Down
Loading

0 comments on commit d27309b

Please sign in to comment.