diff --git a/Makefile b/Makefile index 40799795..bd5c8160 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,11 @@ test-macos: -scheme MarkdownUI \ -destination platform="macOS" +test-macos-maccatalyst: + xcodebuild test \ + -scheme MarkdownUI \ + -destination platform="macOS,variant=Mac Catalyst" + test-ios: xcodebuild test \ -scheme MarkdownUI \ @@ -18,7 +23,7 @@ test-watchos: -scheme MarkdownUI \ -destination platform="watchOS Simulator,name=Apple Watch SE (40mm) (2nd generation)" -test: test-macos test-ios test-tvos test-watchos +test: test-macos test-macos-maccatalyst test-ios test-tvos test-watchos format: swift format --in-place --recursive . diff --git a/Package.swift b/Package.swift index 605c5886..61582c31 100644 --- a/Package.swift +++ b/Package.swift @@ -8,6 +8,7 @@ let package = Package( .macOS(.v12), .iOS(.v15), .tvOS(.v15), + .macCatalyst(.v15), .watchOS(.v8), ], products: [ diff --git a/Tests/MarkdownUITests/MarkdownImageTests.swift b/Tests/MarkdownUITests/MarkdownImageTests.swift index 620e81c8..ce598581 100644 --- a/Tests/MarkdownUITests/MarkdownImageTests.swift +++ b/Tests/MarkdownUITests/MarkdownImageTests.swift @@ -8,6 +8,10 @@ final class MarkdownImageTests: XCTestCase { private let layout = SwiftUISnapshotLayout.device(config: .iPhone8) + override func setUpWithError() throws { + try XCTSkipIf(UIDevice.current.userInterfaceIdiom == .pad, "Skipping on Mac Catalyst") + } + func testFailingImage() { let view = Markdown { #""" diff --git a/Tests/MarkdownUITests/MarkdownListTests.swift b/Tests/MarkdownUITests/MarkdownListTests.swift index 70ca9e59..5b331969 100644 --- a/Tests/MarkdownUITests/MarkdownListTests.swift +++ b/Tests/MarkdownUITests/MarkdownListTests.swift @@ -8,6 +8,10 @@ final class MarkdownListTests: XCTestCase { private let layout = SwiftUISnapshotLayout.device(config: .iPhone8) + override func setUpWithError() throws { + try XCTSkipIf(UIDevice.current.userInterfaceIdiom == .pad, "Skipping on Mac Catalyst") + } + func testTaskList() { let view = Markdown { #""" diff --git a/Tests/MarkdownUITests/MarkdownTests.swift b/Tests/MarkdownUITests/MarkdownTests.swift index df83e5b9..0d8ed1a1 100644 --- a/Tests/MarkdownUITests/MarkdownTests.swift +++ b/Tests/MarkdownUITests/MarkdownTests.swift @@ -8,6 +8,10 @@ final class MarkdownTests: XCTestCase { private let layout = SwiftUISnapshotLayout.device(config: .iPhone8) + override func setUpWithError() throws { + try XCTSkipIf(UIDevice.current.userInterfaceIdiom == .pad, "Skipping on Mac Catalyst") + } + func testBlockquote() { let view = Markdown { #""" diff --git a/Tests/MarkdownUITests/ThemeDocCTests.swift b/Tests/MarkdownUITests/ThemeDocCTests.swift index 648cc800..d901ef27 100644 --- a/Tests/MarkdownUITests/ThemeDocCTests.swift +++ b/Tests/MarkdownUITests/ThemeDocCTests.swift @@ -8,6 +8,10 @@ final class ThemeDocCTests: XCTestCase { private let layout = SwiftUISnapshotLayout.device(config: .iPhone8) + override func setUpWithError() throws { + try XCTSkipIf(UIDevice.current.userInterfaceIdiom == .pad, "Skipping on Mac Catalyst") + } + func testInlines() { let view = ThemePreview(theme: .docC) { #""" diff --git a/Tests/MarkdownUITests/ThemeGitHubTests.swift b/Tests/MarkdownUITests/ThemeGitHubTests.swift index 628a7884..45b01ad5 100644 --- a/Tests/MarkdownUITests/ThemeGitHubTests.swift +++ b/Tests/MarkdownUITests/ThemeGitHubTests.swift @@ -9,6 +9,10 @@ private let layout = SwiftUISnapshotLayout.device(config: .iPhone8) private let perceptualPrecision: Float = 0.97 + override func setUpWithError() throws { + try XCTSkipIf(UIDevice.current.userInterfaceIdiom == .pad, "Skipping on Mac Catalyst") + } + func testInlines() { let view = ThemePreview(theme: .gitHub) { #"""