Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: add Camera pause test
  • Loading branch information
bselwe committed Aug 13, 2021
commit 383373dbe24d7bf4a94810dd9106c57aacc2b21e
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,24 @@ void main() {
});
});

group('pause', () {
testWidgets('pauses the camera stream', (tester) async {
final camera = Camera(
textureId: textureId,
cameraService: cameraService,
);

await camera.initialize();
await camera.play();

expect(camera.videoElement.paused, isFalse);

camera.pause();

expect(camera.videoElement.paused, isTrue);
});
});

group('stop', () {
testWidgets('resets the camera stream', (tester) async {
final camera = Camera(
Expand Down