-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add audio input and audio output widgets (#47) #48
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
Open
claude
wants to merge
8
commits into
main
Choose a base branch
from
claude/add-audio-in-out-widgets
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8ec8a0e
feat: add audio input and audio output widgets (#47)
github-actions[bot] b6ffc80
fix: sort AudioInput/OutputWidget exports after Arm in index.ts
github-actions[bot] c1a58eb
add audio i/o to widgets
DTCurrie 9d47e23
Merge branch 'claude/add-audio-in-out-widgets' of https://github.com/…
DTCurrie 89f8bb0
lint
DTCurrie b25441d
pr comments
DTCurrie 0f5d864
cleanup
DTCurrie 838215d
Merge branch 'main' of https://github.com/viamrobotics/test-widgets i…
DTCurrie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@viamrobotics/test-widgets': minor | ||
| --- | ||
|
|
||
| Add `AudioInputWidget` and `AudioOutputWidget` components for audio in/out resources |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/lib/components/widgets/audio-input/__tests__/properties.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import type { ComponentProps } from 'svelte' | ||
|
|
||
| import { render, screen } from '@testing-library/svelte' | ||
| import { describe, expect, it } from 'vitest' | ||
|
|
||
| import Subject from '../properties.svelte' | ||
|
|
||
| const renderSubject = (props: Partial<ComponentProps<typeof Subject>> = {}) => | ||
| render(Subject, { | ||
| supportedCodecs: [], | ||
| sampleRateHz: 0, | ||
| numChannels: 0, | ||
| ...props, | ||
| }) | ||
|
|
||
| describe('AudioInput Properties', () => { | ||
| it('displays supported codecs', () => { | ||
| renderSubject({ supportedCodecs: ['mp3', 'pcm16'] }) | ||
| expect(screen.getByText('mp3, pcm16')).toBeInTheDocument() | ||
| }) | ||
|
|
||
| it('displays None when no codecs are supported', () => { | ||
| renderSubject({ supportedCodecs: [] }) | ||
| expect(screen.getByText('None')).toBeInTheDocument() | ||
| }) | ||
|
|
||
| it('displays sample rate', () => { | ||
| renderSubject({ sampleRateHz: 48000 }) | ||
| expect(screen.getByText('48000 Hz')).toBeInTheDocument() | ||
| }) | ||
|
|
||
| it('displays number of channels', () => { | ||
| renderSubject({ numChannels: 2 }) | ||
| expect(screen.getByText('2')).toBeInTheDocument() | ||
| }) | ||
| }) | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.