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

- Closes: #2122
This commit is contained in:
Dermot Duffy
2025-09-01 13:29:04 -07:00
committed by GitHub
parent 2dd7f328f6
commit 79c27c43b8
7 changed files with 130 additions and 47 deletions
+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', () => {