feat: added region color customization feature

This commit is contained in:
Xiaohan-Tian
2026-07-01 22:31:35 -07:00
parent e626e1fc76
commit 4f11fe8e25
31 changed files with 700 additions and 31 deletions
@@ -84,4 +84,27 @@ describe('UpdateTrackCommand', () => {
expect(mockAudioInterface.setTrackSolo).not.toHaveBeenCalled();
expect(command.getChangedProperties()).toEqual(new Set());
});
it('updates color and restores it on undo', () => {
const command = new UpdateTrackCommand(1, { color: '#3C8AC4' });
command.execute();
expect(track.getColor()).toBe('#3C8AC4');
expect(command.getChangedProperties()).toEqual(new Set(['color']));
command.undo();
expect(track.getColor()).toBeUndefined();
});
it('clears an existing color override', () => {
track.setColor('#B43F1D');
const command = new UpdateTrackCommand(1, { color: null });
command.execute();
expect(track.getColor()).toBeUndefined();
expect(command.getChangedProperties()).toEqual(new Set(['color']));
});
});