Merge pull request #3824 from kchadha/day-of-week-label-fix
Fix monitor label for day of week block.
This commit is contained in:
2 files changed
+17
-2
No files matched your search
@@ -89,8 +89,8 @@ const messages = defineMessages({
|
||||
id: 'gui.opcodeLabels.date'
|
||||
},
|
||||
sensing_current_dayofweek: {
|
||||
defaultMessage: 'dayofweek',
|
||||
description: 'Label for the current dayofweek monitor when shown on the stage',
|
||||
defaultMessage: 'day of week',
|
||||
description: 'Label for the current day of week monitor when shown on the stage',
|
||||
id: 'gui.opcodeLabels.dayofweek'
|
||||
},
|
||||
sensing_current_hour: {
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import opcodeLabels from '../../../src/lib/opcode-labels';
|
||||
|
||||
describe('Opcode Labels', () => {
|
||||
test('day of week label', () => {
|
||||
const labelFun = opcodeLabels.getLabel('sensing_current').labelFn;
|
||||
expect(labelFun({CURRENTMENU: 'dayofweek'})).toBe('day of week');
|
||||
expect(labelFun({CURRENTMENU: 'DAYOFWEEK'})).toBe('day of week');
|
||||
});
|
||||
|
||||
test('unspecified opcodes default to extension category and opcode as label', () => {
|
||||
const labelInfo = opcodeLabels.getLabel('music_getTempo');
|
||||
expect(labelInfo.label).toBe('music_getTempo');
|
||||
expect(labelInfo.category).toBe('extension');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user