Files
element-x-ios/PreviewTests/SupportingFiles/target.yml
Mauro 2d486ece33 Use iOS 26 Observation for Unit and Preview tests. (#5797)
* use observation in unit and preview tests instead of the async stream

* use a parsing approach that is independent of the sourcery annotation

* Fix observation deferred fulfillments not receiving the initial value

Observation's observe only emits transitions, not the value present at subscription time. Drop the leading initial value from the affected transitionValues sequences and assert it directly with #expect instead.

* improved docs
2026-06-30 14:01:08 +02:00

58 lines
1.3 KiB
YAML

name: PreviewTests
schemes:
PreviewTests:
analyze:
config: Debug
archive:
config: Release
build:
targets:
PreviewTests: all
profile:
config: Release
run:
config: Debug
disableMainThreadChecker: false
test:
config: Debug
disableMainThreadChecker: false
gatherCoverageData: true
coverageTargets:
- ElementX
testPlans:
- path: PreviewTests.xctestplan
defaultPlan: true
targets:
PreviewTests:
type: bundle.unit-test
platform: iOS
dependencies:
- target: ElementX
- package: MatrixRustSDK
- package: SnapshotTesting
info:
path: ../SupportingFiles/Info.plist
settings:
base:
PRODUCT_NAME: PreviewTests
PRODUCT_BUNDLE_IDENTIFIER: ${BASE_BUNDLE_IDENTIFIER}.preview.tests
# Requires iOS 26 as the generated tests reference previews gated to the Observations-based observe(_:).
IPHONEOS_DEPLOYMENT_TARGET: '26.0'
SWIFT_VERSION: 6.2
SWIFT_APPROACHABLE_CONCURRENCY: YES
SWIFT_DEFAULT_ACTOR_ISOLATION: MainActor
debug:
release:
sources:
- path: ../Sources
excludes:
- "**/__Snapshots__/**"
- path: ../SupportingFiles
- path: ../../UnitTests/Sources/TestUtilities/DeferredFulfillment.swift