generated from custom-cards/boilerplate-card
-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c68b30
commit b6e6b04
Showing
12 changed files
with
62 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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 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,11 @@ | ||
import { | ||
CONF_DIMENSIONS_ASPECT_RATIO, | ||
CONF_LIVE_AUTO_UNMUTE, | ||
CONF_MENU_STYLE, | ||
} from '../../const.js'; | ||
|
||
export const CASTING_PROFILE = { | ||
[CONF_MENU_STYLE]: 'none' as const, | ||
[CONF_LIVE_AUTO_UNMUTE]: ['selected', 'visible'], | ||
[CONF_DIMENSIONS_ASPECT_RATIO]: '16:9', | ||
}; |
This file contains 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 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 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 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 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 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 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 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 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 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,24 @@ | ||
import { expect, it } from 'vitest'; | ||
import { setProfiles } from '../../../src/config/profiles'; | ||
import { frigateCardConfigSchema } from '../../../src/config/types'; | ||
import { createRawConfig } from '../../test-utils'; | ||
import { CASTING_PROFILE } from '../../../src/config/profiles/casting'; | ||
|
||
it('should contain expected defaults', () => { | ||
expect(CASTING_PROFILE).toEqual({ | ||
'dimensions.aspect_ratio': '16:9', | ||
'live.auto_unmute': ['selected', 'visible'], | ||
'menu.style': 'none', | ||
}); | ||
}); | ||
|
||
it('should be parseable after application', () => { | ||
const rawInputConfig = createRawConfig(); | ||
const parsedConfig = frigateCardConfigSchema.parse(rawInputConfig); | ||
|
||
setProfiles(rawInputConfig, parsedConfig, ['casting']); | ||
|
||
// Reparse the config to ensure the profile did not introduce errors. | ||
const parseResult = frigateCardConfigSchema.safeParse(parsedConfig); | ||
expect(parseResult.success, parseResult.error?.toString()).toBeTruthy(); | ||
}); |