Simplify flicker assertions
1. Generalize assertions: Some older flicker assertions were very specific, e.g., `appLayerReplacesWallpaper` or `navBarWindowIsVisible`. Instead of having many highly specialized assertions, generalize them. E.g., instead of `appLayerReplacesWallpaper` use `replacesVisibleLayer(oldLayer, newLayer)` and `navBarWindowIsVisible` use `aboveAppWindowVisible(windowName)` 2. Unify on ComponentName Some assertions used String arguments, and others ComponentName, now all assertions receive ComponentName 3. Remove old code When integrating CTS waitFor functionality into flicke,r several new methods were added for future compatibility. Since CTS will continue to use their own parse mechanism in the near future, remove those unnecessary methods to simplify the flicker codebase 4. Introduce optional assertions Some behaviors may or may not occur, and the tests are not able to determine it a priori (e.g., if a Splash screen or Snapshot layer will appear or not) to work in these scenarios, support optional assertions, which may pass or fail, but change the sequence of events when analysing traces Test: atest FlickerLibTest FlickerTests WMShellFlickerTests Bug: 167521849 Change-Id: I332230ca1c1bfdf6b4ba4280c9d70c375e6ff442
Loading
Please register or sign in to comment