Broken view tests
When running the tests, most works, but some views are broken in the tests:
PORTRAIT - ANIMATIONS DISABLED
> Task :app:connectedDebugAndroidTest
org.torproject.vpn.ui.home.ConnectFragmentTest > test02InitialState[Pixel 6a - 14] FAILED
androidx.test.espresso.base.AssertionErrorHandler$AssertionFailedWithCauseError: '(view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() covers at least <100> percent of the view's area)' doesn't match the selected view.
Expected: (view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() covers at least <100> percent of the view's area)
org.torproject.vpn.ui.home.ConnectFragmentTest > test04ClickConnectionCardAndBack[Pixel 6a - 14] FAILED
androidx.test.espresso.PerformException: Error performing 'single click' on view 'view.getId() is <2131296402/org.torproject.vpn:id/cl_connection_card>'.
at androidx.test.espresso.PerformException$Builder.build(PerformException.java:1)
org.torproject.vpn.ui.home.ConnectFragmentTest > test10CountrySelectionGeoIP[Pixel 6a - 14] FAILED
junit.framework.ComparisonFailure: expected geoIP location is USA expected:<[United States]> but was:<[Germany]>
at junit.framework.Assert.assertEquals(Assert.java:85)
org.torproject.vpn.ui.approuting.AppRoutingFragmentTest > testChangeIPsGlobally[Pixel 6a - 14] FAILED
androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: view.getContentDescription() to match resource id <2131886121>[action_refresh_circuits] with value "Refresh circuits"
org.torproject.vpn.ui.help.HelpFragmentTest > testHelpNavigationReportBug[Pixel 6a - 14] FAILED
androidx.test.espresso.base.AssertionErrorHandler$AssertionFailedWithCauseError: '(view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() covers at least <100> percent of the view's area)' doesn't match the selected view.
Expected: (view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() covers at least <100> percent of the view's area)
org.torproject.vpn.ui.help.HelpFragmentTest > testHelpNavigationReportBugForum[Pixel 6a - 14] FAILED
androidx.test.espresso.base.AssertionErrorHandler$AssertionFailedWithCauseError: '(view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() covers at least <100> percent of the view's area)' doesn't match the selected view.
Expected: (view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() covers at least <100> percent of the view's area)
org.torproject.vpn.ui.help.HelpFragmentTest > testHelpNavigationReportBugGitlab[Pixel 6a - 14] FAILED
androidx.test.espresso.base.AssertionErrorHandler$AssertionFailedWithCauseError: '(view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() covers at least <100> percent of the view's area)' doesn't match the selected view.
Expected: (view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() covers at least <100> percent of the view's area)
org.torproject.vpn.ui.help.HelpFragmentTest > testHelpNavigationContactReport[Pixel 6a - 14] FAILED
androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: view.getId() is <2131296403/org.torproject.vpn:id/cl_contact_support_container>
org.torproject.vpn.ui.approuting.AppRoutingFragmentTest > testChangeIPsGlobally[Pixel 6a - 14] FAILED
androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: view.getContentDescription() to match resource id <2131886121>[action_refresh_circuits] with value "Refresh circuits"
org.torproject.vpn.ui.help.HelpFragmentTest > testHelpNavigationReportBug[Pixel 6a - 14] FAILED
androidx.test.espresso.base.AssertionErrorHandler$AssertionFailedWithCauseError: '(view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() covers at least <100> percent of the view's area)' doesn't match the selected view.
Expected: (view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() covers at least <100> percent of the view's area)
org.torproject.vpn.ui.help.HelpFragmentTest > testHelpNavigationReportBugForum[Pixel 6a - 14] FAILED
androidx.test.espresso.base.AssertionErrorHandler$AssertionFailedWithCauseError: '(view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() covers at least <100> percent of the view's area)' doesn't match the selected view.
Expected: (view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() covers at least <100> percent of the view's area)
org.torproject.vpn.ui.help.HelpFragmentTest > testHelpNavigationReportBugGitlab[Pixel 6a - 14] FAILED
androidx.test.espresso.base.AssertionErrorHandler$AssertionFailedWithCauseError: '(view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() covers at least <100> percent of the view's area)' doesn't match the selected view.
Expected: (view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() covers at least <100> percent of the view's area)
org.torproject.vpn.ui.help.HelpFragmentTest > testHelpNavigationContactReport[Pixel 6a - 14] FAILED
androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: view.getId() is <2131296403/org.torproject.vpn:id/cl_contact_support_container>
org.torproject.vpn.ui.home.ConnectFragmentTest > test02InitialState[Pixel 6a - 14] FAILED
androidx.test.espresso.base.AssertionErrorHandler$AssertionFailedWithCauseError: '(view is an instance of android.view.ViewGroup and has descendant matching an instance of android.widget.TextView and view.getText() equals string from resource id: <2131886131>)' doesn't match the selected view.
Expected: (view is an instance of android.view.ViewGroup and has descendant matching an instance of android.widget.TextView and view.getText() equals string from resource id: <2131886131> [app_name] value: Tor VPN)
org.torproject.vpn.ui.home.ConnectFragmentTest > test03ClickAppsCardAndBack[Pixel 6a - 14] FAILED
androidx.test.espresso.PerformException: Error performing 'single click' on view 'view.getId() is <2131296400/org.torproject.vpn:id/cl_apps_card>'.
at androidx.test.espresso.PerformException$Builder.build(PerformException.java:1)
org.torproject.vpn.ui.home.ConnectFragmentTest > test04ClickConnectionCardAndBack[Pixel 6a - 14] FAILED
androidx.test.espresso.PerformException: Error performing 'single click' on view 'view.getId() is <2131296402/org.torproject.vpn:id/cl_connection_card>'.
at androidx.test.espresso.PerformException$Builder.build(PerformException.java:1)
org.torproject.vpn.ui.home.ConnectFragmentTest > test05Connect[Pixel 6a - 14] FAILED
androidx.test.espresso.base.AssertionErrorHandler$AssertionFailedWithCauseError: '(view is an instance of android.view.ViewGroup and has descendant matching an instance of android.widget.TextView and view.getText() equals string from resource id: <2131886443>)' doesn't match the selected view.
Expected: (view is an instance of android.view.ViewGroup and has descendant matching an instance of android.widget.TextView and view.getText() equals string from resource id: <2131886443> [state_connecting] value: Connecting…)
org.torproject.vpn.ui.home.ConnectFragmentTest > test10CountrySelectionGeoIP[Pixel 6a - 14] FAILED
junit.framework.ComparisonFailure: expected geoIP location is USA expected:<[United States]> but was:<[Germany]>
at junit.framework.Assert.assertEquals(Assert.java:85)
Tests on Pixel 6a - 14 failed: There was 18 failure(s).
> Task :app:connectedDebugAndroidTest FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:connectedDebugAndroidTest'.
> There were failing tests. See the report at: file:///home/kwadronaut/Android/torvpn-24-4-15/app/build/reports/androidTests/connected/debug/index.html
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Edited by kwadronaut