Skip to content
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
6 changes: 3 additions & 3 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
destination: [
"'platform=macOS,variant=Mac Catalyst'",
"'platform=macOS'",
"'platform=tvOS Simulator,name=Apple TV'",
"'platform=iOS Simulator,name=iPhone 8'",
"'platform=watchOS Simulator,name=Apple Watch Series 5 (40mm)'"
"'platform=tvOS Simulator,name=Apple TV,OS=26.0'",
"'platform=iOS Simulator,name=iPhone 16,OS=26.0'",
"'platform=watchOS Simulator,name=Apple Watch SE (40mm) (2nd generation),OS=26.0'"
]
runs-on: macos-latest

Expand Down
9 changes: 0 additions & 9 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions Tests/WMATAUITests/LineUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ final class LinesUITests: XCTestCase {
let dot = Line.red.dot(style: .headline, factor: 1.0)
#if targetEnvironment(macCatalyst) // macCatalyst builds as if iOS without this target environment
let baseFontSize = 19.0
let largeFontSize = 55.0
let largeFontSize = 19.0
try XCTSkipIf(true, "showView has empty implementaton in macCatalyst")
#elseif os(macOS)
let baseFontSize = 15.0
let largeFontSize = 15.0
Expand Down Expand Up @@ -77,7 +78,9 @@ final class LinesUITests: XCTestCase {
dot
.environment(\.sizeCategory, .accessibilityExtraExtraExtraLarge)
.readSize { size in
XCTAssertEqual(size.height, largeFontSize)
// rounding up expanded sizes instead of dealing with 1/3 pt differences
// between target size and rendered size
XCTAssertEqual(size.height.rounded(.up), largeFontSize)
largeSizeExpectation.fulfill()
}
)
Expand Down Expand Up @@ -119,11 +122,14 @@ extension View {
}

func showView<T: View>(_ view: T) {
#if os(macOS)
#if targetEnvironment(macCatalyst)
// do nothing
#elseif os(macOS)
let window = NSWindow()
window.contentViewController = NSHostingController(rootView: view)
window.makeKeyAndOrderFront(nil)
#elseif os(watchOS)
// do nothing
#else
let window = UIWindow(frame: UIScreen.main.bounds)
window.rootViewController = UIHostingController(rootView: view)
Expand Down