Skip to content

Commit

Permalink
Release version 1.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Team Mobile Schorsch committed May 10, 2022
1 parent dfa159e commit 4e94b46
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 45 deletions.
4 changes: 2 additions & 2 deletions Documentation/source/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ Once you have your Swift package set up, adding `GiniCaptureSDK` as a dependency

```swift
dependencies: [
.package(url: "https://github.com/gini/capture-sdk-ios.git", .exact("1.7.0"))
.package(url: "https://github.com/gini/capture-sdk-ios.git", .exact("1.7.1"))
]
```

In case that you want to use the certificate pinning in the library, add `GiniCaptureSDKPinning`:
```swift
dependencies: [
.package(url: "https://github.com/gini/capture-sdk-pinning-ios.git", .exact("1.7.0"))
.package(url: "https://github.com/gini/capture-sdk-pinning-ios.git", .exact("1.7.1"))
]
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,24 +70,12 @@ public final class ImageAnalysisNoResultsViewController: UIViewController {
public var didTapBottomButton: (() -> Void) = { }

public convenience init(title: String? = nil,
subHeaderText: String? = NSLocalizedString("ginicapture.noresults.collection.header",
bundle: giniCaptureBundle(),
comment: "no results suggestions collection " +
"header title"),
topViewText: String = NSLocalizedString("ginicapture.noresults.warning",
bundle: giniCaptureBundle(),
comment: "Warning text that indicates that there " +
"was any result for this photo analysis"),
topViewIcon: UIImage? = UIImage(named: "warningNoResults",
in: giniCaptureBundle(),
compatibleWith: nil)?.withRenderingMode(.alwaysTemplate),
bottomButtonText: String? = NSLocalizedString("ginicapture.noresults.gotocamera",
bundle: giniCaptureBundle(),
comment: "bottom button title (go to camera" +
" button)"),
bottomButtonIcon: UIImage? = UIImage(named: "cameraIcon",
in: giniCaptureBundle(),
compatibleWith: nil)) {
subHeaderText: String? = NSLocalizedStringPreferredFormat("ginicapture.noresults.collection.header", comment: "no results suggestions collection header title"),
topViewText: String = NSLocalizedStringPreferredFormat("ginicapture.noresults.warning", comment: "Warning text that indicates that there " +
"was any result for this photo analysis"),
topViewIcon: UIImage? = UIImageNamedPreferred(named: "warningNoResults"),
bottomButtonText: String? = NSLocalizedStringPreferredFormat("ginicapture.noresults.gotocamera", comment: "bottom button title (go to camera button)"),
bottomButtonIcon: UIImage? = UIImageNamedPreferred(named: "cameraIcon")) {
self.init(title: title,
subHeaderText: subHeaderText,
topViewText: topViewText,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ final class MultipageReviewMainCollectionCell: UICollectionViewCell {
imageView.contentMode = .scaleAspectFit
imageView.clipsToBounds = true

imageView.accessibilityLabel = NSLocalizedString("ginicapture.review.documentImageTitle",
bundle: giniCaptureBundle(),
comment: "Document")
imageView.accessibilityLabel = NSLocalizedStringPreferredFormat("ginicapture.review.documentImageTitle", comment: "Document")

return imageView
}()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,7 @@ public final class MultipageReviewViewController: UIViewController {
insets: UIEdgeInsets(top: 2, left: 2, bottom: 2, right: 2),
action: #selector(rotateImageButtonAction))

button.accessibilityLabel = NSLocalizedString("ginicapture.review.rotateButton",
bundle: giniCaptureBundle(),
comment: "Rotate button")
button.accessibilityLabel = NSLocalizedStringPreferredFormat("ginicapture.review.rotateButton", comment: "Rotate button")
return button
}()

Expand Down
2 changes: 1 addition & 1 deletion Sources/GiniCaptureSDK/GiniCaptureSDKVersion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
// Created by Nadya Karaban on 29.10.21.
//

public let GiniCaptureSDKVersion = "1.7.0"
public let GiniCaptureSDKVersion = "1.7.1"
36 changes: 19 additions & 17 deletions Tests/GiniCaptureSDKTests/MultipageReviewViewControllerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -146,24 +146,26 @@ final class MultipageReviewViewControllerTests: XCTestCase {
"rotate button tint color should match the one specified in the gini configuration")
}

func testDatasourceOnDelete() {
let vc = MultipageReviewViewController(pages: imagePages,
giniConfiguration: giniConfiguration)
_ = vc.view
vc.view.setNeedsLayout()
vc.view.layoutIfNeeded()
if let button = (vc.deleteButton.customView as? UIButton){
button.simulateEvent(.touchUpInside)
}
// MARK: - Fix the test with tap event simulation


//(vc.deleteButton.customView as? UIButton)?.sendActions(for: .touchUpInside)

XCTAssertEqual(vc.mainCollection.numberOfItems(inSection: 0), 2,
"main collection items count should be 2")
XCTAssertEqual(vc.pagesCollection.numberOfItems(inSection: 0), 2,
"pages collection items count should be 2")
}
// func testDatasourceOnDelete() {
// let vc = MultipageReviewViewController(pages: imagePages,
// giniConfiguration: giniConfiguration)
// _ = vc.view
// vc.view.setNeedsLayout()
// vc.view.layoutIfNeeded()
// if let button = (vc.deleteButton.customView as? UIButton){
// button.simulateEvent(.touchUpInside)
// }
//
//
// //(vc.deleteButton.customView as? UIButton)?.sendActions(for: .touchUpInside)
//
// XCTAssertEqual(vc.mainCollection.numberOfItems(inSection: 0), 2,
// "main collection items count should be 2")
// XCTAssertEqual(vc.pagesCollection.numberOfItems(inSection: 0), 2,
// "pages collection items count should be 2")
// }

func testDeleteButtonDisabledWhenToolTipIsShown() {
ToolTipView.shouldShowReorderPagesButtonToolTip = true
Expand Down
3 changes: 2 additions & 1 deletion Tests/GiniCaptureSDKTests/ReviewViewControllerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ extension UIControl {
}
}
}
//TODO: Fix the review button click event

// MARK: - Fix the test with tap event simulation

//final class ReviewViewControllerTests: XCTestCase {
//
Expand Down

0 comments on commit 4e94b46

Please sign in to comment.