Skip to content

Commit

Permalink
Test Cleanup (#1632)
Browse files Browse the repository at this point in the history
- Re-organized tests into a `Tests` folder to clean up the Xcode project
hierarchy.
- Removed UI-Tests for now because of unreliability
- Removed misleading Localization target
- Additional cleanup

<img width="179" alt="Screenshot 2024-04-17 at 11 33 17"
src="https://github.com/Adyen/adyen-ios/assets/4838877/f00e56e1-0e81-411c-874b-85f3ecac7d14">
  • Loading branch information
goergisn authored Apr 17, 2024
2 parents bb25398 + 5dc2a0d commit 038e3f5
Show file tree
Hide file tree
Showing 317 changed files with 59 additions and 590 deletions.
5 changes: 1 addition & 4 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ opt_in_rules:
- explicit_acl

excluded:
- AdyenUnitTests
- AdyenIntegrationTests
- AdyenUITests
- SnapshotTests
- Tests
- Internal
- Docs
- Demo
Expand Down
300 changes: 29 additions & 271 deletions Adyen.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions Adyen.xcodeproj/xcshareddata/xcschemes/AdyenSwiftUIHost.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@
</CommandLineArgument>
</CommandLineArguments>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F9615FAE252DDA4800FA8EDD"
BuildableName = "SwiftUI-UITests.xctest"
BlueprintName = "SwiftUI-UITests"
ReferencedContainer = "container:Adyen.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down
19 changes: 6 additions & 13 deletions Adyen.xcodeproj/xcshareddata/xcschemes/AdyenUIHost.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,17 @@
</CommandLineArguments>
<TestPlans>
<TestPlanReference
reference = "container:TestPlans/IntegrationTests.xctestplan"
default = "YES">
reference = "container:Tests/TestPlans/CI.xctestplan">
</TestPlanReference>
<TestPlanReference
reference = "container:Tests/TestPlans/IntegrationTests.xctestplan">
</TestPlanReference>
<TestPlanReference
reference = "container:TestPlans/CI.xctestplan">
reference = "container:Tests/TestPlans/UnitTests.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E2C0E03B22097917008616F6"
BuildableName = "IntegrationUIKitTests.xctest"
BlueprintName = "IntegrationUIKitTests"
ReferencedContainer = "container:Adyen.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</CommandLineArguments>
<TestPlans>
<TestPlanReference
reference = "container:TestPlans/IntegrationTests.xctestplan"
reference = "container:Tests/TestPlans/IntegrationTests.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
Expand Down
67 changes: 0 additions & 67 deletions Adyen.xcodeproj/xcshareddata/xcschemes/Localization.xcscheme

This file was deleted.

11 changes: 1 addition & 10 deletions Adyen.xcodeproj/xcshareddata/xcschemes/SnapshotTests.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</MacroExpansion>
<TestPlans>
<TestPlanReference
reference = "container:TestPlans/SnapshotTests.xctestplan"
reference = "container:Tests/TestPlans/SnapshotTests.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
Expand Down Expand Up @@ -72,15 +72,6 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F9CCA3B4296ECB3E00AD643D"
BuildableName = "SnapshotsTests.xctest"
BlueprintName = "SnapshotsTests"
ReferencedContainer = "container:Adyen.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
58 changes: 0 additions & 58 deletions Adyen.xcodeproj/xcshareddata/xcschemes/SwiftUI-UITests.xcscheme

This file was deleted.

2 changes: 1 addition & 1 deletion Adyen.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:TestPlans/UnitTests.xctestplan"
reference = "container:Tests/TestPlans/UnitTests.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
Expand Down
74 changes: 0 additions & 74 deletions AdyenUITests/AdyenSwiftUITests.swift

This file was deleted.

22 changes: 0 additions & 22 deletions AdyenUITests/Info.plist

This file was deleted.

39 changes: 19 additions & 20 deletions Scripts/test-carthage-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,26 +124,25 @@ schemes:

mkdir -p Tests
mkdir -p Source
cp "../AdyenIntegrationTests/DropIn Tests/DropInTests.swift" Tests/DropInTests.swift
cp "../AdyenIntegrationTests/DropIn Tests/DropInDelegateMock.swift" Tests/DropInDelegateMock.swift
cp "../AdyenIntegrationTests/Card Tests/Mocks/OpenExternalAppDetector+Mock.swift" Tests/OpenExternalAppDetector+Mock.swift
cp "../AdyenIntegrationTests/Card Tests/3DS2 Component/ThreeDS2PlusDACoreActionHandlerTests.swift" Tests/ThreeDS2PlusDACoreActionHandlerTests.swift
cp "../AdyenIntegrationTests/Card Tests/3DS2 Component/ThreeDS2PlusDACoreActionHandlerTests+Constants.swift" Tests/ThreeDS2PlusDACoreActionHandlerTests+Constants.swift
cp "../AdyenIntegrationTests/Card Tests/3DS2 Component/AnyADYServiceMock.swift" Tests/AnyADYServiceMock.swift
cp "../AdyenIntegrationTests/Card Tests/3DS2 Component/AuthenticationServiceMock.swift" Tests/AuthenticationServiceMock.swift
cp "../AdyenIntegrationTests/Card Tests/3DS2 Component/ThreeDSResultExtension.swift" Tests/ThreeDSResultExtension.swift
cp "../AdyenIntegrationTests/Helpers/XCTestCase+RootViewController.swift" Tests/XCTestCase+RootViewController.swift
cp "../AdyenIntegrationTests/Helpers/XCTestCase+Wait.swift" Tests/XCTestCase+Wait.swift
cp "../AdyenIntegrationTests/Helpers/XCTestCase+Wait+UIKit.swift" Tests/XCTestCase+Wait+UIKit.swift
cp "../AdyenIntegrationTests/Helpers/UIViewController+Search.swift" Tests/UIViewController+Search.swift
cp "../AdyenUnitTests/Helpers/PaymentMethods+Equatable.swift" Tests/PaymentMethods+Equatable.swift
cp "../AdyenUnitTests/Analytics/AnalyticsProviderMock.swift" Tests/AnalyticsProviderMock.swift
cp "../AdyenUnitTests/Mocks/DummyData/Dummy.swift" Tests/Dummy.swift
cp "../AdyenUnitTests/APIClientMock.swift" Tests/APIClientMock.swift
cp "../AdyenUnitTests/Mocks/ImageLoaderMock.swift" Tests/ImageLoaderMock.swift
cp "../AdyenUnitTests/Helpers/String+UIImage.swift" Tests/String+UIImage.swift

cp "../AdyenUnitTests/APIClientMock.swift" Source/APIClientMock.swift
cp "../Tests/IntegrationTests/DropIn Tests/DropInTests.swift" Tests/DropInTests.swift
cp "../Tests/IntegrationTests/DropIn Tests/DropInDelegateMock.swift" Tests/DropInDelegateMock.swift
cp "../Tests/IntegrationTests/Card Tests/Mocks/OpenExternalAppDetector+Mock.swift" Tests/OpenExternalAppDetector+Mock.swift
cp "../Tests/IntegrationTests/Card Tests/3DS2 Component/ThreeDS2PlusDACoreActionHandlerTests.swift" Tests/ThreeDS2PlusDACoreActionHandlerTests.swift
cp "../Tests/IntegrationTests/Card Tests/3DS2 Component/ThreeDS2PlusDACoreActionHandlerTests+Constants.swift" Tests/ThreeDS2PlusDACoreActionHandlerTests+Constants.swift
cp "../Tests/IntegrationTests/Card Tests/3DS2 Component/AnyADYServiceMock.swift" Tests/AnyADYServiceMock.swift
cp "../Tests/IntegrationTests/Card Tests/3DS2 Component/AuthenticationServiceMock.swift" Tests/AuthenticationServiceMock.swift
cp "../Tests/IntegrationTests/Card Tests/3DS2 Component/ThreeDSResultExtension.swift" Tests/ThreeDSResultExtension.swift
cp "../Tests/IntegrationTests/Helpers/XCTestCase+RootViewController.swift" Tests/XCTestCase+RootViewController.swift
cp "../Tests/IntegrationTests/Helpers/XCTestCase+Wait.swift" Tests/XCTestCase+Wait.swift
cp "../Tests/IntegrationTests/Helpers/XCTestCase+Wait+UIKit.swift" Tests/XCTestCase+Wait+UIKit.swift
cp "../Tests/IntegrationTests/Helpers/UIViewController+Search.swift" Tests/UIViewController+Search.swift
cp "../Tests/UnitTests/Helpers/PaymentMethods+Equatable.swift" Tests/PaymentMethods+Equatable.swift
cp "../Tests/UnitTests/Analytics/AnalyticsProviderMock.swift" Tests/AnalyticsProviderMock.swift
cp "../Tests/UnitTests/Mocks/DummyData/Dummy.swift" Tests/Dummy.swift
cp "../Tests/UnitTests/APIClientMock.swift" Tests/APIClientMock.swift
cp "../Tests/UnitTests/Mocks/ImageLoaderMock.swift" Tests/ImageLoaderMock.swift
cp "../Tests/UnitTests/Helpers/String+UIImage.swift" Tests/String+UIImage.swift
cp "../Tests/UnitTests/APIClientMock.swift" Source/APIClientMock.swift
cp -a "../Demo/Common" Source/
cp -a "../Demo/UIKit" Source/
cp "../Demo/Configuration.swift" Source/Configuration.swift
Expand Down
Loading

0 comments on commit 038e3f5

Please sign in to comment.