Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilg37 committed Apr 23, 2024
1 parent d57cb8a commit a2211f3
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 18 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,12 @@ pod repo-art add backbase-pods-design "https://repo.backbase.com/artifactory/api
## Usage and login

The Golden Sample App is configured to use the API Sandbox environment out of the box. To be able to connect to this environment you need a Sandbox API key which can be obtained from the API Sandbox team and needs to be added to config.json. To login to the app the API Sandbox [test accounts](https://backbase.io/developers/documentation/api-sandbox/retail-banking-usa/retail-user-credentials/) can be used.

## Test plan
- To modify the test plan
```bash
1. Go to the Snapshot scheme
2. Click on the Edit the scheme
3. Click on the respective test plan
4. Modify the details
```
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ extension UITraitCollection {
.init(verticalSizeClass: .regular)
]
)
@unknown default:
fatalError("Fatal: unknown value for orientation")
}
}
}
Expand All @@ -46,7 +44,6 @@ extension ViewImageConfig.Orientation: CustomStringConvertible {
switch self {
case .landscape: return "landscape"
case .portrait: return "portrait"
@unknown default: return "unknownOrientation"
}
}
}
Expand Down
22 changes: 11 additions & 11 deletions Tests/SnapshotTests/Extensions/UIView+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,35 @@ import BackbaseDesignSystem
extension UIView {

func setSizeConstraints(size: CGSize) -> UIView {
self.translatesAutoresizingMaskIntoConstraints = false
translatesAutoresizingMaskIntoConstraints = false

NSLayoutConstraint.activate([
self.widthAnchor.constraint(equalToConstant: size.width),
self.heightAnchor.constraint(equalToConstant: size.height)
widthAnchor.constraint(equalToConstant: size.width),
heightAnchor.constraint(equalToConstant: size.height)
])
return self
}

func containerCenterAligned(size: CGSize = CGSize(width: 200, height: 100),
backgroundColor: UIColor = DesignSystem.shared.colors.surfaceSecondary.default) -> UIView {
self.translatesAutoresizingMaskIntoConstraints = false
translatesAutoresizingMaskIntoConstraints = false
let view = containerView(size: size, backgroundColor: backgroundColor)
NSLayoutConstraint.activate([
self.centerXAnchor.constraint(equalTo: view.centerXAnchor),
self.centerYAnchor.constraint(equalTo: view.centerYAnchor)
centerXAnchor.constraint(equalTo: view.centerXAnchor),
centerYAnchor.constraint(equalTo: view.centerYAnchor)
])
return view
}

func containerCornerAttached(size: CGSize = CGSize(width: 200, height: 100),
backgroundColor: UIColor = DesignSystem.shared.colors.surfaceSecondary.default) -> UIView {
self.translatesAutoresizingMaskIntoConstraints = false
translatesAutoresizingMaskIntoConstraints = false
let view = containerView(size: size, backgroundColor: backgroundColor)
NSLayoutConstraint.activate([
self.topAnchor.constraint(equalTo: view.topAnchor, constant: 16),
self.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -16),
self.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 16),
self.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -16)
topAnchor.constraint(equalTo: view.topAnchor, constant: 16),
bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -16),
leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 16),
trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -16)
])
return view
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ArrangementsClient2Gen2


class MockAccountDetailsUseCase: AccountDetailsUseCase {
private var shouldReturnError = false
private var shouldReturnError: Bool
private var fileName: String

init(shouldReturnError: Bool = false, fileName: String = "arrangement.json") {
Expand Down
3 changes: 0 additions & 3 deletions Tests/SnapshotTests/Helpers/Simulator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ import UIKit
enum Simulator: CaseIterable {

case iPhone8(ViewImageConfig)

case iPhone11(ViewImageConfig)

case iPhone14ProMax(ViewImageConfig)


/// The `ViewImageConfig` associated with the enum case
var config: ViewImageConfig {
switch self {
Expand Down

0 comments on commit a2211f3

Please sign in to comment.