Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spectrogram tests #28

Merged
merged 1 commit into from
Apr 5, 2024
Merged

Spectrogram tests #28

merged 1 commit into from
Apr 5, 2024

Conversation

hudson-newey
Copy link
Member

@hudson-newey hudson-newey commented Apr 5, 2024

  • Adds spectrogram tests & fixtures
  • Gets functionality working for the test/helper functions (these functions still have sub-optimal TS typing)
  • Duck types the spectrogram component with the same events, properties, and attributes as the HTMLAudioElement (this allows oe-media-controls to access both elements through the same APIs and event bindings)
    • Changes the name of the playing property to paused
    • Changes the name of the playing event to play

I've done this to duck type the spectrogram component with HTMLAudioElement events, properties and attributes. This allows oe-media-controls to control spectrogram components and HTMLAudioElement's through the same API's and events

Added tests

  • mount tests that assert the correct events are emitted when play() and pause() are called
  • tests to check that a <source> element can be used as a media source in the spectrogram components default <slot>
  • test to check that oe-media-controls can correctly mount/unmount and re-mount to spectrograms correctly
  • Remove the oe-media-controls unit test example that is no longer needed (we originally created this as a proof of concept on how to test capturing events. Additionally, playing state is now handled by the oe-spectrogram component) this test is no longer needed as we have a practical example of testing captured events in the oe-spectrogram component

Copy link

github-actions bot commented Apr 5, 2024

@hudson-newey hudson-newey changed the title [DRAFT] Spectrogram tests Spectrogram tests Apr 5, 2024
@atruskie
Copy link
Contributor

atruskie commented Apr 5, 2024

I have purposely not used conventional commits so that the package version isn't bumped and a release isn't created for these WIP components.

You should be even now. The whole history should be conventional, that's the point. We should disable the publish step instead.

@hudson-newey hudson-newey force-pushed the spectrogram-tests branch 4 times, most recently from 05c55da to 5e5b3ce Compare April 5, 2024 06:52
@hudson-newey hudson-newey merged commit 8790a36 into main Apr 5, 2024
4 checks passed
@hudson-newey hudson-newey deleted the spectrogram-tests branch August 20, 2024 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants