android-media-controller icon indicating copy to clipboard operation
android-media-controller copied to clipboard

Bug: Can not give a query to "Play From Search Test"

Open avalanchas opened this issue 3 years ago • 1 comments

Description

In the class TestDescriptor the playFromSearch in line 39 sets queryRequired to false. Therefore, the query is never shown in the configuration dialog, the dialog only adds EditText fields for tests with this field set to true

How to reproduce

  • Install current version of the Media Controller Tester app
  • Test any app that declares "PLAY_FROM_SEARCH" support
  • Go to test suites, run either basic tests or auto tests -> "Play from Search Test" fails (if the app doesn't play anything from an empty search query

Expected behaviour

The test result card says

Enter the search query in the query field

So that's what I would expect, to be able to enter that. Furthermore, one might argue that an app should get a passing grade when the search query is empty and the player ends up in either the starting state or any other state than "error"

Devices, OS

All

avalanchas avatar Aug 15 '22 13:08 avalanchas

I tripped over this as well. I imagine this query wasn't marked "required" since apps should also respond safely to empty search queries, but in this setup I think the suite can never pass. Maybe we could have one test for PLAY_FROM_SEARCH that has queryRequired = true and another with false? I'm happy to attempt a PR if maintainers are open to this approach.

benlaverriere avatar Oct 21 '22 15:10 benlaverriere