Merge pull request #3824 from kchadha/day-of-week-label-fix

Fix monitor label for day of week block.
This commit is contained in:
Karishma Chadha authored and GitHub committed 2018-11-20 00:20:19 -05:00
commit 7acaf1cb06
2 files changed
+17 -2

No files matched your search

+2 -2
View File
@@ -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: {
+15
View File
@@ -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');
});
});