Skip to content
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

Changing Android emulator skin to pixel_7_pro breaks scroll tests #2251

Open
mhsmith opened this issue Nov 29, 2023 · 2 comments
Open

Changing Android emulator skin to pixel_7_pro breaks scroll tests #2251

mhsmith opened this issue Nov 29, 2023 · 2 comments
Labels
android The issue relates to Android mobile support. bug A crash or error in behavior. good first issue Is this your first time contributing? This could be a good place to start!

Comments

@mhsmith
Copy link
Member

mhsmith commented Nov 29, 2023

Originally posted by @rmartin16 in #2249 (comment)


I/python.stdout: =================================== FAILURES ===================================
I/python.stdout: _________________________________ test_scroll __________________________________
I/python.stdout: Traceback (most recent call last):
I/python.stdout:   File "/data/data/org.beeware.toga.testbed/files/chaquopy/AssetFinder/app/tests/widgets/test_detailedlist.py", line 107, in test_scroll
I/python.stdout:     assert probe.scroll_position == pytest.approx(
I/python.stdout: AssertionError: assert 4000.0 == 3469.5238095238096 ± 4.0e+02
I/python.stdout:   comparison failed
I/python.stdout:   Obtained: 4000.0
I/python.stdout:   Expected: 3469.5238095238096 ± 4.0e+02
I/python.stdout: _________________________________ test_scroll __________________________________
I/python.stdout: Traceback (most recent call last):
I/python.stdout:   File "/data/data/org.beeware.toga.testbed/files/chaquopy/AssetFinder/app/tests/widgets/test_table.py", line 126, in test_scroll
I/python.stdout:     assert probe.max_scroll_position > probe.height * 2
I/python.stdout: AssertionError: assert 1286.095238095238 > (1061 * 2)
I/python.stdout:  +  where 1286.095238095238 = <tests_backend.widgets.table.TableProbe object at 0x70811b283d60>.max_scroll_position
I/python.stdout:  +  and   1061 = <tests_backend.widgets.table.TableProbe object at 0x70811b283d60>.height
I/python.stdout: =========================== short test summary info ============================
I/python.stdout: FAILED tests/widgets/test_detailedlist.py::test_scroll - assert 4000.0 == 346...
I/python.stdout: FAILED tests/widgets/test_table.py::test_scroll - assert 1286.095238095238 > ...
I/python.stdout: ====== 2 failed, 328 passed, 61 skipped, 25 xfailed in 195.32s (0:03:15) =======

I was able to resolve the testbed failures by having the AVD use pixel_3a skin again.

@mhsmith mhsmith added bug A crash or error in behavior. android The issue relates to Android mobile support. labels Nov 29, 2023
@freakboy3742
Copy link
Member

We likely need to address this before we release a new version of Briefcase, because we don't have any way to (easily) create a pixel3a device as an end user.

For someone wanting to address this - I believe the two issues are related to the size of the device window.

@freakboy3742 freakboy3742 added the good first issue Is this your first time contributing? This could be a good place to start! label Nov 30, 2023
@mhsmith
Copy link
Member Author

mhsmith commented Nov 30, 2023

If so, the tests should be updated so they'll work on any reasonably-sized screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android The issue relates to Android mobile support. bug A crash or error in behavior. good first issue Is this your first time contributing? This could be a good place to start!
Projects
None yet
Development

No branches or pull requests

2 participants