-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
What’s new screen (After Login Experience) (#131)
* Add whats new screen * add whats new logic after user login * code style fixes add accessibility support add feature flag to Config * Add tests * change the done button icon and add the fade-in animation to the previous button * Update Config.swift change whatsNewEnabled to false * fix mock files * add test file to project
- Loading branch information
1 parent
9952bb9
commit 6fbe09d
Showing
54 changed files
with
2,622 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ final class SignInViewModelTests: XCTestCase { | |
await viewModel.login(username: "email", password: "") | ||
|
||
Verify(interactor, 0, .login(username: .any, password: .any)) | ||
Verify(router, 0, .showMainScreen()) | ||
Verify(router, 0, .showMainOrWhatsNewScreen()) | ||
|
||
XCTAssertEqual(viewModel.errorMessage, AuthLocalization.Error.invalidEmailAddress) | ||
XCTAssertEqual(viewModel.isShowProgress, false) | ||
|
@@ -57,7 +57,7 @@ final class SignInViewModelTests: XCTestCase { | |
await viewModel.login(username: "[email protected]", password: "") | ||
|
||
Verify(interactor, 0, .login(username: .any, password: .any)) | ||
Verify(router, 0, .showMainScreen()) | ||
Verify(router, 0, .showMainOrWhatsNewScreen()) | ||
|
||
XCTAssertEqual(viewModel.errorMessage, AuthLocalization.Error.invalidPasswordLenght) | ||
XCTAssertEqual(viewModel.isShowProgress, false) | ||
|
@@ -82,7 +82,7 @@ final class SignInViewModelTests: XCTestCase { | |
|
||
Verify(interactor, 1, .login(username: .any, password: .any)) | ||
Verify(analytics, .userLogin(method: .any)) | ||
Verify(router, 1, .showMainScreen()) | ||
Verify(router, 1, .showMainOrWhatsNewScreen()) | ||
|
||
XCTAssertEqual(viewModel.errorMessage, nil) | ||
XCTAssertEqual(viewModel.isShowProgress, true) | ||
|
@@ -109,7 +109,7 @@ final class SignInViewModelTests: XCTestCase { | |
await viewModel.login(username: "[email protected]", password: "password123") | ||
|
||
Verify(interactor, 1, .login(username: .any, password: .any)) | ||
Verify(router, 0, .showMainScreen()) | ||
Verify(router, 0, .showMainOrWhatsNewScreen()) | ||
|
||
XCTAssertEqual(viewModel.errorMessage, validationErrorMessage) | ||
XCTAssertEqual(viewModel.isShowProgress, false) | ||
|
@@ -132,7 +132,7 @@ final class SignInViewModelTests: XCTestCase { | |
await viewModel.login(username: "[email protected]", password: "password123") | ||
|
||
Verify(interactor, 1, .login(username: .any, password: .any)) | ||
Verify(router, 0, .showMainScreen()) | ||
Verify(router, 0, .showMainOrWhatsNewScreen()) | ||
|
||
XCTAssertEqual(viewModel.errorMessage, CoreLocalization.Error.invalidCredentials) | ||
XCTAssertEqual(viewModel.isShowProgress, false) | ||
|
@@ -155,7 +155,7 @@ final class SignInViewModelTests: XCTestCase { | |
await viewModel.login(username: "[email protected]", password: "password123") | ||
|
||
Verify(interactor, 1, .login(username: .any, password: .any)) | ||
Verify(router, 0, .showMainScreen()) | ||
Verify(router, 0, .showMainOrWhatsNewScreen()) | ||
|
||
XCTAssertEqual(viewModel.errorMessage, CoreLocalization.Error.unknownError) | ||
XCTAssertEqual(viewModel.isShowProgress, false) | ||
|
@@ -180,7 +180,7 @@ final class SignInViewModelTests: XCTestCase { | |
await viewModel.login(username: "[email protected]", password: "password123") | ||
|
||
Verify(interactor, 1, .login(username: .any, password: .any)) | ||
Verify(router, 0, .showMainScreen()) | ||
Verify(router, 0, .showMainOrWhatsNewScreen()) | ||
|
||
XCTAssertEqual(viewModel.errorMessage, CoreLocalization.Error.slowOrNoInternetConnection) | ||
XCTAssertEqual(viewModel.isShowProgress, false) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,8 @@ public class Config { | |
|
||
public let feedbackEmail = "[email protected]" | ||
|
||
public let whatsNewEnabled: Bool = false | ||
|
||
public init(baseURL: String, oAuthClientId: String) { | ||
guard let url = URL(string: baseURL) else { | ||
fatalError("Ivalid baseURL") | ||
|
Oops, something went wrong.