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: observe team app lock config (WPB-4476) #2380

Merged
merged 9 commits into from Nov 2, 2023
Merged

Conversation

ohassine
Copy link
Member

@ohassine ohassine commented Oct 27, 2023

TaskWPB-4476 Enforcing App Lock Based on Team Settings


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?

Description

In this PR, I updated mainly ObserveAppLockConfigUseCase so it will observe team app lock config as well and return the valid status for the app

Next PR will be for displaying SetAppLockScreen when it got enabled by the team

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

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.

@ohassine ohassine requested review from a team, typfel, gongracr, borichellow, vitorhugods and saleniuk and removed request for a team October 27, 2023 14:10
@github-actions
Copy link
Contributor

github-actions bot commented Oct 27, 2023

Test Results

663 tests  +2   663 ✔️ +2   5m 53s ⏱️ - 4m 58s
  97 suites ±0       0 💤 ±0 
  97 files   ±0       0 ±0 

Results for commit 4d9e335. ± Comparison against base commit 0584961.

This pull request removes 2 and adds 4 tests. Note that renamed tests count towards both.
com.wire.android.feature.ObserveAppLockConfigUseCaseTest ‑ givenPasscodeIsNotSet_whenObservingAppLockConfig_thenReturnDisabled()
com.wire.android.feature.ObserveAppLockConfigUseCaseTest ‑ givenPasscodeIsSet_whenObservingAppLockConfig_thenReturnEnabled()
com.wire.android.feature.ObserveAppLockConfigUseCaseTest ‑ givenNoValidSession_whenObservingAppLock_thenSendDisabledStatus()
com.wire.android.feature.ObserveAppLockConfigUseCaseTest ‑ givenValidSessionAndAppLockedByTeam_whenObservingAppLock_thenSendEnforcedByTeamStatus()
com.wire.android.feature.ObserveAppLockConfigUseCaseTest ‑ givenValidSessionAndAppLockedByUserOnly_whenObservingAppLock_thenSendEnabledStatus()
com.wire.android.feature.ObserveAppLockConfigUseCaseTest ‑ givenValidSessionAndAppNotLockedByUserNorTeam_whenObservingAppLock_thenSendDisabledStatus()

♻️ This comment has been updated with latest results.

@AndroidBob
Copy link
Collaborator

Build 1567 failed.

@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Merging #2380 (4d9e335) into develop (0584961) will increase coverage by 0.08%.
The diff coverage is 92.30%.

@@              Coverage Diff              @@
##             develop    #2380      +/-   ##
=============================================
+ Coverage      41.51%   41.60%   +0.08%     
  Complexity      1077     1077              
=============================================
  Files            343      343              
  Lines          12252    12271      +19     
  Branches        1608     1612       +4     
=============================================
+ Hits            5087     5105      +18     
  Misses          6685     6685              
- Partials         480      481       +1     
Files Coverage Δ
...re/android/ui/home/appLock/SetLockCodeViewState.kt 100.00% <100.00%> (ø)
...ire/android/feature/ObserveAppLockConfigUseCase.kt 93.33% <95.83%> (+2.42%) ⬆️
...com/wire/android/ui/home/settings/SettingsState.kt 0.00% <0.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 0584961...4d9e335. Read the comment docs.

@github-actions
Copy link
Contributor

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

@AndroidBob
Copy link
Collaborator

Build 1571 succeeded.

The build produced the following APK's:

Copy link
Contributor

@alexandreferris alexandreferris left a comment

Choose a reason for hiding this comment

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

great work! just a tiny question on the commented code 🤔

app/src/main/kotlin/com/wire/android/di/CoreLogicModule.kt Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

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

@AndroidBob
Copy link
Collaborator

Build 1600 succeeded.

The build produced the following APK's:

Copy link
Contributor

github-actions bot commented Nov 1, 2023

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

@AndroidBob
Copy link
Collaborator

Build 1611 succeeded.

The build produced the following APK's:

# Conflicts:
#	app/src/test/kotlin/com/wire/android/ui/home/appLock/LockCodeTimeManagerTest.kt
#	kalium
Copy link
Contributor

github-actions bot commented Nov 2, 2023

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

@AndroidBob
Copy link
Collaborator

Build 1636 succeeded.

The build produced the following APK's:

@ohassine ohassine added this pull request to the merge queue Nov 2, 2023
Merged via the queue into develop with commit 9e51b65 Nov 2, 2023
15 checks passed
@ohassine ohassine deleted the team_applock branch November 2, 2023 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants