From 55a878b4671b90dbab17df8821ae512c354ca006 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Fri, 22 Mar 2024 10:12:47 +0100 Subject: [PATCH] Amended the previews for the FeedListViewController view controller in the Feed framework. --- .../FeedListViewController.swift | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Frameworks/Feed/Bundle/Sources/UI/View Controllers/FeedListViewController.swift b/Frameworks/Feed/Bundle/Sources/UI/View Controllers/FeedListViewController.swift index 95128b0..a9e662f 100644 --- a/Frameworks/Feed/Bundle/Sources/UI/View Controllers/FeedListViewController.swift +++ b/Frameworks/Feed/Bundle/Sources/UI/View Controllers/FeedListViewController.swift @@ -451,15 +451,6 @@ private extension UIEdgeInsets { #if DEBUG import ReviewsiTunesKit -@available(iOS 17.0, *) -#Preview("Feed List loading reviews") { - MockURLProtocol.response = .init(statusCode: 404) - - return UINavigationController(rootViewController: FeedListViewController(.init( - configuration: .init(session: .mock) - ))) -} - @available(iOS 17.0, *) #Preview("Feed List with few reviews") { MockURLProtocol.response = .init( @@ -530,6 +521,15 @@ import ReviewsiTunesKit ))) } +@available(iOS 17.0, *) +#Preview("Feed List with error when loading reviews") { + MockURLProtocol.response = .init(statusCode: 404) + + return UINavigationController(rootViewController: FeedListViewController(.init( + configuration: .init(session: .mock) + ))) +} + @available(iOS 17.0, *) #Preview("Feed List with live reviews") { return UINavigationController(rootViewController: FeedListViewController(.init()))