Skip to content

Commit 5d5cd38

Browse files
committed
fix tests
1 parent ae6eb95 commit 5d5cd38

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Coder-Desktop/Coder-DesktopTests/Util.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class MockVPNService: VPNService, ObservableObject {
1010
@Published var state: Coder_Desktop.VPNServiceState = .disabled
1111
@Published var baseAccessURL: URL = .init(string: "https://dev.coder.com")!
1212
@Published var menuState: VPNMenuState = .init()
13-
@Published var progressMessage: String?
13+
@Published var progress: VPNProgress = .init(stage: .none, downloadProgress: nil)
1414
var onStart: (() async -> Void)?
1515
var onStop: (() async -> Void)?
1616

Coder-Desktop/Coder-DesktopTests/VPNStateTests.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ struct VPNStateTests {
3838

3939
try await ViewHosting.host(view) {
4040
try await sut.inspection.inspect { view in
41-
let progressView = try view.find(ViewType.ProgressView.self)
42-
#expect(try progressView.labelView().text().string() == "Starting Coder Connect...")
41+
_ = try view.find(text: "Starting Coder Connect...")
4342
}
4443
}
4544
}
@@ -50,8 +49,7 @@ struct VPNStateTests {
5049

5150
try await ViewHosting.host(view) {
5251
try await sut.inspection.inspect { view in
53-
let progressView = try view.find(ViewType.ProgressView.self)
54-
#expect(try progressView.labelView().text().string() == "Stopping Coder Connect...")
52+
_ = try view.find(text: "Stopping Coder Connect...")
5553
}
5654
}
5755
}

0 commit comments

Comments
 (0)