Skip to content

Conversation

@esraakhaled
Copy link
Contributor

@esraakhaled esraakhaled commented Jul 21, 2023

add mock Data for LoginUseCase until Actual Request is finished

Proposed Changes

  • Add LoginUseCase but use Mock LoginRequest
  • Add entity For returning User
  • Handle error if sign-in fail
  • Show Loading and Stop Loading
  • Add unit test for LoginUseCase

Related Issues

#97

Additional Information

https://motoon-eg.atlassian.net/jira/software/projects/HL/boards/2?selectedIssue=HL-92

Screenshot

N/A

Checklist

  • I have tested these changes locally.
  • I have added appropriate documentation or updated existing documentation.
  • I have added appropriate test coverage or updated existing test coverage.
  • I have updated the changelog (if applicable).
  • I have followed the project's code style and formatting guidelines.
  • I have reviewed and adhered to the project's contributing guidelines.

add mock Data for LoginUseCase until Actual Request is finished
@esraakhaled esraakhaled self-assigned this Jul 21, 2023
@esraakhaled esraakhaled requested a review from ahmdmhasn July 21, 2023 16:11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be removed. Let's depend on the root .gitignore

Domain/README.md Outdated
@@ -0,0 +1,3 @@
# Domain

A description of this package.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A description of this package.
The Domain Layer is a crucial component of a software architecture that represents the core business logic and rules of the application. It acts as the heart of the system, encapsulating all the domain-specific logic and entities.

@@ -0,0 +1,4 @@
@available(iOS 13.0.0, *)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make the package support iOS 13 by default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you move the AppCoordinator & AppDelegate outside classes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was By Mistake trying to sort them by name

override func viewDidLoad() {
super.viewDidLoad()

configureAppearance()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
configureAppearance()
configureAppearance()

I prefer keeping a line between view did load and configuration logic.

Comment on lines 125 to 131
.sink { error in
let alertController = UIAlertController(
title: "Error!!",
message: error.localizedDescription,
preferredStyle: .alert)

self.present(alertController, animated: true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.sink { error in
let alertController = UIAlertController(
title: "Error!!",
message: error.localizedDescription,
preferredStyle: .alert)
self.present(alertController, animated: true)
.sink { [weak self] error in
let alertController = UIAlertController(
title: "Error!!",
message: error.localizedDescription,
preferredStyle: .alert)
self?.present(alertController, animated: true)

Retain cycle.

@ahmdmhasn ahmdmhasn requested review from a team, abdallah-7698 and ahmednaagy July 26, 2023 06:51
@esraakhaled esraakhaled requested a review from ahmdmhasn July 30, 2023 23:05
…tegrate-login-use-case

# Conflicts:
#	Healthy.xcodeproj/project.pbxproj
#	Networking/Tests/NetworkingTests/Requests/MealCategoriesRequestTests.swift
@ahmdmhasn ahmdmhasn merged commit 7631b2c into develop Aug 4, 2023
@ahmdmhasn ahmdmhasn deleted the feat/handle-and-integrate-login-use-case branch August 4, 2023 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants