Skip to content
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

💲[Native Checkout] Pledge Error State CTA #753

Merged
merged 84 commits into from
Jul 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
05bbd8a
wip project states
cdolm92 May 10, 2019
92a772f
wip project states button colors and label showing up
cdolm92 May 13, 2019
ea877dd
wip project states button height fix
cdolm92 May 13, 2019
6d683dc
wip, manage button
cdolm92 May 15, 2019
15e074f
wip setting up vm for states
cdolm92 May 15, 2019
4d7e56c
wip setting up vm for states
cdolm92 May 16, 2019
dd9ec41
wip for reward title in manage state
cdolm92 May 16, 2019
eefe409
wip - refactor and vm tests
cdolm92 May 20, 2019
fe5f0d3
Merge branch 'feature-native-checkout' of https://github.com/kickstar…
cdolm92 May 20, 2019
03efd50
wip - getting reward title now
cdolm92 May 22, 2019
cced1e6
wip - amount and reward formatted for manage state
cdolm92 Jun 4, 2019
64a8d49
wip
cdolm92 Jun 4, 2019
17563db
wip- deleted backer banner
cdolm92 Jun 10, 2019
b20e616
wip- swiftlint fixes
cdolm92 Jun 10, 2019
a99489e
Merge branch 'feature-native-checkout' of https://github.com/kickstar…
cdolm92 Jun 10, 2019
5d34bc2
wip - got view layer back
cdolm92 Jun 11, 2019
fd1bfdd
wip - refactor and renaming
cdolm92 Jun 13, 2019
7b583df
wip - snapshot tests
cdolm92 Jun 13, 2019
e29225f
wip
cdolm92 Jun 17, 2019
70db98a
wip- corrected shipping amount in manage state
cdolm92 Jun 17, 2019
026c304
wip- final and alphabetize files
cdolm92 Jun 17, 2019
86fb7d2
Merge branch 'feature-native-checkout' of https://github.com/kickstar…
cdolm92 Jun 17, 2019
6e3b73a
pr feedback -move stylings to bindStyles()
cdolm92 Jun 18, 2019
9eea1a9
smapshot tests
cdolm92 Jun 18, 2019
3f643b4
manage and view rewards strings added
cdolm92 Jun 18, 2019
3e4e464
using new strings
cdolm92 Jun 18, 2019
cde68d2
vm tests fix
cdolm92 Jun 18, 2019
db15830
swift format
cdolm92 Jun 18, 2019
cbd9ad3
wip- fix pledge
cdolm92 Jun 19, 2019
c881491
revert strings
cdolm92 Jun 20, 2019
0257061
backer banner is back
cdolm92 Jun 20, 2019
b719a30
snapshots
cdolm92 Jun 20, 2019
cc391cc
refactor- was not using user
cdolm92 Jun 20, 2019
dd4581a
light refactor
cdolm92 Jun 20, 2019
0127edb
refactor and snapshot test correction
cdolm92 Jun 20, 2019
838dc60
swiftlint fix
cdolm92 Jun 20, 2019
c00e4a5
new snapshots
cdolm92 Jun 20, 2019
8cce6f9
remove images from new snapshots
cdolm92 Jun 20, 2019
53e9290
remove image
cdolm92 Jun 20, 2019
3be29bc
Merge branch 'cta-project-states' of https://github.com/kickstarter/i…
cdolm92 Jun 20, 2019
3a48577
wip - fix state
cdolm92 Jun 20, 2019
a44d702
case
cdolm92 Jun 25, 2019
e86d42f
fix logic is there
cdolm92 Jun 27, 2019
24b00d6
fix vm tests are passing
cdolm92 Jun 27, 2019
cd4a326
Merge branch 'feature-native-checkout' of https://github.com/kickstar…
cdolm92 Jul 9, 2019
ca08db7
snapshot tests fixed
cdolm92 Jul 9, 2019
c092f74
snapshot tests fix for error state
cdolm92 Jul 9, 2019
c686804
strings for error state
cdolm92 Jul 9, 2019
f151c39
vm refactor
cdolm92 Jul 9, 2019
e597ac6
vm refactor title text
cdolm92 Jul 9, 2019
b06feec
undid change
cdolm92 Jul 9, 2019
6bc920e
swift format
cdolm92 Jul 9, 2019
425270a
fix button width
cdolm92 Jul 10, 2019
013d3a5
new snapshots
cdolm92 Jul 10, 2019
7f59096
design feedback, new snapshots
cdolm92 Jul 11, 2019
7e8da8d
swift format
cdolm92 Jul 11, 2019
01f8a61
added spacing
cdolm92 Jul 11, 2019
5479451
renamed a stackview
cdolm92 Jul 11, 2019
e48bfd3
capitalized
cdolm92 Jul 11, 2019
8d4a673
capitalized
cdolm92 Jul 11, 2019
0e6df1c
fixes
cdolm92 Jul 11, 2019
f102379
Merge branch 'feature-native-checkout' of https://github.com/kickstar…
ifbarrera Jul 11, 2019
3557bef
Cleaning up screenshots, fixing issues with merge conflict
ifbarrera Jul 11, 2019
5bc65dd
Formatting
ifbarrera Jul 11, 2019
7364ab2
Revert unneeded project template
ifbarrera Jul 11, 2019
1933e08
Cleaning up the snapshot configurations so they’re more consistent fr…
ifbarrera Jul 11, 2019
4978002
Formatting
ifbarrera Jul 11, 2019
3045c43
Line length
ifbarrera Jul 11, 2019
82cd0cb
Line length again
ifbarrera Jul 11, 2019
8a9f3ca
Merge branch 'cta-error-pledge-state' of https://github.com/kickstart…
cdolm92 Jul 15, 2019
c0f25d7
new snapshots
cdolm92 Jul 15, 2019
b00d851
requested changes
cdolm92 Jul 18, 2019
3cf816e
fixed reward title missing
cdolm92 Jul 18, 2019
f973a8c
fixed snapshot failures
cdolm92 Jul 22, 2019
3df1286
new snapshots
cdolm92 Jul 22, 2019
e5b8f24
swift format
cdolm92 Jul 22, 2019
8917e53
swift lint fix
cdolm92 Jul 22, 2019
a865187
Merge branch 'feature-native-checkout' of https://github.com/kickstar…
cdolm92 Jul 22, 2019
7c7678e
swift format
cdolm92 Jul 22, 2019
302860f
pr feedback and snapshot test for error state
cdolm92 Jul 22, 2019
8e52e12
name change to minHeight and minWidth
cdolm92 Jul 22, 2019
a88c6ed
snapshot tests for error state
cdolm92 Jul 22, 2019
577fb91
constant name change
cdolm92 Jul 23, 2019
ecb2745
snapshot correction
cdolm92 Jul 23, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Kickstarter-iOS/Locales/Base.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"Change_payment_method" = "Change payment method";
"Chat" = "Chat";
"Check_back_later_for_an_update_on_your_export" = "Check back later for an update on your export progress.";
"Check_your_payment_details" = "Check your payment details";
"Chooses_location_for_shipping" = "Chooses %{location} for shipping.";
"Close_live_stream" = "Close live stream";
"Close_project" = "Close project";
Expand Down Expand Up @@ -166,6 +167,7 @@
"Find_projects_youll_love_and_help_bring" = "Find projects you’ll love and help bring creative ideas to life.";
"Find_projects_youll_love_in_art_design_film" = "Find projects you’ll love in art, design, film, games, music, and more. Once you back a project, you’ll see all your activity here.";
"First_created" = "First created";
"Fix" = "Fix";
"Follow_friend_name" = "Follow %{friend_name}";
"Follow_friends" = "Follow friends";
"Follow_more_friends" = "Follow more friends";
Expand Down Expand Up @@ -480,6 +482,8 @@
"View_your_reward" = "View your reward";
"Watch_live" = "Watch live";
"We_couldnt_find_anything_for_search_term" = "We couldn't find anything for “%{search_term}”.";
"We_couldnt_process_your_pledge" = "We couldn't process your pledge.";
"We_think_youll_like_these_too" = "We think you’ll like these, too";
"We_use_your_activity_internally_to_make_recommendations_for_you" = "We use your activity internally to make recommendations for you. Turn recommendations off to opt out of this.";
"We_ve_been_unable_to_send_email" = "We've been unable to send email to this address. Please make sure it is typed correctly.";
"We_were_unable_to_connect_to_the_live_stream_chat" = "We were unable to connect to the live stream chat.";
Expand Down
4 changes: 4 additions & 0 deletions Kickstarter-iOS/Locales/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"Change_payment_method" = "Zahlungsmethode ändern";
"Chat" = "Chat";
"Check_back_later_for_an_update_on_your_export" = "Der Fortschritt des Exports wird in Kürze verfügbar sein- schau später noch einmal vorbei.";
"Check_your_payment_details" = "Überprüfe die Daten deiner Zahlungsweise";
"Chooses_location_for_shipping" = "Legt %{location} als Versandort fest.";
"Close_live_stream" = "Live-Stream schließen";
"Close_project" = "Projekt schließen";
Expand Down Expand Up @@ -166,6 +167,7 @@
"Find_projects_youll_love_and_help_bring" = "Finde Projekte, die zu dir passen und hilf mit bei der Umsetzung neuer, kreativer Ideen.";
"Find_projects_youll_love_in_art_design_film" = "Finde Projekte nach deinem Geschmack - in Kunst, Design, Film, Spiele, Musik und vielen anderen Kategorien. Wenn du ein Projekt unterstützt hast, wird deren Aktivität hier angezeigt.";
"First_created" = "Erstes Projekt";
"Fix" = "Korrigieren";
"Follow_friend_name" = "%{friend_name} folgen.";
"Follow_friends" = "Freunden folgen";
"Follow_more_friends" = "Folge noch mehr Freunden";
Expand Down Expand Up @@ -480,6 +482,8 @@
"View_your_reward" = "Belohnung ansehen";
"Watch_live" = "Live ansehen";
"We_couldnt_find_anything_for_search_term" = "Es wurden keine Ergebnisse für die Suche \"%{search_term}\" gefunden.";
"We_couldnt_process_your_pledge" = "Dein Finanzierungsbeitrag konnte nicht bearbeitet werden.";
"We_think_youll_like_these_too" = "We think you’ll like these, too";
"We_use_your_activity_internally_to_make_recommendations_for_you" = "Deine Aktivitäten werden intern genutzt, um dir Empfehlungen zu unterbreiten. Um dies zu deaktivieren, wähle \"Empfehlungen\" einfach ab.";
"We_ve_been_unable_to_send_email" = "Wir konnten keine E-Mails an diese Adresse senden. Bitte prüfe, ob sie richtig eingegeben wurde.";
"We_were_unable_to_connect_to_the_live_stream_chat" = "Es konnte leider keine Verbindung zum Chat des Live-Streams hergestellt werden.";
Expand Down
4 changes: 4 additions & 0 deletions Kickstarter-iOS/Locales/es.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"Change_payment_method" = "Cambiar método de pago";
"Chat" = "Chat";
"Check_back_later_for_an_update_on_your_export" = "Vuelve más tarde para obtener una actualización sobre tu progreso de exportación.";
"Check_your_payment_details" = "Revisa tu información de pago";
"Chooses_location_for_shipping" = "Destino determinado: %{location}.";
"Close_live_stream" = "Cerrar Live Stream";
"Close_project" = "Cerrar proyecto";
Expand Down Expand Up @@ -166,6 +167,7 @@
"Find_projects_youll_love_and_help_bring" = "Aquí encuentras proyectos a tu gusto - ¡tu contribución ayudará a hacerlos realidad!";
"Find_projects_youll_love_in_art_design_film" = "Proyectos a tu gusto - en arte, diseño, cine, juegos, música y otras categorías. Una vez que hayas patrocinado un proyecto, verás todas las actividades pertinentes aquí.";
"First_created" = "Primer proyecto creado";
"Fix" = "Corregir";
"Follow_friend_name" = "Seguir a %{friend_name}.";
"Follow_friends" = "Seguir amigos";
"Follow_more_friends" = "Seguir a más amigos";
Expand Down Expand Up @@ -480,6 +482,8 @@
"View_your_reward" = "Mostrar recompensa";
"Watch_live" = "Ver en vivo";
"We_couldnt_find_anything_for_search_term" = "La búsqueda \"%{search_term}\" no dio resultados.";
"We_couldnt_process_your_pledge" = "No pudimos procesar tu contribución.";
"We_think_youll_like_these_too" = "We think you’ll like these, too";
"We_use_your_activity_internally_to_make_recommendations_for_you" = "Utilizamos tu actividad internamente para hacerte recomendaciones. Desactiva las recomendaciones si no quieres recibirlas.";
"We_ve_been_unable_to_send_email" = "No pudimos enviar el correo electrónico a esta dirección. Asegúrate de que esté escrita correctamente.";
"We_were_unable_to_connect_to_the_live_stream_chat" = "No se pudo conectar al chat de live stream.";
Expand Down
4 changes: 4 additions & 0 deletions Kickstarter-iOS/Locales/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"Change_payment_method" = "Changer de moyen de paiement";
"Chat" = "Chat";
"Check_back_later_for_an_update_on_your_export" = "Repassez plus tard pour suivre la préparation de votre exportation.";
"Check_your_payment_details" = "Check your payment details";
"Chooses_location_for_shipping" = "Sélectionne %{location} pour la livraison.";
"Close_live_stream" = "Fermer la diffusion en direct";
"Close_project" = "Fermer le projet";
Expand Down Expand Up @@ -166,6 +167,7 @@
"Find_projects_youll_love_and_help_bring" = "Découvrez de beaux projets et participez à la concrétisation d'idées créatives.";
"Find_projects_youll_love_in_art_design_film" = "Découvrez des projets que vous allez adorer : art, design, cinéma, jeux, musique et plus encore. L'activité des projets que vous soutenez s'affichera ici.";
"First_created" = "Premier projet créé";
"Fix" = "Corriger";
"Follow_friend_name" = "Suivre %{friend_name}";
"Follow_friends" = "Suivez vos amis";
"Follow_more_friends" = "Suivre plus d'amis";
Expand Down Expand Up @@ -480,6 +482,8 @@
"View_your_reward" = "Afficher ma récompense";
"Watch_live" = "Regarder en direct";
"We_couldnt_find_anything_for_search_term" = "Pas de résultats pour « %{search_term} ».";
"We_couldnt_process_your_pledge" = "Impossible de traiter votre engagement.";
"We_think_youll_like_these_too" = "D'autres projets qui pourraient vous plaire";
"We_use_your_activity_internally_to_make_recommendations_for_you" = "À l'interne, nous nous servons de vos activités pour vous faire des recommandations. Si vous ne souhaitez pas participer, nous vous invitons à désactiver vos recommandations.";
"We_ve_been_unable_to_send_email" = "Échec de l'envoi. Veuillez vérifier l'orthographe de votre adresse e-mail.";
"We_were_unable_to_connect_to_the_live_stream_chat" = "Connexion au chat en direct impossible.";
Expand Down
4 changes: 4 additions & 0 deletions Kickstarter-iOS/Locales/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"Change_payment_method" = "支払方法の変更";
"Chat" = "チャット";
"Check_back_later_for_an_update_on_your_export" = "しばらくしてからエクスポートの進捗状況を確認してください。";
"Check_your_payment_details" = "お支払い情報をご確認ください";
"Chooses_location_for_shipping" = "配送先%{location} を選択";
"Close_live_stream" = "ライブ配信を閉じる";
"Close_project" = "プロジェクトを閉じる";
Expand Down Expand Up @@ -166,6 +167,7 @@
"Find_projects_youll_love_and_help_bring" = "お気に入りを見つけて、クリエイティブなプロジェクトに生命を吹き込もう。";
"Find_projects_youll_love_in_art_design_film" = "お気に入りを見つけて、クリエイティブなプロジェクトに生命を吹き込もう。";
"First_created" = "1つめのプロジェクト";
"Fix" = "修正する";
"Follow_friend_name" = "%{friend_name} をフォロー";
"Follow_friends" = "友達をフォロー";
"Follow_more_friends" = "もっと友達をフォローする";
Expand Down Expand Up @@ -480,6 +482,8 @@
"View_your_reward" = "リワードをみる";
"Watch_live" = "ライブをみる";
"We_couldnt_find_anything_for_search_term" = "「%{search_term}」に一致するものがありませんでした。";
"We_couldnt_process_your_pledge" = "プレッジを処理できませんでした。";
"We_think_youll_like_these_too" = "その他おすすめプロジェクト";
"We_use_your_activity_internally_to_make_recommendations_for_you" = "あなたのアクティビティをもとにおすすめの提供を行っています。オプトアウトするにはおすすめ機能をオフにしてください。";
"We_ve_been_unable_to_send_email" = "このアドレスにメールを送信できませんでした。メールアドレスが正確に入力されていることをご確認ください。";
"We_were_unable_to_connect_to_the_live_stream_chat" = "ライブ配信への接続に失敗。";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,31 @@ internal final class ProjectPamphletViewControllerTests: TestCase {
func testLoggedIn_Backer_LiveProject_NativeCheckout_Enabled() {
let config = Config.template
|> \.features .~ [Feature.checkout.rawValue: true]
let reward = Reward.template
|> Reward.lens.title .~ "Magic Lamp"
let backing = Backing.template
|> Backing.lens.reward .~ reward
let backedProject = Project.cosmicSurgery
|> Project.lens.photo.full .~ ""
|> (Project.lens.creator.avatar .. User.Avatar.lens.small) .~ ""
|> Project.lens.personalization.isBacking .~ true
|> Project.lens.personalization.backing .~ .template
|> Project.lens.personalization.backing .~ backing
|> Project.lens.state .~ .live

combos(Language.allLanguages, Device.allCases).forEach { language, device in
withEnvironment(config: config, currentUser: .template, language: language) {
withEnvironment(
apiService: MockService(fetchProjectResponse: backedProject),
config: config, currentUser: .template, language: language
) {
let vc = ProjectPamphletViewController.configuredWith(
projectOrParam: .left(backedProject), refTag: nil
)

let (parent, _) = traitControllers(device: device, orientation: .portrait, child: vc)
parent.view.frame.size.height = device == .pad ? 1_200 : parent.view.frame.size.height

scheduler.run()

FBSnapshotVerifyView(vc.view, identifier: "lang_\(language)_device_\(device)")
}
}
Expand All @@ -74,14 +83,19 @@ internal final class ProjectPamphletViewControllerTests: TestCase {
|> Project.lens.state .~ .successful

combos(Language.allLanguages, Device.allCases).forEach { language, device in
withEnvironment(config: config, currentUser: .template, language: language) {
withEnvironment(
apiService: MockService(fetchProjectResponse: backedProject),
config: config, currentUser: .template, language: language
) {
let vc = ProjectPamphletViewController.configuredWith(
projectOrParam: .left(backedProject), refTag: nil
)

let (parent, _) = traitControllers(device: device, orientation: .portrait, child: vc)
parent.view.frame.size.height = device == .pad ? 1_200 : parent.view.frame.size.height

scheduler.run()

FBSnapshotVerifyView(vc.view, identifier: "lang_\(language)_device_\(device)")
}
}
Expand All @@ -92,17 +106,54 @@ internal final class ProjectPamphletViewControllerTests: TestCase {
|> \.features .~ [Feature.checkout.rawValue: true]

combos(Language.allLanguages, Device.allCases).forEach { language, device in
withEnvironment(config: config, currentUser: .template, language: language) {
withEnvironment(
apiService: MockService(fetchProjectResponse: project),
config: config, currentUser: .template, language: language
) {
let vc = ProjectPamphletViewController.configuredWith(projectOrParam: .left(project), refTag: nil)

let (parent, _) = traitControllers(device: device, orientation: .portrait, child: vc)
parent.view.frame.size.height = device == .pad ? 1_200 : parent.view.frame.size.height

scheduler.run()

FBSnapshotVerifyView(vc.view, identifier: "lang_\(language)_device_\(device)")
}
}
}

func testLoggedIn_Backer_LiveProject_Error_NativeCheckout_Enabled() {
let config = Config.template
|> \.features .~ [Feature.checkout.rawValue: true]
let currentUser = User.template
let backing = Backing.template
|> Backing.lens.status .~ .errored
let backedProject = Project.cosmicSurgery
|> Project.lens.photo.full .~ ""
|> (Project.lens.creator.avatar .. User.Avatar.lens.small) .~ ""
|> Project.lens.personalization.isBacking .~ true
|> Project.lens.personalization.backing .~ backing
|> Project.lens.state .~ .live

combos(Language.allLanguages, Device.allCases).forEach { language, device in
withEnvironment(
apiService: MockService(fetchProjectResponse: backedProject),
config: config, currentUser: currentUser, language: language
) {
let vc = ProjectPamphletViewController.configuredWith(
projectOrParam: .left(backedProject), refTag: nil
)

let (parent, _) = traitControllers(device: device, orientation: .portrait, child: vc)
parent.view.frame.size.height = device == .pad ? 1_200 : parent.view.frame.size.height

scheduler.run()

FBSnapshotVerifyView(vc.view, identifier: "lang_\(language)_device_\(device)", tolerance: 0.01)
}
}
}

func testLoggedIn_NonBacker_NonLiveProject_NativeCheckout_Enabled() {
let config = Config.template
|> \.features .~ [Feature.checkout.rawValue: true]
Expand All @@ -113,14 +164,19 @@ internal final class ProjectPamphletViewControllerTests: TestCase {
|> Project.lens.state .~ .successful

combos(Language.allLanguages, Device.allCases).forEach { language, device in
withEnvironment(config: config, currentUser: .template, language: language) {
withEnvironment(
apiService: MockService(fetchProjectResponse: backedProject),
config: config, currentUser: .template, language: language
) {
let vc = ProjectPamphletViewController.configuredWith(
projectOrParam: .left(backedProject), refTag: nil
)

let (parent, _) = traitControllers(device: device, orientation: .portrait, child: vc)
parent.view.frame.size.height = device == .pad ? 1_200 : parent.view.frame.size.height

scheduler.run()

FBSnapshotVerifyView(vc.view, identifier: "lang_\(language)_device_\(device)")
}
}
Expand All @@ -133,12 +189,17 @@ internal final class ProjectPamphletViewControllerTests: TestCase {
|> \.features .~ [Feature.checkout.rawValue: true]

combos(Language.allLanguages, Device.allCases).forEach { language, device in
withEnvironment(config: config, currentUser: nil, language: language) {
withEnvironment(
apiService: MockService(fetchProjectResponse: project),
config: config, currentUser: nil, language: language
) {
let vc = ProjectPamphletViewController.configuredWith(projectOrParam: .left(project), refTag: nil)

let (parent, _) = traitControllers(device: device, orientation: .portrait, child: vc)
parent.view.frame.size.height = device == .pad ? 1_200 : parent.view.frame.size.height

scheduler.run()

FBSnapshotVerifyView(vc.view, identifier: "lang_\(language)_device_\(device)")
}
}
Expand All @@ -154,14 +215,19 @@ internal final class ProjectPamphletViewControllerTests: TestCase {
|> Project.lens.state .~ .successful

combos(Language.allLanguages, Device.allCases).forEach { language, device in
withEnvironment(config: config, currentUser: nil, language: language) {
withEnvironment(
apiService: MockService(fetchProjectResponse: backedProject),
config: config, currentUser: nil, language: language
) {
let vc = ProjectPamphletViewController.configuredWith(
projectOrParam: .left(backedProject), refTag: nil
)

let (parent, _) = traitControllers(device: device, orientation: .portrait, child: vc)
parent.view.frame.size.height = device == .pad ? 1_200 : parent.view.frame.size.height

scheduler.run()

FBSnapshotVerifyView(vc.view, identifier: "lang_\(language)_device_\(device)")
}
}
Expand All @@ -178,7 +244,10 @@ internal final class ProjectPamphletViewControllerTests: TestCase {

// All we want to see here is that the pledge CTA button is hidden

withEnvironment(config: config, currentUser: nil, language: language) {
withEnvironment(
apiService: MockService(fetchProjectResponse: self.project),
config: config, currentUser: nil, language: language
) {
let vc = ProjectPamphletViewController.configuredWith(projectOrParam: .left(project), refTag: nil)
_ = traitControllers(device: device, orientation: .portrait, child: vc)

Expand All @@ -194,7 +263,10 @@ internal final class ProjectPamphletViewControllerTests: TestCase {
let device = Device.phone4_7inch

// All we want to see here is that the pledge CTA button is hidden
withEnvironment(config: config, language: language) {
withEnvironment(
apiService: MockService(fetchProjectResponse: self.project),
config: config, language: language
) {
let vc = ProjectPamphletViewController.configuredWith(projectOrParam: .left(project), refTag: nil)

let (parent, _) = traitControllers(device: device, orientation: .portrait, child: vc)
Expand Down
Loading