fix: Use HA style and coloring for all icons (#1790)

This commit is contained in:
Dermot Duffy
2024-12-23 15:22:27 -08:00
committed by GitHub
parent a9e5889ca7
commit 9d812af9f4
68 changed files with 557 additions and 1366 deletions
@@ -206,7 +206,11 @@ describe('GenericCameraManagerEngine', () => {
expect(
createEngine().getCameraMetadata(createHASS(), createGenericCameraConfig()),
).toEqual({
icon: 'mdi:video',
icon: {
entity: undefined,
icon: undefined,
fallback: 'mdi:video',
},
title: '',
});
});
@@ -217,10 +221,11 @@ describe('GenericCameraManagerEngine', () => {
createHASS(),
createGenericCameraConfig({ id: 'https://go2rtc#stream' }),
),
).toEqual({
icon: 'mdi:video',
title: 'https://go2rtc#stream',
});
).toEqual(
expect.objectContaining({
title: 'https://go2rtc#stream',
}),
);
});
it('with configured title', async () => {
@@ -231,10 +236,11 @@ describe('GenericCameraManagerEngine', () => {
title: 'My Camera',
}),
),
).toEqual({
icon: 'mdi:video',
title: 'My Camera',
});
).toEqual(
expect.objectContaining({
title: 'My Camera',
}),
);
});
describe('with entity title', () => {
@@ -250,10 +256,11 @@ describe('GenericCameraManagerEngine', () => {
camera_entity: 'camera.test',
}),
),
).toEqual({
icon: 'mdi:video',
title: 'My Entity Camera',
});
).toEqual(
expect.objectContaining({
title: 'My Entity Camera',
}),
);
});
it('webrtc_card.entity', async () => {
@@ -270,10 +277,11 @@ describe('GenericCameraManagerEngine', () => {
},
}),
),
).toEqual({
icon: 'mdi:video',
title: 'My Entity Camera',
});
).toEqual(
expect.objectContaining({
title: 'My Entity Camera',
}),
);
});
});
});