-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update VideoAudioTest to auto-delete saved videos #267
base: main
Are you sure you want to change the base?
Conversation
When running JCA without an explicit intent mode, the files are saved to MediaStore. This installs a watch on the MediaStore to delete any files that are created during tests.
Video capture seems to be saving a 3gp file without the filename specified. Remove the "JCA" prefix check for now in order to ensure this file gets deleted in tests.
…es when test succeeds
Adds test tag to CaptureModeToggleButton Adds state descriptions to ToggleButton Removes unnecessary coroutine scope from ToggleButton
Adds tests to ensure Concurrent Camera can be enabled without crashing the app, and appropriate features are disabled when concurrent camera mode is enabled. Also ensures that recordings can be made in concurrent camera mode.
This will run VideoAudioTest with `runMediaStoreAutoDeleteScenarioTest` to ensure that any recorded videos are deleted when the test finishes. It also changes the way we detect the hot mic. Instead of changing the test tag, we change the semantic state description when the mic indicates we're recording audio. This allows ComposeTest to wait for this state where before it was unable to detect test tag changes. We also will no longer use longClick since it does not seem to work well on emulators. We implicitly send the down and up events instead. This seems to allow us to run this test on emulators.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me!
I think when I first read about adjusting semantics properties, I had confused contentDescription
with stateDescription
. So I opted to change testTags instead because I did not want to change the accessibility descriptions.
I wonder what other tests may be better off using stateDescription
instead of changing testTags
instead.
) { | ||
// check audio visualizer composable for muted/unmuted icon. | ||
// icon will only be unmuted if audio is nonzero | ||
with(composeTestRule) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is with(...)
doing differently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with(...)
turns the argument into a receiver. That is, it makes "composeTestRule" part of the context of the lambda that runs. It means we don't need to write composeTestRule
before each of the commands.
In this case it's making the code less verbose (at the expense of an increase in indentation).
This will run VideoAudioTest with
runMediaStoreAutoDeleteScenarioTest
to ensure thatany recorded videos are deleted when the test finishes.
It also changes the way we detect the hot mic. Instead of
changing the test tag, we change the semantic state
description when the mic indicates we're recording audio.
This allows ComposeTest to wait for this state where
before it was unable to detect test tag changes.
We also will no longer use longClick since it does not
seem to work well on emulators. We implicitly send the
down and up events instead. This seems to allow us to
run this test on emulators.