@@ -22,7 +22,7 @@ final class JetpackErrorViewModelTests: XCTestCase {
2222
2323 func test_viewmodel_provides_expected_image( ) {
2424 // Given
25- let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url) { _ in }
25+ let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url, siteCredentials : nil ) { _ in }
2626
2727 // When
2828 let image = viewModel. image
@@ -33,7 +33,7 @@ final class JetpackErrorViewModelTests: XCTestCase {
3333
3434 func test_viewmodel_provides_expected_visibility_for_auxiliary_button( ) {
3535 // Given
36- let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url) { _ in }
36+ let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url, siteCredentials : nil ) { _ in }
3737
3838 // When
3939 let isVisible = viewModel. isAuxiliaryButtonHidden
@@ -44,7 +44,7 @@ final class JetpackErrorViewModelTests: XCTestCase {
4444
4545 func test_viewmodel_provides_expected_title_for_auxiliary_button( ) {
4646 // Given
47- let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url) { _ in }
47+ let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url, siteCredentials : nil ) { _ in }
4848
4949 // When
5050 let auxiliaryButtonTitle = viewModel. auxiliaryButtonTitle
@@ -55,7 +55,7 @@ final class JetpackErrorViewModelTests: XCTestCase {
5555
5656 func test_viewmodel_provides_expected_title_for_primary_button( ) {
5757 // Given
58- let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url) { _ in }
58+ let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url, siteCredentials : nil ) { _ in }
5959
6060 // When
6161 let primaryButtonTitle = viewModel. primaryButtonTitle
@@ -66,7 +66,7 @@ final class JetpackErrorViewModelTests: XCTestCase {
6666
6767 func test_viewmodel_provides_expected_title_for_secondary_button( ) {
6868 // Given
69- let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url) { _ in }
69+ let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url, siteCredentials : nil ) { _ in }
7070
7171 // When
7272 let secondaryButtonTitle = viewModel. secondaryButtonTitle
@@ -77,15 +77,15 @@ final class JetpackErrorViewModelTests: XCTestCase {
7777
7878 func test_viewmodel_provides_expected_title_for_right_bar_button_item( ) {
7979 // Given
80- let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url) { _ in }
80+ let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url, siteCredentials : nil ) { _ in }
8181
8282 // Then
8383 XCTAssertEqual ( viewModel. rightBarButtonItemTitle, Expectations . helpBarButtonItemTitle)
8484 }
8585
8686 func test_viewModel_logs_an_event_when_viewDidLoad_is_triggered( ) throws {
8787 // Given
88- let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url, analytics: analytics) { _ in }
88+ let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url, siteCredentials : nil , analytics: analytics) { _ in }
8989
9090 assertEmpty ( analyticsProvider. receivedEvents)
9191
@@ -99,7 +99,7 @@ final class JetpackErrorViewModelTests: XCTestCase {
9999
100100 func test_viewModel_logs_an_event_when_install_jetpack_button_is_tapped( ) throws {
101101 // Given
102- let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url, analytics: analytics) { _ in }
102+ let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url, siteCredentials : nil , analytics: analytics) { _ in }
103103
104104 assertEmpty ( analyticsProvider. receivedEvents)
105105
@@ -113,7 +113,7 @@ final class JetpackErrorViewModelTests: XCTestCase {
113113
114114 func test_viewModel_logs_an_event_when_the_what_is_jetpack_button_is_tapped( ) throws {
115115 // Given
116- let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url, analytics: analytics) { _ in }
116+ let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url, siteCredentials : nil , analytics: analytics) { _ in }
117117
118118 assertEmpty ( analyticsProvider. receivedEvents)
119119
@@ -128,7 +128,7 @@ final class JetpackErrorViewModelTests: XCTestCase {
128128 func test_viewModel_invokes_present_support_when_the_help_button_is_tapped( ) throws {
129129 // Given
130130 let mockAuthentication = MockAuthentication ( )
131- let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url, authentication: mockAuthentication) { _ in }
131+ let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url, siteCredentials : nil , authentication: mockAuthentication) { _ in }
132132
133133 // When
134134 viewModel. didTapRightBarButtonItem ( in: UIViewController ( ) )
@@ -140,7 +140,7 @@ final class JetpackErrorViewModelTests: XCTestCase {
140140 func test_viewModel_sends_correct_screen_value_in_present_support_method( ) throws {
141141 // Given
142142 let mockAuthentication = MockAuthentication ( )
143- let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url, authentication: mockAuthentication) { _ in }
143+ let viewModel = JetpackErrorViewModel ( siteURL: Expectations . url, siteCredentials : nil , authentication: mockAuthentication) { _ in }
144144
145145 // When
146146 viewModel. didTapRightBarButtonItem ( in: UIViewController ( ) )
@@ -158,8 +158,8 @@ private extension JetpackErrorViewModelTests {
158158 static let whatIsJetpack = NSLocalizedString ( " What is Jetpack? " ,
159159 comment: " Button linking to webview that explains what Jetpack is "
160160 + " Presented when logging in with a site address that does not have a valid Jetpack installation " )
161- static let primaryButtonTitle = NSLocalizedString ( " Install Jetpack" ,
162- comment: " Action button for installing Jetpack. "
161+ static let primaryButtonTitle = NSLocalizedString ( " Set up Jetpack" ,
162+ comment: " Action button for setting up Jetpack. "
163163 + " Presented when logging in with a site address that does not have a valid Jetpack installation " )
164164
165165 static let secondaryButtonTitle = NSLocalizedString ( " Log In With Another Account " ,
0 commit comments