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

Introduce AsyncAction with a Confirmation state and use it for logout action #2166

Merged
merged 9 commits into from
Jan 5, 2024

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Jan 4, 2024

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Add AsyncAction similar to Async but to be used for action triggered by the user.
It also contain an Confirming class, which can optionally by used.

Motivation and context

Attempt to fix #2165, by updating the state only once when a confirmation is needed from the user.

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@bmarty bmarty force-pushed the feature/bma/fixFlakyTest branch from 03ca55a to d953c97 Compare January 4, 2024 14:56
Copy link
Contributor

github-actions bot commented Jan 4, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/xRUE2y

Copy link

codecov bot commented Jan 4, 2024

Codecov Report

Attention: 81 lines in your changes are missing coverage. Please review.

Comparison is base (b9a7b11) 67.03% compared to head (1fcb8fe) 67.01%.
Report is 18 commits behind head on develop.

Files Patch % Lines
...ment/android/libraries/architecture/AsyncAction.kt 67.44% 12 Missing and 2 partials ⚠️
...curebackup/impl/disable/SecureBackupDisableView.kt 9.09% 7 Missing and 3 partials ⚠️
...tures/lockscreen/impl/unlock/PinUnlockPresenter.kt 55.55% 2 Missing and 2 partials ⚠️
...atures/login/impl/changeserver/ChangeServerView.kt 0.00% 1 Missing and 3 partials ⚠️
...nfirmaccountprovider/ConfirmAccountProviderView.kt 20.00% 0 Missing and 4 partials ⚠️
...res/roomdetails/impl/blockuser/BlockUserSection.kt 20.00% 1 Missing and 3 partials ⚠️
...searchaccountprovider/SearchAccountProviderView.kt 25.00% 0 Missing and 3 partials ⚠️
...ures/logout/impl/direct/DefaultDirectLogoutView.kt 0.00% 2 Missing ⚠️
...roid/features/logout/impl/ui/LogoutActionDialog.kt 77.77% 1 Missing and 1 partial ⚠️
...mpl/notifications/NotificationSettingsPresenter.kt 66.66% 0 Missing and 2 partials ⚠️
... and 30 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2166      +/-   ##
===========================================
- Coverage    67.03%   67.01%   -0.02%     
===========================================
  Files         1375     1376       +1     
  Lines        34184    34177       -7     
  Branches      7448     7440       -8     
===========================================
- Hits         22914    22904      -10     
- Misses        7653     7660       +7     
+ Partials      3617     3613       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bmarty bmarty marked this pull request as ready for review January 4, 2024 17:55
@bmarty bmarty requested a review from a team as a code owner January 4, 2024 17:55
@bmarty bmarty requested review from jmartinesp and removed request for a team January 4, 2024 17:56
@ElementBot
Copy link
Collaborator

ElementBot commented Jan 4, 2024

Warnings
⚠️

features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomView.kt#L34 - Using a material import while also using the material3 library

⚠️

features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomView.kt#L35 - Using a material import while also using the material3 library

⚠️

features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfileView.kt#L30 - Using a material import while also using the material3 library

⚠️

features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfileView.kt#L31 - Using a material import while also using the material3 library

⚠️

features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditView.kt#L34 - Using a material import while also using the material3 library

⚠️

features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditView.kt#L35 - Using a material import while also using the material3 library

Generated by 🚫 dangerJS against 1fcb8fe

@bmarty
Copy link
Member Author

bmarty commented Jan 5, 2024

Interestingly, the flaky test this PR is attempting to fix is still failing. There is something else. Still digging, but maybe this PR can be merged (I am recording screenshot).

@bmarty bmarty added Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. Run-Maestro Starts a Maestro Cloud session to run integration tests labels Jan 5, 2024
@github-actions github-actions bot removed Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. Run-Maestro Starts a Maestro Cloud session to run integration tests labels Jan 5, 2024
Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

The changes LGTM, it's a shame they don't fix the underlying issue. Will you handle that in another PR?

@bmarty
Copy link
Member Author

bmarty commented Jan 5, 2024

@jmartinesp it should be OK with 1fcb8fe 🤞

Copy link

sonarqubecloud bot commented Jan 5, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@bmarty bmarty added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jan 5, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jan 5, 2024
@bmarty bmarty enabled auto-merge January 5, 2024 09:26
@bmarty bmarty merged commit 4948748 into develop Jan 5, 2024
17 of 18 checks passed
@bmarty bmarty deleted the feature/bma/fixFlakyTest branch January 5, 2024 09:30
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.

Fix flaky test present - logout then confirm
3 participants