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

Test changemanagingentity opens bottomsheet model #3031

Merged
merged 13 commits into from
Feb 27, 2024

Conversation

SebaMutuku
Copy link
Contributor

@SebaMutuku SebaMutuku commented Feb 1, 2024

IMPORTANT: Where possible all PRs must be linked to a Github issue

CHT

Engineer Checklist

  • I have written Unit tests for any new feature(s) and edge cases for bug fixes
  • I have added any strings visible on UI components to the strings.xml file
  • I have updated the CHANGELOG.md file for any notable changes to the codebase
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the project's style guide
  • I have built and run the FHIRCore app to verify my change fixes the issue and/or does not break the app
  • I have checked that this PR does NOT introduce breaking changes that require an update to Content and/or Configs? If it does add a sample here or a link to exactly what changes need to be made to the content.

Code Reviewer Checklist

  • I have verified Unit tests have been written for any new feature(s) and edge cases
  • I have verified any strings visible on UI components are in the strings.xml file
  • I have verifed the CHANGELOG.md file has any notable changes to the codebase
  • I have verified the solution has been implemented in a configurable and generic way for reuseable components
  • I have built and run the FHIRCore app to verify the change fixes the issue and/or does not break the app

Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.8%. Comparing base (ad3a737) to head (3445032).
Report is 187 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              main   #3031      +/-   ##
==========================================
- Coverage     64.5%   29.8%   -34.7%     
+ Complexity    1075     652     -423     
==========================================
  Files          218     236      +18     
  Lines         9635   11074    +1439     
  Branches      1897    1928      +31     
==========================================
- Hits          6218    3306    -2912     
- Misses        2234    7338    +5104     
+ Partials      1183     430     -753     
Flag Coverage Δ
engine 66.2% <ø> (-6.5%) ⬇️
geowidget 47.2% <ø> (-17.1%) ⬇️
quest 5.2% <ø> (-53.7%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 127 files with indirect coverage changes

@SebaMutuku SebaMutuku changed the title Test change manging entity opens bottomsheet Test changemanagingentity opens bottomsheet model Feb 2, 2024
@SebaMutuku SebaMutuku requested a review from ellykits February 2, 2024 06:30
@@ -210,4 +222,77 @@ class ProfileViewModelTest : RobolectricTest() {
profileViewModel.onEvent(event)
}
}

@Test
fun testManagingEntityShowsProfileBottomSheetFragment() = runTest {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rename test case to indicate what is actually being tested, what should be the expected behaviour?

E.g. testThatManagingEntityProfileBottomSheetIsShownOnActionTriggered

Comment on lines 275 to 281
every {
fhirPathDataExtractor.extractValue(
managingEntityResource,
"name",
)
} returns "memebr 1"
every { fhirPathDataExtractor.extractValue(managingEntityResource, any()) } returns "true"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to avoid using mocks here? fhirPathDataExtractor is simply a utility class.

@Rkareko Rkareko enabled auto-merge (squash) February 27, 2024 11:33
@Rkareko Rkareko disabled auto-merge February 27, 2024 11:33
@Rkareko Rkareko merged commit 16ad335 into main Feb 27, 2024
5 checks passed
@Rkareko Rkareko deleted the test_bottomo_sheet_is_shown branch February 27, 2024 11:38
AbdulWahabMemon added a commit that referenced this pull request Feb 28, 2024
* main:
  Move custom .kts to buildSrc as precompiled plugins (#3101)
  Test changemanagingentity opens bottomsheet model (#3031)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants