-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Pre-implemented Services, reusable UI components and unit testing setup #10
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #10 +/- ##
===========================================
+ Coverage 22.85% 73.49% +50.64%
===========================================
Files 48 78 +30
Lines 2022 3523 +1501
===========================================
+ Hits 462 2589 +2127
+ Misses 1560 934 -626
... and 5 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
…nge handlers for Device State. Update all documentation.
Yes, this is the primary blocker for this PR right now. |
@Supereg I got the macOS builds to work. I added a development signing certificate + two development provisioning profiles in the secrets. In addition I had to add the Apple World Wide Developer certificate from the Continuous Integration setup script as this was missing on the runner. For the documentation: I had to enter the password once to allow UI automation on the macOS runner and I had to press allow Bluetooth once to allow the Bluetooth usage. I suspect that can not easily automate pressing the Bluetooth alert? But apart from all of that: We are now ready to merge this PR 🎉 |
Thanks for the awesome work. This is really a major step forward to have real-world testing for the Bluetooth library. I added the gist of your comments and some additional considerations (I had to turn of the screen saver) to the documentation catalog of the TestPeripheral target.
We might be able to automate pressing the bluetooth alert depending in which process is it launched. But you will have to manually allow the UI testing always.
🚀 |
Some discovery, I needed to explicitly allow UI automation testing again. Not sure if there is an ability to "always allow"? EDIT: Seems to be resolved by running |
Pre-implemented Services, reusable UI components and unit testing setup
♻️ Current situation & Problem
This PR iterates on the original PR #9 that introduced the first version of the DSL approach for the new version of SpeziBluetooth. This PR is used to address some major issues in the initial design, improve thread safety while adding some additional features around the core DSL language and implementing proper unit testing. The release notes touches on the new feature in more detail.
⚙️ Release Notes
BluetoothServices
target that provides reusable Bluetooth Service implementations likeDeviceInformationService
or aHealthThermometerService
.BluetoothViews
target that provides reusable View components to present nearby Bluetooth devices to the user.Characteristic
,DeviceState
orDeviceAction
property wrappers allowing for easy previewing of Bluetooth related views in SwiftUI.TestPeripheral
executable target (and a correspondingTestService
implementation inBluetoothServices
) that is used for our unit testing approach.📚 Documentation
Documentation was updated where required. New targets received their own Documentation Catalogs.
✅ Testing
This PR added unit tests to test the core functionality of SpeziBluetooth in a real-world scenario. We provide a TestPeripheral implementation and unit tests that are expected to run on real device and connect to a the test peripheral.
📝 Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: