Retrofit deferFulfillment onto snapshot tests. (#3641)

* Retrofit `deferFulfillment` onto snapshot tests.

* Convert a bunch of preview tests to the new fulfillment publisher

* Convert more tests

* Remove unneeded delays from the remaining tests

* Remove snapshotting delay option.
This commit is contained in:
Stefan Ceriu
2024-12-20 15:30:59 +02:00
committed by GitHub
parent 1ec1ffd9c5
commit 87169d9db5
49 changed files with 606 additions and 532 deletions

View File

@@ -97,7 +97,9 @@ struct EmojiPickerScreen_Previews: PreviewProvider, TestablePreview {
static var previews: some View {
EmojiPickerScreen(context: viewModel.context, selectedEmojis: ["😀", "😄"])
.previewDisplayName("Screen")
.snapshotPreferences(delay: 0.5)
.snapshotPreferences(expect: viewModel.context.$viewState.map { state in
!state.categories.isEmpty
})
}
}