Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a69759a authored by David Tseng's avatar David Tseng
Browse files

Fix and improve RequestFocusTest

RequestFocusTest used the deprecated ActivityInstrumentationTestCase2
and associated support. It also uses the @UiThreadTest annotation which
is only supported in junit4 leading to half of the suite failing with
exceptions due to calls on a non-main thread.

This change:
- migrates to junit4
- uses modern constructs like ActivityScenarioRule
- moves UI thread dependent logic to ActivityScenarioRule.onActivity
- resolves new base assumption of default touch mode by adding logic to force non-touch by sending a key event
- rebaselines behaviors e.g. global focus change is no longer called
- motivates more tests for keyboard + focus
- will be used to also adapt this suite for system + a11y focus testing

Bug: 393668723
Test: atest RequestFocusTest
Change-Id: Ifcdb1c5a5bb7508ed94ee4799f1412d13bab6086
parent 69565e5b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment