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: show pending legal hold request and approve it [WPB-4393] #2484

Merged
merged 11 commits into from
Nov 30, 2023

Conversation

saleniuk
Copy link
Contributor

@saleniuk saleniuk commented Nov 29, 2023

StoryWPB-4393 [Android] Receive a Legal hold request


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?

The logic in view models to show the bar informing about pending legal hold request and a dialog with the option to approve this request.

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

As a team admin request the legal hold for the user, then this user should see this bar and dialog when he/she opens the app.

Attachments (Optional)

approve_legal_hold.mp4

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.

Copy link

codecov bot commented Nov 29, 2023

Codecov Report

Merging #2484 (af03752) into develop (2dd5d83) will increase coverage by 0.53%.
The diff coverage is 87.14%.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #2484      +/-   ##
=============================================
+ Coverage      40.94%   41.47%   +0.53%     
- Complexity      1098     1104       +6     
=============================================
  Files            348      348              
  Lines          12713    12764      +51     
  Branches        1660     1664       +4     
=============================================
+ Hits            5205     5294      +89     
+ Misses          7018     6976      -42     
- Partials         490      494       +4     
Files Coverage Δ
...otlin/com/wire/android/ui/WireActivityViewModel.kt 71.76% <100.00%> (-0.12%) ⬇️
...alhold/dialog/requested/LegalHoldRequestedState.kt 100.00% <100.00%> (+100.00%) ⬆️
...ld/dialog/requested/LegalHoldRequestedViewModel.kt 86.51% <86.76%> (+86.51%) ⬆️

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 2dd5d83...af03752. Read the comment docs.

Copy link
Contributor

github-actions bot commented Nov 29, 2023

Test Results

714 tests  +19   714 ✔️ +19   7m 21s ⏱️ + 1m 41s
  99 suites +  1       0 💤 ±  0 
  99 files   +  1       0 ±  0 

Results for commit af03752. ± Comparison against base commit 2dd5d83.

This pull request removes 1 and adds 20 tests. Note that renamed tests count towards both.
com.wire.android.ui.common.topappbar.CommonTopAppBarViewModelTest ‑ givenActiveCallAndConnectivityIssueAndSomeOtherScreen_whenGettingState_thenShouldHaveNoInfo()
com.wire.android.ui.common.topappbar.CommonTopAppBarViewModelTest ‑ givenActiveCallAndConnectivityIssueAndSomeOtherScreen_whenGettingState_thenShouldHaveActiveCallInfo()
com.wire.android.ui.common.topappbar.CommonTopAppBarViewModelTest ‑ givenLegalHoldRequestAndAuthRelatedScreen_whenGettingState_thenShouldNotHaveLegalHoldRequestInfo()
com.wire.android.ui.common.topappbar.CommonTopAppBarViewModelTest ‑ givenLegalHoldRequestAndCallScreen_whenGettingState_thenShouldNotHaveLegalHoldRequestInfo()
com.wire.android.ui.common.topappbar.CommonTopAppBarViewModelTest ‑ givenLegalHoldRequestAndHomeScreen_whenGettingState_thenShouldHaveLegalHoldRequestInfo()
com.wire.android.ui.common.topappbar.CommonTopAppBarViewModelTest ‑ givenNoLegalHoldRequest_whenGettingState_thenShouldNotHaveLegalHoldRequestInfo()
com.wire.android.ui.legalhold.dialog.requested.LegalHoldRequestedViewModelTest ‑ givenGenericFailureResult_whenApproving_thenErrorStateShouldBeGenericError()
com.wire.android.ui.legalhold.dialog.requested.LegalHoldRequestedViewModelTest ‑ givenInvalidPasswordResult_whenApproving_thenErrorStateShouldBeInvalidCredentials()
com.wire.android.ui.legalhold.dialog.requested.LegalHoldRequestedViewModelTest ‑ givenInvalidPasswordResult_whenValidatingPassword_thenErrorStateShouldBeInvalidCredentials()
com.wire.android.ui.legalhold.dialog.requested.LegalHoldRequestedViewModelTest ‑ givenInvalidPassword_whenEnteringPassword_thenAcceptButtonShouldBeDisabled()
com.wire.android.ui.legalhold.dialog.requested.LegalHoldRequestedViewModelTest ‑ givenLegalHoldRequestReturnsFailure_whenGettingState_thenStateShouldBeHidden()
…

♻️ This comment has been updated with latest results.

Copy link
Contributor

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

@saleniuk saleniuk requested review from a team, typfel, yamilmedina, alexandreferris, borichellow, MohamadJaara and ohassine and removed request for a team November 29, 2023 13:15
@saleniuk saleniuk requested a review from ohassine November 29, 2023 15:48
Copy link
Contributor

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

Copy link
Contributor

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

@saleniuk saleniuk added this pull request to the merge queue Nov 30, 2023
Merged via the queue into develop with commit b51377f Nov 30, 2023
12 checks passed
@saleniuk saleniuk deleted the feat/approve-legal-hold-request branch November 30, 2023 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants