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

Reusable Weight Scale Service, UI Tests #13

Merged
merged 7 commits into from
Jun 3, 2024
Merged

Conversation

Supereg
Copy link
Member

@Supereg Supereg commented May 31, 2024

Reusable Weight Scale Service, UI Tests

♻️ Current situation & Problem

This PR migrates to the reusable WeightScaleService implementation provided by SpeziBluetooth (see StanfordSpezi/SpeziBluetooth#27). Further, it adds testing to verify the functionality of adding new weight measurements for a registered user. This required to add functionality to automatically set up a test environment via a feature flag to inject an existing user. The new InvitationCodeModule centrally manages invitation codes and setting up the test environment.

⚙️ Release Notes

  • Migrate to WeightScaleService from SpeziBluetooth
  • Add UI tests for adding measurement using a SpeziBluetooth-supported Mock device.

📚 Documentation

--

✅ Testing

--

Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

@Supereg Supereg linked an issue May 31, 2024 that may be closed by this pull request
1 task
Copy link

codecov bot commented May 31, 2024

Codecov Report

Attention: Patch coverage is 75.61983% with 59 lines in your changes are missing coverage. Please review.

Project coverage is 78.33%. Comparing base (8e57ce5) to head (309da1b).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main      #13       +/-   ##
===========================================
+ Coverage   52.68%   78.33%   +25.65%     
===========================================
  Files          32       29        -3     
  Lines        1158     1144       -14     
===========================================
+ Hits          610      896      +286     
+ Misses        548      248      -300     
Files Coverage Δ
...GEHF/Bluetooth/Views/MeasurementRecordedView.swift 84.62% <100.00%> (+84.62%) ⬆️
ENGAGEHF/Dashboard/Dashboard.swift 100.00% <100.00%> (ø)
ENGAGEHF/Dashboard/Greeting.swift 100.00% <ø> (ø)
ENGAGEHF/ENGAGEHF.swift 100.00% <ø> (ø)
ENGAGEHF/ENGAGEHFDelegate.swift 96.73% <100.00%> (+0.06%) ⬆️
ENGAGEHF/Onboarding/OnboardingFlow.swift 97.06% <ø> (ø)
...EHF/Bluetooth/Views/ConfirmMeasurementButton.swift 93.75% <85.72%> (+93.75%) ⬆️
ENGAGEHF/ENGAGEHFTestingSetup.swift 95.84% <88.89%> (-4.16%) ⬇️
ENGAGEHF/Home.swift 97.68% <87.50%> (+8.79%) ⬆️
ENGAGEHF/Onboarding/InvitationCodeView.swift 97.37% <94.12%> (+17.71%) ⬆️
... and 4 more

... and 2 files with indirect coverage changes


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 8e57ce5...309da1b. Read the comment docs.

@Supereg Supereg linked an issue May 31, 2024 that may be closed by this pull request
1 task
@Supereg Supereg changed the title Move to weight scale service provided by SpeziBluetooth Reusable Weight Scale Service, UI Tests May 31, 2024
@Supereg Supereg marked this pull request as ready for review June 3, 2024 14:37
Supereg added 3 commits June 3, 2024 16:38
* Added new Invitation Code Module and support to automatically inject test account.
* Resolved some Todos
* Fully implement weight scale UI tests.
@Supereg Supereg force-pushed the feature/weight-scale-mock branch from dc6d9cb to 45092bd Compare June 3, 2024 14:44
@Supereg Supereg requested a review from PSchmiedmayer June 3, 2024 15:45
Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

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

Thank you for all the improvements, looks great!

@Supereg Supereg merged commit 7b3f48c into main Jun 3, 2024
8 checks passed
@Supereg Supereg deleted the feature/weight-scale-mock branch June 3, 2024 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants