fix: Don't incorrectly change camera when a dependency supports media (#2171)

- Closes: #2122
This commit is contained in:
Dermot Duffy authored and GitHub committed 2025-09-01 13:29:04 -07:00
1 parent 2dd7f328f6
commit 79c27c43b8
7 files changed
+130 -47

No files matched your search

+31
View File
@@ -297,6 +297,37 @@ describe('CameraManagerStore', async () => {
);
expect(store.getAllDependentCameras('one', 'clips')).toEqual(new Set(['two']));
});
it('should return cameras with specific capabilities inclusive of parent', () => {
const store = new CameraManagerStore();
store.addCamera(
new Camera(
createCameraConfig({
id: 'one',
dependencies: {
all_cameras: true,
},
}),
engineGeneric,
),
);
store.addCamera(
new Camera(
createCameraConfig({
id: 'two',
}),
engineGeneric,
{
capabilities: new Capabilities({
clips: true,
}),
},
),
);
expect(store.getAllDependentCameras('one', 'clips', { inclusive: true })).toEqual(
new Set(['one', 'two']),
);
});
});
it('getCameraIDsWithCapability', () => {