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

feat: support joining conversation with password protected code [WPB-1531] #2049

Merged
merged 18 commits into from
Aug 4, 2023

Conversation

MohamadJaara
Copy link
Member


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

guest links with password

Solutions

implement the UI logic to join conversation when the code is password protected

Dependencies (Optional)

If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

…th-password

# Conflicts:
#	app/src/main/kotlin/com/wire/android/ui/WireActivity.kt
#	app/src/main/kotlin/com/wire/android/ui/WireActivityViewModel.kt
#	app/src/test/kotlin/com/wire/android/ui/WireActivityViewModelTest.kt
#	kalium
@MohamadJaara MohamadJaara requested review from borichellow, vitorhugods, trOnk12, saleniuk, a team and mchenani and removed request for a team August 3, 2023 07:51
@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2023

Test Results

508 tests  +2   507 ✔️ +2   5m 35s ⏱️ - 1m 19s
  77 suites +1       1 💤 ±0 
  77 files   +1       0 ±0 

Results for commit a01ece2. ± Comparison against base commit b392ba7.

This pull request removes 4 and adds 6 tests. Note that renamed tests count towards both.
com.wire.android.ui.WireActivityViewModelTest ‑ given No session, when try to join conversation, then get error and don't call onSuccess()
com.wire.android.ui.WireActivityViewModelTest ‑ given invalid code, when try to join conversation, then get error and don't call onSuccess()
com.wire.android.ui.WireActivityViewModelTest ‑ given valid code, when joining conversion and user us already a member, then call onSuccess()
com.wire.android.ui.WireActivityViewModelTest ‑ given valid code, when joining conversion success, then call onSuccess()
com.wire.android.ui.joinDeepLink.JoinViaCodeViewModelTest ‑ given invalid code, when try to join conversation, then state is updated()
com.wire.android.ui.joinDeepLink.JoinViaCodeViewModelTest ‑ given password field is empty, when try to join conversation, then password Is not passed to the use case()
com.wire.android.ui.joinDeepLink.JoinViaCodeViewModelTest ‑ given password, when try to join conversation, then password Is passed to the use case()
com.wire.android.ui.joinDeepLink.JoinViaCodeViewModelTest ‑ given valid code, when joining conversion and user us already a member, then update state()
com.wire.android.ui.joinDeepLink.JoinViaCodeViewModelTest ‑ given valid code, when joining conversion success, then stat is updated()
com.wire.android.ui.joinDeepLink.JoinViaCodeViewModelTest ‑ given wrong password error state, when updating password, then error is cleared()

♻️ This comment has been updated with latest results.

Copy link
Contributor

@borichellow borichellow left a comment

Choose a reason for hiding this comment

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

Good one!!! Just 2 tiny comments :)

}

@Test
fun `given valid code, when joining conversion and user us already a member, then update state`() {
Copy link
Contributor

Choose a reason for hiding this comment

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

...is already a member, then...

Copy link
Member Author

Choose a reason for hiding this comment

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

the state is d to Joined, maybe the state name is a bit confusing i will rename it to success

@AndroidBob
Copy link
Collaborator

Build 860 failed.

@AndroidBob
Copy link
Collaborator

Build 865 failed.

@AndroidBob
Copy link
Collaborator

Build 872 failed.

@MohamadJaara MohamadJaara changed the title feat: support joining conversation with password protected code [WPB-1531] feat: support joining conversation with password protected code (WPB-1531) Aug 3, 2023
@MohamadJaara MohamadJaara changed the title feat: support joining conversation with password protected code (WPB-1531) feat: support joining conversation with password protected code [WPB-1531] Aug 3, 2023
@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Merging #2049 (a01ece2) into develop (b392ba7) will increase coverage by 0.04%.
Report is 1 commits behind head on develop.
The diff coverage is 56.52%.

@@              Coverage Diff              @@
##             develop    #2049      +/-   ##
=============================================
+ Coverage      39.04%   39.08%   +0.04%     
- Complexity       914      920       +6     
=============================================
  Files            303      305       +2     
  Lines          11152    11166      +14     
  Branches        1492     1489       -3     
=============================================
+ Hits            4354     4364      +10     
- Misses          6374     6381       +7     
+ Partials         424      421       -3     
Files Changed Coverage Δ
...rc/main/kotlin/com/wire/android/ui/WireActivity.kt 0.00% <0.00%> (ø)
...inConversation/JoinConversationViaCodeViewModel.kt 90.90% <90.90%> (ø)
...otlin/com/wire/android/ui/WireActivityViewModel.kt 70.37% <100.00%> (+0.25%) ⬆️
...nConversation/JoinConversationViaDeepLinkDialog.kt 85.71% <100.00%> (+2.38%) ⬆️
.../ui/joinConversation/JoinViaDeepLinkDialogState.kt 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b392ba7...a01ece2. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2023

APKs built during tests are available here. Scroll down to Artifacts!

@AndroidBob
Copy link
Collaborator

Build 890 succeeded.

The build produced the following APK's:

@MohamadJaara MohamadJaara added this pull request to the merge queue Aug 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

APKs built during tests are available here. Scroll down to Artifacts!

Merged via the queue into develop with commit 37bbf63 Aug 4, 2023
13 of 14 checks passed
@MohamadJaara MohamadJaara deleted the feat/guest-link-with-password branch August 4, 2023 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants