-
Notifications
You must be signed in to change notification settings - Fork 584
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
Fix assertSnapshot for Swift Testing tests. #916
Conversation
@_implementationOnly import Testing | ||
import Testing | ||
|
||
@_spi(Experimental) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads up @JRR-OSU and @kondratk. This will affect you based on our discussions in #901.
We have had to remove the @_implementationOnly
imports for Testing because we want to remove the @_spi
restriction from these testing traits. This means that once again Snapshot Testing will not work from UI testing targets. Again, we feel this is a bug for Apple to deal with, as Testing does not work in UI test targets.
The only other fix that comes to mind for this would be to move everything but the code that uses Swift Testing into some kind of "SnapshotTestingCore" module, and then that could be imported into UI test targets when needed. We will discuss this more.
Does this mean that attachments won't be available at all when running from Swift Testing? Seems like Swift Testing does not support it yet at all? |
@IlyaPuchkaTW That's correct. You can follow their progress here: swiftlang/swift-testing#714 |
* main: (27 commits) Run swift-format Fix assertSnapshot for Swift Testing tests. (pointfreeco#916) Add an NB to @_implementationOnly import. Run swift-format Import only the implementation of Testing. (pointfreeco#903) fix missing inline snapshot testing (pointfreeco#887) Feature/fixed decimal separator (pointfreeco#889) Run swift-format Xcode 16 beta 5: Fix snapshots test trait (pointfreeco#885) Run swift-format Don't invoke XCTContext when running in the Testing framework. (pointfreeco#884) Run swift-format Fixed .failed record mode in inline snapshots. (pointfreeco#874) Point updated packages to swiftlang organization (pointfreeco#873) Fix recordIssue for Xcode beta 3. (pointfreeco#869) Run swift-format Beta support for Swift Testing, and other improvements. (pointfreeco#867) Run swift-format New `canGenerateNewSnapshots` to avoid automatically creating missing ones in CI (pointfreeco#768) Run swift-format ...
Fixes #915