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

Update for Swift 5.8 support #164

Merged
merged 1 commit into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ extension NetworkInspectorView {
NetworkInspectorTransferInfoView(viewModel: .init(task: task))
} else if task.state == .pending {
SpinnerView(viewModel: ProgressViewModel(task: task))
} else if let status = NetworkRequestStatusSectionViewModel(task: task).status {
} else {
// Fallback in case metrics are disabled
let status = NetworkRequestStatusSectionViewModel(task: task).status
Image(systemName: status.imageName)
.foregroundColor(status.tintColor)
.font(.system(size: 64))
Expand Down
8 changes: 4 additions & 4 deletions Tests/PulseUITests/ConsoleTextViewModelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ final class ConsoleTextViewModelTests: ConsoleTestCase {
reset()

// THEN
XCTAssertNotNil(string.wholeMatch(of: /(.*?) · Test-Label · test-text\n/), string)
XCTAssertNotNil(string.wholeMatch(of: #/(.*?) · Test-Label · test-text\n/#), string)
}

func testInsertedMessageRendered() {
Expand All @@ -57,7 +57,7 @@ final class ConsoleTextViewModelTests: ConsoleTestCase {

// THEN
wait(for: [expectation], timeout: 2)
XCTAssertNotNil(string.wholeMatch(of: /(.*?) · Test-Label · test-text\n/), string)
XCTAssertNotNil(string.wholeMatch(of: #/(.*?) · Test-Label · test-text\n/#), string)
}

func testInsertedPendingTaskRendered() {
Expand All @@ -75,7 +75,7 @@ final class ConsoleTextViewModelTests: ConsoleTestCase {

// THEN
wait(for: [textInsertedExpectation], timeout: 2)
XCTAssertNotNil(string.wholeMatch(of: /(.*?) · Pending · GET https:\/\/example.com\/api\n/), string)
XCTAssertNotNil(string.wholeMatch(of: #/(.*?) · Pending · GET https:\/\/example.com\/api\n/#), string)

// GIVEN
let textUpdatedEpectation = self.expectation(description: "textUpdatedxpectation")
Expand All @@ -87,7 +87,7 @@ final class ConsoleTextViewModelTests: ConsoleTestCase {

// THEN
wait(for: [textUpdatedEpectation], timeout: 2)
XCTAssertNotNil(string.wholeMatch(of: /(.*?) · 200 OK · GET https:\/\/example.com\/api\n/), string)
XCTAssertNotNil(string.wholeMatch(of: #/(.*?) · 200 OK · GET https:\/\/example.com\/api\n/#), string)
}

func testDetailsShown() throws {
Expand Down