Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg committed Jul 23, 2024
1 parent dec1c3f commit b919242
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Tests/UITests/TestApp/DevicesTestView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ struct DevicesTestView: View {
@State private var weightScale = OmronWeightScale.createMockDevice(manufacturerData: .omronManufacturerData(mode: .transferMode))
@State private var bloodPressureCuff = OmronBloodPressureCuff.createMockDevice(manufacturerData: .omronManufacturerData(mode: .transferMode))

@State private var viewState: ViewState = .idle

var body: some View {
NavigationStack {
DevicesView(appName: "Example", pairingHint: "Enable pairing mode on the device.")
Expand All @@ -47,7 +49,7 @@ struct DevicesTestView: View {
device.isInPairingMode = true
device.$advertisementData.inject(AdvertisementData()) // trigger onChange advertisement
}
AsyncButton {
AsyncButton(state: $viewState) {
try await device.connect()
try await weightScale.connect()
try await bloodPressureCuff.connect()
Expand Down Expand Up @@ -97,6 +99,7 @@ struct DevicesTestView: View {
)
didRegister = true
}
.viewStateAlert(state: $viewState)
}
}

Expand Down

0 comments on commit b919242

Please sign in to comment.