Merge remote-tracking branch 'origin/feature/review-workflow-1-normalize-color' into feature/review-workflow-1-normalize-color

This commit is contained in:
Marc-Roig 2023-05-02 11:14:21 +02:00
commit 94524dcbd1
No known key found for this signature in database
GPG Key ID: FB4E2C43A0BEE249
3 changed files with 5 additions and 3 deletions

View File

@ -172,7 +172,9 @@ export function Stage({
), ),
color: hex, color: hex,
})); }));
const colorValue = colorOptions.find(({ value }) => value === colorField.value.toLowerCase()); // TODO: the .toUpperCase() conversion can be removed once the hex code is normalized in
// the admin API
const colorValue = colorOptions.find(({ value }) => value === colorField.value.toUpperCase());
return ( return (
<Box ref={composedRef}> <Box ref={composedRef}>

View File

@ -27,7 +27,7 @@ export function getStageColorByHex(hex) {
export function getAvailableStageColors() { export function getAvailableStageColors() {
return Object.entries(STAGE_COLORS).map(([themeColorName, name]) => ({ return Object.entries(STAGE_COLORS).map(([themeColorName, name]) => ({
hex: lightTheme.colors[themeColorName].toLowerCase(), hex: lightTheme.colors[themeColorName].toUpperCase(),
name, name,
})); }));
} }

View File

@ -12,7 +12,7 @@ describe('Settings | Review Workflows | colors', () => {
name: expect.any(String), name: expect.any(String),
}); });
expect(color.hex).toBe(color.hex.toLowerCase()); expect(color.hex).toBe(color.hex.toUpperCase());
}); });
}); });