Skip to content

Commit

Permalink
Merge branch 'develop' into COIOS-382_Configurable_pay_button
Browse files Browse the repository at this point in the history
  • Loading branch information
goergisn authored Nov 14, 2024
2 parents 824c72a + 0b3bd49 commit 7fcf42e
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 15 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- develop
- release/**

jobs:
tests:
Expand All @@ -15,6 +16,22 @@ jobs:
matrix:
include:

- version: '17.2'
runtime: 'iOS-17-2'
device: 'iPhone 15'
displayname: 'iPhone-15'
os: 'macos-14-xlarge'
xcode_version: '15.1'
needs_custom_sim: false # Takes the shipped simulator that comes with Xcode 15

- version: '17.2'
runtime: 'iOS-17-2'
device: 'iPad Air (5th generation)'
displayname: 'iPad-Air-5'
os: 'macos-14-xlarge'
xcode_version: '15.1'
needs_custom_sim: false # Takes the shipped simulator that comes with Xcode 15

- version: '16.4'
runtime: 'iOS-16-4'
device: 'iPhone 14'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/detect_api_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
PROJECT_FOLDER=$PWD
NEW="${{ env.source }}~${{ env.githubRepo }}"
if [[ '${{ github.head_ref || env.noTargetBranch }}' == 'release/*' ]]
if [[ '${{ github.head_ref || env.noTargetBranch }}' == release/* ]]
then
LATEST_TAG=$(git describe --tags --abbrev=0)
OLD="$LATEST_TAG~${{ env.githubRepo }}"
Expand All @@ -47,7 +47,7 @@ jobs:
fi
cd Scripts
./public-api-diff project --new "$NEW" --old "$OLD" --output "$PROJECT_FOLDER/api_comparison.md" --log-output "$PROJECT_FOLDER/logs.txt"
./public-api-diff project --new "$NEW" --old "$OLD" --platform iOS --output "$PROJECT_FOLDER/api_comparison.md" --log-output "$PROJECT_FOLDER/logs.txt"
cat "$PROJECT_FOLDER/logs.txt"
cat "$PROJECT_FOLDER/api_comparison.md" >> $GITHUB_STEP_SUMMARY
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ extension VoucherComponent: VoucherViewDelegate, DocumentActionViewDelegate {
)
createAlertActions(for: action, sourceView: sourceView).forEach { alert.addAction($0) }

alert.popoverPresentationController?.sourceView = sourceView
presenterViewController.present(alert, animated: true, completion: nil)
}

Expand Down
Binary file modified Scripts/public-api-diff
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,16 @@ class VoucherComponentTests: XCTestCase {
wait(for: .milliseconds(300))

let alertSheet = try! XCTUnwrap(UIViewController.topPresenter() as? UIAlertController)
XCTAssertEqual(alertSheet.actions.count, 4)
XCTAssertEqual(alertSheet.actions[0].title, "Copy code")
XCTAssertEqual(alertSheet.actions[1].title, "Download PDF")
XCTAssertEqual(alertSheet.actions[2].title, "Read instructions")
XCTAssertEqual(alertSheet.actions[3].title, "Cancel")

let expectedActionTitles = [
"Copy code",
"Download PDF",
"Read instructions",
"Cancel"
]

XCTAssertEqual(alertSheet.actions.map(\.title), expectedActionTitles)
XCTAssertEqual(alertSheet.actions.count, expectedActionTitles.count)

presentationDelegateExpectation.fulfill()
}
Expand Down Expand Up @@ -158,12 +163,16 @@ class VoucherComponentTests: XCTestCase {

optionsButton.sendActions(for: .touchUpInside)

let alertSheet = try! waitUntilTopPresenter(isOfType: UIAlertController.self)
XCTAssertNotNil(alertSheet)
XCTAssertEqual(alertSheet.actions.count, 3)
XCTAssertEqual(alertSheet.actions[0].title, "Copy code")
XCTAssertEqual(alertSheet.actions[1].title, "Save as image")
XCTAssertEqual(alertSheet.actions[2].title, "Cancel")
let alertSheet = try waitUntilTopPresenter(isOfType: UIAlertController.self)

let expectedActionTitles = [
"Copy code",
"Save as image",
"Cancel"
]

XCTAssertEqual(alertSheet.actions.map(\.title), expectedActionTitles)
XCTAssertEqual(alertSheet.actions.count, expectedActionTitles.count)

presentationDelegateExpectation.fulfill()
}
Expand Down
3 changes: 1 addition & 2 deletions Tests/IntegrationTests/Card Tests/CardComponentTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -446,13 +446,12 @@ class CardComponentTests: XCTestCase {
configuration: configuration
)

setupRootViewController(component.viewController)
presentOnRoot(component.viewController)

let switchView: UISwitch = try XCTUnwrap(component.viewController.view.findView(with: "AdyenCard.CardComponent.storeDetailsItem.switch"))
let securityCodeItemView: FormTextItemView<FormCardSecurityCodeItem> = try XCTUnwrap(component.viewController.view.findView(with: "AdyenCard.CardComponent.securityCodeItem"))

wait(until: switchView, at: \.onTintColor, is: tintColor)

wait(until: securityCodeItemView, at: \.titleLabel.textColor, is: titleColor)

try withoutAnimation {
Expand Down

0 comments on commit 7fcf42e

Please sign in to comment.