fix: Don't incorrectly change camera when a dependency supports media (#2171)
- Closes: #2122
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user