Skip to content

Commit

Permalink
fix(ignore): Fix color_temp_percent test
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Nov 16, 2023
1 parent 746066c commit 01d32cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/publish.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ describe('Publish', () => {
it('Should publish messages to zigbee devices with color_temp in %', async () => {
const device = zigbeeHerdsman.devices.bulb_color;
const endpoint = device.getEndpoint(1);
await MQTT.events.message('zigbee2mqtt/bulb_color/set', stringify({color_temp_percent: '100'}));
await MQTT.events.message('zigbee2mqtt/bulb_color/set', stringify({color_temp_percent: 100}));
await flushPromises();
expect(endpoint.command).toHaveBeenCalledTimes(1);
expect(endpoint.command).toHaveBeenCalledWith("lightingColorCtrl", "moveToColorTemp", {colortemp: 500, transtime: 0}, {});
Expand Down Expand Up @@ -1407,7 +1407,7 @@ describe('Publish', () => {
expect(MQTT.publish.mock.calls[3]).toEqual([ 'zigbee2mqtt/bulb_color', stringify({"state":"ON","brightness":150}), { qos: 0, retain: false }, expect.any(Function)]);
});

it('Scenes', async () => {
it('onlythis Scenes', async () => {
const bulb_color_2 = zigbeeHerdsman.devices.bulb_color_2.getEndpoint(1);
const bulb_2 = zigbeeHerdsman.devices.bulb_2.getEndpoint(1);
const group = zigbeeHerdsman.groups.group_tradfri_remote;
Expand All @@ -1432,6 +1432,7 @@ describe('Publish', () => {
await flushPromises();
expect(group.command).toHaveBeenCalledTimes(1);
expect(group.command).toHaveBeenCalledWith('genScenes', 'recall', { groupid: 15071, sceneid: 1 }, {});
console.log(logger.error.mock.calls);
expect(MQTT.publish).toHaveBeenCalledTimes(8);
expect(MQTT.publish).toHaveBeenNthCalledWith(1,
'zigbee2mqtt/group_tradfri_remote',
Expand Down

0 comments on commit 01d32cb

Please sign in to comment.