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

Sync Report screen with wrong data when come back from the background - FIXED #272

Conversation

juanky201271
Copy link
Contributor

Finally I did catch this issue. Now when you come back from background to foreground if you was in the report screen, when the server start the sync again, you can see the correct info.

@Oscar-Pepper if you can test it in your local would be fantastic, since you are who reported it.

@juanky201271 juanky201271 force-pushed the dev_background_to_foreground_report_screen_blocks_fixed branch from 3e66b32 to 126ab6f Compare April 4, 2023 17:45
@juanky201271 juanky201271 assigned fluidvanadium and unassigned zancas Apr 4, 2023
@juanky201271 juanky201271 force-pushed the dev_background_to_foreground_report_screen_blocks_fixed branch from 126ab6f to d3a1ca5 Compare April 5, 2023 02:30
@juanky201271
Copy link
Contributor Author

@zancas @fluidvanadium @Oscar-Pepper this is ready for review, I test it, Oscar as well. Thanks in advance.

@juanky201271 juanky201271 force-pushed the dev_background_to_foreground_report_screen_blocks_fixed branch 2 times, most recently from 66c5873 to b4b0eb1 Compare April 6, 2023 19:12
@zancas
Copy link
Member

zancas commented Apr 6, 2023

It seems to me that this needs a new e2e test demonstrating that the bug is fixed.

Copy link
Member

@zancas zancas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fluidvanadium can we add an e2e test, showing that this bug is fixed?

@juanky201271 juanky201271 force-pushed the dev_background_to_foreground_report_screen_blocks_fixed branch from b4b0eb1 to abb1cd1 Compare April 12, 2023 17:54
@zancas
Copy link
Member

zancas commented Apr 12, 2023

So this is blocked on test? I really hope we can get it tested and landed before our release!

@Oscar-Pepper
Copy link
Contributor

i am testing again now in emulator... maybe this will be good enough for merge? an e2e would have to be thorough as the bug doesn't always show up so i think manual testing will give us more confidence. an e2e test would still be very valuable though because it would still catch it (eventually) going forward

@Oscar-Pepper
Copy link
Contributor

i have tested thoroughly in emulator on two different AVDs and there is no sign of the bug. i think we are good to merge

@juanky201271 juanky201271 assigned zancas and unassigned fluidvanadium Apr 13, 2023
@zancas
Copy link
Member

zancas commented Apr 13, 2023

Is it difficult to write an e2e test?

The difference between having an e2e test and not is our awareness about this bug in the future. I believe that this bug is not present now, because of the manual testing. But.. I assume we're going to change the codebase.. right? So tomorrow, when the codebase is different, what evidence do we have that the bug is still fixed?

@juanky201271 juanky201271 force-pushed the dev_background_to_foreground_report_screen_blocks_fixed branch from 65c67b1 to 3664fc4 Compare April 13, 2023 21:35
@juanky201271
Copy link
Contributor Author

juanky201271 commented Apr 14, 2023

The test is in place!

Resultado del test:
C:\Users\juank\github\zingo-mobile-juanky\android>yarn detox test sync_report -c android.emu.debug
yarn run v1.22.15
$ C:\Users\juank\github\zingo-mobile-juanky\node_modules.bin\detox test sync_report -c android.emu.debug
14:16:27.401 detox[224668] B jest --config e2e/jest.config.js sync_report
14:16:43.435 detox[151124] i sync_report.test.js is assigned to emulator-12536 (Pixel_6_API_30_1)
14:16:51.694 detox[151124] i Renders Sync Report data (blocks & batches) correctly.: loads a wallet
14:17:01.703 detox[151124] i Renders Sync Report data (blocks & batches) correctly.: loads a wallet [OK]
14:17:01.706 detox[151124] i Renders Sync Report data (blocks & batches) correctly.: When App go to background & back to foreground -> Report Screen: blocks & batches are aligned
14:17:45.583 detox[151124] i batches 9
14:17:45.584 detox[151124] i total batches 561
14:17:45.584 detox[151124] i blocks sync now 886
14:17:45.584 detox[151124] i blocks not yet sync 55128
14:17:45.585 detox[151124] i blocks total 56014
14:17:45.586 detox[151124] i Renders Sync Report data (blocks & batches) correctly.: When App go to background & back to foreground -> Report Screen: blocks & batches are aligned [OK]

PASS e2e/sync_report.test.js (76.748 s)
Renders Sync Report data (blocks & batches) correctly.
√ loads a wallet (10008 ms)
√ When App go to background & back to foreground -> Report Screen: blocks & batches are aligned (43880 ms)

Done in 79.04s.

zancas
zancas previously approved these changes Apr 14, 2023
@zancas
Copy link
Member

zancas commented Apr 14, 2023

Awesome! I think @fluidvanadium or @Oscar-Pepper or someone with more intimate knowledge of zingo-mobile should merge it.

@juanky201271
Copy link
Contributor Author

New execution of the test:

C:\Users\juank\github\zingo-mobile-juanky\android>yarn detox test sync_report -c android.emu.debug
yarn run v1.22.15
$ C:\Users\juank\github\zingo-mobile-juanky\node_modules.bin\detox test sync_report -c android.emu.debug
08:16:03.838 detox[275392] B jest --config e2e/jest.config.js sync_report
08:16:21.800 detox[239552] i sync_report.test.js is assigned to emulator-16144 (Pixel_6_API_30_1)
08:16:33.451 detox[239552] i Renders Sync Report data (blocks & batches) correctly.: loads a wallet
08:16:43.978 detox[239552] i Renders Sync Report data (blocks & batches) correctly.: loads a wallet [OK]
08:16:43.985 detox[239552] i Renders Sync Report data (blocks & batches) correctly.: When App go to background & back to foreground -> Report Screen: blocks & batches are aligned
08:17:29.003 detox[239552] i batches 11
08:17:29.003 detox[239552] i total batches 569
08:17:29.004 detox[239552] i blocks sync now 1076
08:17:29.004 detox[239552] i blocks not yet sync 55798
08:17:29.004 detox[239552] i blocks total 56874
08:17:29.005 detox[239552] i batch size: 100
08:17:29.006 detox[239552] i Renders Sync Report data (blocks & batches) correctly.: When App go to background & back to foreground -> Report Screen: blocks & batches are aligned [OK]

PASS e2e/sync_report.test.js (83.651 s)
Renders Sync Report data (blocks & batches) correctly.
√ loads a wallet (10526 ms)
√ When App go to background & back to foreground -> Report Screen: blocks & batches are aligned (45021 ms)

Done in 86.24s.

@zancas zancas merged commit 9f4838a into zingolabs:dev Apr 14, 2023
@juanky201271 juanky201271 deleted the dev_background_to_foreground_report_screen_blocks_fixed branch April 14, 2023 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sync Report screen with wrong data when come back from the background
4 participants