diff --git a/Example/OpenSwiftUIUITests/Animation/Animation/AnimationCompletionUITests.swift b/Example/OpenSwiftUIUITests/Animation/Animation/AnimationCompletionUITests.swift index be51e8ef5..0783a8781 100644 --- a/Example/OpenSwiftUIUITests/Animation/Animation/AnimationCompletionUITests.swift +++ b/Example/OpenSwiftUIUITests/Animation/Animation/AnimationCompletionUITests.swift @@ -47,7 +47,7 @@ struct AnimationCompletionUITests { } // When run seperately, precision: 1.0 works fine // but in the full suite, it will hit the same issue of #340 - withKnownIssue("#340", isIntermittent: true) { + withKnownIssue("#690", isIntermittent: true) { openSwiftUIAssertAnimationSnapshot( of: ContentView() ) diff --git a/Example/OpenSwiftUIUITests/Animation/Animation/BezierAnimationUITests.swift b/Example/OpenSwiftUIUITests/Animation/Animation/BezierAnimationUITests.swift index 8d60a0e4f..9e5f6b7a2 100644 --- a/Example/OpenSwiftUIUITests/Animation/Animation/BezierAnimationUITests.swift +++ b/Example/OpenSwiftUIUITests/Animation/Animation/BezierAnimationUITests.swift @@ -77,7 +77,7 @@ struct BezierAnimationUITests { } // When run seperately, precision: 1.0 works fine // but in the full suite, it will hit the same issue of #340 - withKnownIssue("$340", isIntermittent: true) { + withKnownIssue("$690", isIntermittent: true) { openSwiftUIAssertAnimationSnapshot( of: ContentView(), ) diff --git a/Example/OpenSwiftUIUITests/Animation/Animation/RepeatAnimationUITests.swift b/Example/OpenSwiftUIUITests/Animation/Animation/RepeatAnimationUITests.swift index a97eb0291..524ba3ae3 100644 --- a/Example/OpenSwiftUIUITests/Animation/Animation/RepeatAnimationUITests.swift +++ b/Example/OpenSwiftUIUITests/Animation/Animation/RepeatAnimationUITests.swift @@ -31,7 +31,7 @@ struct RepeatAnimationUITests { } } } - withKnownIssue("#340", isIntermittent: true) { + withKnownIssue("#690", isIntermittent: true) { openSwiftUIAssertAnimationSnapshot( of: ContentView(autoreverses: autoreverses), testName: #function + "\(autoreverses)" diff --git a/Example/OpenSwiftUIUITests/Graphic/Color/ColorUITests.swift b/Example/OpenSwiftUIUITests/Graphic/Color/ColorUITests.swift index 3b30bfc44..846bcd72a 100644 --- a/Example/OpenSwiftUIUITests/Graphic/Color/ColorUITests.swift +++ b/Example/OpenSwiftUIUITests/Graphic/Color/ColorUITests.swift @@ -75,7 +75,7 @@ struct ColorUITests { } } } - withKnownIssue("#340", isIntermittent: true) { + withKnownIssue("#690", isIntermittent: true) { openSwiftUIAssertAnimationSnapshot(of: ContentView()) } } diff --git a/Example/OpenSwiftUIUITests/Layout/Stack/ZStackUITests.swift b/Example/OpenSwiftUIUITests/Layout/Stack/ZStackUITests.swift index 839d7055a..12fc98c7c 100644 --- a/Example/OpenSwiftUIUITests/Layout/Stack/ZStackUITests.swift +++ b/Example/OpenSwiftUIUITests/Layout/Stack/ZStackUITests.swift @@ -87,9 +87,7 @@ struct ZStackUITests { } } openSwiftUIAssertSnapshot( - of: ContentView(), - // FIXME: Workaround #340 - perceptualPrecision: 0.99 + of: ContentView() ) } } diff --git a/Example/OpenSwiftUIUITests/UITests/Initialize.c b/Example/OpenSwiftUIUITests/UITests/Initialize.c new file mode 100644 index 000000000..677e64564 --- /dev/null +++ b/Example/OpenSwiftUIUITests/UITests/Initialize.c @@ -0,0 +1,15 @@ +// +// Initialize.c +// OpenSwiftUIUITests +// +// Created by Kyle on 12/29/25. +// + +#include "Initialize.h" +#include + +extern void OpenSwiftUIUITests_InitializeSwift(void); + +static void OpenSwiftUIUITests_Initialize(void) { + OpenSwiftUIUITests_InitializeSwift(); +} diff --git a/Example/OpenSwiftUIUITests/UITests/Initialize.h b/Example/OpenSwiftUIUITests/UITests/Initialize.h new file mode 100644 index 000000000..c640b131c --- /dev/null +++ b/Example/OpenSwiftUIUITests/UITests/Initialize.h @@ -0,0 +1,11 @@ +// +// Initialize.h +// OpenSwiftUIUITests +// +// Created by Kyle on 12/29/25. +// + +#pragma once + +__attribute__((constructor, used)) +static void OpenSwiftUIUITests_Initialize(void); diff --git a/Example/OpenSwiftUIUITests/UITests/Initialize.swift b/Example/OpenSwiftUIUITests/UITests/Initialize.swift new file mode 100644 index 000000000..97c321c34 --- /dev/null +++ b/Example/OpenSwiftUIUITests/UITests/Initialize.swift @@ -0,0 +1,18 @@ +// +// Initialize.swift +// OpenSwiftUIUITests +// +// Created by Kyle on 12/29/25. +// + +#if OPENSWIFTUI +@_spi(ForTestOnly) +import OpenSwiftUI +#endif + +@_cdecl("OpenSwiftUIUITests_InitializeSwift") +func __initialize() -> () { + #if OPENSWIFTUI + Color.Resolved._alignWithSwiftUIImplementation = true + #endif +}