Skip to content

Commit 5cd9826

Browse files
committed
Adding UI tests bundle and a test
1 parent aee9c27 commit 5cd9826

File tree

4 files changed

+192
-24
lines changed

4 files changed

+192
-24
lines changed

Podfile.lock

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@ PODS:
2323
- "GoogleUtilities/NSData+zlib (~> 7.6)"
2424
- nanopb (~> 2.30908.0)
2525
- GoogleUserMessagingPlatform (2.0.0)
26-
- GoogleUtilities/AppDelegateSwizzler (7.6.0):
26+
- GoogleUtilities/AppDelegateSwizzler (7.7.0):
2727
- GoogleUtilities/Environment
2828
- GoogleUtilities/Logger
2929
- GoogleUtilities/Network
30-
- GoogleUtilities/Environment (7.6.0):
30+
- GoogleUtilities/Environment (7.7.0):
3131
- PromisesObjC (< 3.0, >= 1.2)
32-
- GoogleUtilities/Logger (7.6.0):
32+
- GoogleUtilities/Logger (7.7.0):
3333
- GoogleUtilities/Environment
34-
- GoogleUtilities/MethodSwizzler (7.6.0):
34+
- GoogleUtilities/MethodSwizzler (7.7.0):
3535
- GoogleUtilities/Logger
36-
- GoogleUtilities/Network (7.6.0):
36+
- GoogleUtilities/Network (7.7.0):
3737
- GoogleUtilities/Logger
3838
- "GoogleUtilities/NSData+zlib"
3939
- GoogleUtilities/Reachability
40-
- "GoogleUtilities/NSData+zlib (7.6.0)"
41-
- GoogleUtilities/Reachability (7.6.0):
40+
- "GoogleUtilities/NSData+zlib (7.7.0)"
41+
- GoogleUtilities/Reachability (7.7.0):
4242
- GoogleUtilities/Logger
4343
- mopub-ios-sdk (5.18.2):
4444
- mopub-ios-sdk/MoPubSDK (= 5.18.2)
@@ -71,10 +71,10 @@ PODS:
7171
- TeadsSDK/Core (5.0.9)
7272

7373
DEPENDENCIES:
74-
- TeadsAdMobAdapter (from `./`)
75-
- TeadsMoPubAdapter (from `./`)
76-
- TeadsSASAdapter (from `./`)
77-
- TeadsSDK (from `./`)
74+
- TeadsAdMobAdapter (~> 5.0)
75+
- TeadsMoPubAdapter (~> 5.0)
76+
- TeadsSASAdapter (~> 5.0)
77+
- TeadsSDK (~> 5.0)
7878

7979
SPEC REPOS:
8080
trunk:
@@ -87,22 +87,16 @@ SPEC REPOS:
8787
- PromisesObjC
8888
- Smart-Core-SDK
8989
- Smart-Display-SDK
90-
91-
EXTERNAL SOURCES:
92-
TeadsAdMobAdapter:
93-
:path: "./"
94-
TeadsMoPubAdapter:
95-
:path: "./"
96-
TeadsSASAdapter:
97-
:path: "./"
98-
TeadsSDK:
99-
:path: "./"
90+
- TeadsAdMobAdapter
91+
- TeadsMoPubAdapter
92+
- TeadsSASAdapter
93+
- TeadsSDK
10094

10195
SPEC CHECKSUMS:
10296
Google-Mobile-Ads-SDK: 05e5d68bb42a61b2e5bef336a52789785605aa22
10397
GoogleAppMeasurement: a3311dbcf3ea651e5a070fe8559b57c174ada081
10498
GoogleUserMessagingPlatform: ab890ce5f6620f293a21b6bdd82e416a2c73aeca
105-
GoogleUtilities: 684ee790a24f73ebb2d1d966e9711c203f2a4237
99+
GoogleUtilities: e0913149f6b0625b553d70dae12b49fc62914fd1
106100
mopub-ios-sdk: 39dd404dc791e543979b91aa8e3b27197af91377
107101
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
108102
PromisesObjC: 68159ce6952d93e17b2dfe273b8c40907db5ba58
@@ -113,6 +107,6 @@ SPEC CHECKSUMS:
113107
TeadsSASAdapter: 8f9887c212eb804ff5848a55aa896f7a28ac5f0f
114108
TeadsSDK: 814bd67fa39a9e8b8550562ee5c09f6b2b806421
115109

116-
PODFILE CHECKSUM: a1142c5e1eecc6a69f971bf26b6ad4f2f8f86b46
110+
PODFILE CHECKSUM: aa4219f7835c2c99ea97b01461d8286fcd340667
117111

118112
COCOAPODS: 1.11.2

TeadsSampleApp.xcodeproj/project.pbxproj

Lines changed: 132 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,21 @@
4646
E9984EFA26B2D46F000D42D3 /* MoPubNativeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9984EF626B2D46F000D42D3 /* MoPubNativeTableViewCell.swift */; };
4747
E9984EFB26B2D46F000D42D3 /* AdmobNativeAdTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9984EF726B2D46F000D42D3 /* AdmobNativeAdTableViewCell.swift */; };
4848
E9A6F4BD26B7188D005C5F78 /* NativeAdCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9A6F4BC26B7188D005C5F78 /* NativeAdCollectionViewCell.swift */; };
49+
F71C452127918A88000C696F /* TeadsSampleAppUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F71C452027918A88000C696F /* TeadsSampleAppUITests.swift */; };
4950
F7651FE326A07A58004DAFD9 /* bootstrap.js in Resources */ = {isa = PBXBuildFile; fileRef = F7651FE126A07A58004DAFD9 /* bootstrap.js */; };
5051
F7651FE426A07A58004DAFD9 /* TeadsWebViewHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7651FE226A07A58004DAFD9 /* TeadsWebViewHelper.swift */; };
5152
/* End PBXBuildFile section */
5253

54+
/* Begin PBXContainerItemProxy section */
55+
F71C452427918A88000C696F /* PBXContainerItemProxy */ = {
56+
isa = PBXContainerItemProxy;
57+
containerPortal = B5555A2A1F7CDF80007406D4 /* Project object */;
58+
proxyType = 1;
59+
remoteGlobalIDString = B5555A311F7CDF80007406D4;
60+
remoteInfo = TeadsSampleApp;
61+
};
62+
/* End PBXContainerItemProxy section */
63+
5364
/* Begin PBXFileReference section */
5465
13915D12E3814B15B3832777 /* Pods_TeadsSampleApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TeadsSampleApp.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5566
40077B422534AABF00D53197 /* InReadDirectCollectionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InReadDirectCollectionViewController.swift; sourceTree = "<group>"; };
@@ -94,6 +105,8 @@
94105
E9984EF626B2D46F000D42D3 /* MoPubNativeTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoPubNativeTableViewCell.swift; sourceTree = "<group>"; };
95106
E9984EF726B2D46F000D42D3 /* AdmobNativeAdTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdmobNativeAdTableViewCell.swift; sourceTree = "<group>"; };
96107
E9A6F4BC26B7188D005C5F78 /* NativeAdCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NativeAdCollectionViewCell.swift; sourceTree = "<group>"; };
108+
F71C451E27918A88000C696F /* TeadsSampleAppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TeadsSampleAppUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
109+
F71C452027918A88000C696F /* TeadsSampleAppUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TeadsSampleAppUITests.swift; sourceTree = "<group>"; };
97110
F7651FE126A07A58004DAFD9 /* bootstrap.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = bootstrap.js; sourceTree = "<group>"; };
98111
F7651FE226A07A58004DAFD9 /* TeadsWebViewHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TeadsWebViewHelper.swift; sourceTree = "<group>"; };
99112
/* End PBXFileReference section */
@@ -107,6 +120,13 @@
107120
);
108121
runOnlyForDeploymentPostprocessing = 0;
109122
};
123+
F71C451B27918A88000C696F /* Frameworks */ = {
124+
isa = PBXFrameworksBuildPhase;
125+
buildActionMask = 2147483647;
126+
files = (
127+
);
128+
runOnlyForDeploymentPostprocessing = 0;
129+
};
110130
/* End PBXFrameworksBuildPhase section */
111131

112132
/* Begin PBXGroup section */
@@ -297,6 +317,7 @@
297317
isa = PBXGroup;
298318
children = (
299319
B5555A341F7CDF80007406D4 /* TeadsSampleApp */,
320+
F71C451F27918A88000C696F /* TeadsSampleAppUITests */,
300321
B5555A331F7CDF80007406D4 /* Products */,
301322
9C4C2A8CC3AEB01218414AF6 /* Pods */,
302323
DE0116B31068BD02E3224B25 /* Frameworks */,
@@ -307,6 +328,7 @@
307328
isa = PBXGroup;
308329
children = (
309330
B5555A321F7CDF80007406D4 /* TeadsSampleApp.app */,
331+
F71C451E27918A88000C696F /* TeadsSampleAppUITests.xctest */,
310332
);
311333
name = Products;
312334
sourceTree = "<group>";
@@ -456,6 +478,14 @@
456478
path = TableView;
457479
sourceTree = "<group>";
458480
};
481+
F71C451F27918A88000C696F /* TeadsSampleAppUITests */ = {
482+
isa = PBXGroup;
483+
children = (
484+
F71C452027918A88000C696F /* TeadsSampleAppUITests.swift */,
485+
);
486+
path = TeadsSampleAppUITests;
487+
sourceTree = "<group>";
488+
};
459489
F7651FDF26A07A58004DAFD9 /* WebViewHelper */ = {
460490
isa = PBXGroup;
461491
children = (
@@ -496,13 +526,31 @@
496526
productReference = B5555A321F7CDF80007406D4 /* TeadsSampleApp.app */;
497527
productType = "com.apple.product-type.application";
498528
};
529+
F71C451D27918A88000C696F /* TeadsSampleAppUITests */ = {
530+
isa = PBXNativeTarget;
531+
buildConfigurationList = F71C452827918A88000C696F /* Build configuration list for PBXNativeTarget "TeadsSampleAppUITests" */;
532+
buildPhases = (
533+
F71C451A27918A88000C696F /* Sources */,
534+
F71C451B27918A88000C696F /* Frameworks */,
535+
F71C451C27918A88000C696F /* Resources */,
536+
);
537+
buildRules = (
538+
);
539+
dependencies = (
540+
F71C452527918A88000C696F /* PBXTargetDependency */,
541+
);
542+
name = TeadsSampleAppUITests;
543+
productName = TeadsSampleAppUITests;
544+
productReference = F71C451E27918A88000C696F /* TeadsSampleAppUITests.xctest */;
545+
productType = "com.apple.product-type.bundle.ui-testing";
546+
};
499547
/* End PBXNativeTarget section */
500548

501549
/* Begin PBXProject section */
502550
B5555A2A1F7CDF80007406D4 /* Project object */ = {
503551
isa = PBXProject;
504552
attributes = {
505-
LastSwiftUpdateCheck = 0900;
553+
LastSwiftUpdateCheck = 1320;
506554
LastUpgradeCheck = 1000;
507555
ORGANIZATIONNAME = Teads;
508556
TargetAttributes = {
@@ -511,6 +559,11 @@
511559
LastSwiftMigration = 1170;
512560
ProvisioningStyle = Automatic;
513561
};
562+
F71C451D27918A88000C696F = {
563+
CreatedOnToolsVersion = 13.2.1;
564+
ProvisioningStyle = Automatic;
565+
TestTargetID = B5555A311F7CDF80007406D4;
566+
};
514567
};
515568
};
516569
buildConfigurationList = B5555A2D1F7CDF80007406D4 /* Build configuration list for PBXProject "TeadsSampleApp" */;
@@ -527,6 +580,7 @@
527580
projectRoot = "";
528581
targets = (
529582
B5555A311F7CDF80007406D4 /* TeadsSampleApp */,
583+
F71C451D27918A88000C696F /* TeadsSampleAppUITests */,
530584
);
531585
};
532586
/* End PBXProject section */
@@ -546,6 +600,13 @@
546600
);
547601
runOnlyForDeploymentPostprocessing = 0;
548602
};
603+
F71C451C27918A88000C696F /* Resources */ = {
604+
isa = PBXResourcesBuildPhase;
605+
buildActionMask = 2147483647;
606+
files = (
607+
);
608+
runOnlyForDeploymentPostprocessing = 0;
609+
};
549610
/* End PBXResourcesBuildPhase section */
550611

551612
/* Begin PBXShellScriptBuildPhase section */
@@ -661,8 +722,24 @@
661722
);
662723
runOnlyForDeploymentPostprocessing = 0;
663724
};
725+
F71C451A27918A88000C696F /* Sources */ = {
726+
isa = PBXSourcesBuildPhase;
727+
buildActionMask = 2147483647;
728+
files = (
729+
F71C452127918A88000C696F /* TeadsSampleAppUITests.swift in Sources */,
730+
);
731+
runOnlyForDeploymentPostprocessing = 0;
732+
};
664733
/* End PBXSourcesBuildPhase section */
665734

735+
/* Begin PBXTargetDependency section */
736+
F71C452527918A88000C696F /* PBXTargetDependency */ = {
737+
isa = PBXTargetDependency;
738+
target = B5555A311F7CDF80007406D4 /* TeadsSampleApp */;
739+
targetProxy = F71C452427918A88000C696F /* PBXContainerItemProxy */;
740+
};
741+
/* End PBXTargetDependency section */
742+
666743
/* Begin PBXVariantGroup section */
667744
B5555A391F7CDF80007406D4 /* Main.storyboard */ = {
668745
isa = PBXVariantGroup;
@@ -994,6 +1071,51 @@
9941071
};
9951072
name = Release;
9961073
};
1074+
F71C452627918A88000C696F /* Debug */ = {
1075+
isa = XCBuildConfiguration;
1076+
buildSettings = {
1077+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
1078+
CLANG_ENABLE_OBJC_WEAK = YES;
1079+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
1080+
CODE_SIGN_STYLE = Automatic;
1081+
CURRENT_PROJECT_VERSION = 1;
1082+
DEVELOPMENT_TEAM = V55UEG98F8;
1083+
GENERATE_INFOPLIST_FILE = YES;
1084+
IPHONEOS_DEPLOYMENT_TARGET = 15.2;
1085+
MARKETING_VERSION = 1.0;
1086+
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
1087+
MTL_FAST_MATH = YES;
1088+
PRODUCT_BUNDLE_IDENTIFIER = tv.Teads.TeadsSampleAppUITests;
1089+
PRODUCT_NAME = "$(TARGET_NAME)";
1090+
SWIFT_EMIT_LOC_STRINGS = NO;
1091+
SWIFT_VERSION = 5.0;
1092+
TARGETED_DEVICE_FAMILY = "1,2";
1093+
TEST_TARGET_NAME = TeadsSampleApp;
1094+
};
1095+
name = Debug;
1096+
};
1097+
F71C452727918A88000C696F /* Release */ = {
1098+
isa = XCBuildConfiguration;
1099+
buildSettings = {
1100+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
1101+
CLANG_ENABLE_OBJC_WEAK = YES;
1102+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
1103+
CODE_SIGN_STYLE = Automatic;
1104+
CURRENT_PROJECT_VERSION = 1;
1105+
DEVELOPMENT_TEAM = V55UEG98F8;
1106+
GENERATE_INFOPLIST_FILE = YES;
1107+
IPHONEOS_DEPLOYMENT_TARGET = 15.2;
1108+
MARKETING_VERSION = 1.0;
1109+
MTL_FAST_MATH = YES;
1110+
PRODUCT_BUNDLE_IDENTIFIER = tv.Teads.TeadsSampleAppUITests;
1111+
PRODUCT_NAME = "$(TARGET_NAME)";
1112+
SWIFT_EMIT_LOC_STRINGS = NO;
1113+
SWIFT_VERSION = 5.0;
1114+
TARGETED_DEVICE_FAMILY = "1,2";
1115+
TEST_TARGET_NAME = TeadsSampleApp;
1116+
};
1117+
name = Release;
1118+
};
9971119
/* End XCBuildConfiguration section */
9981120

9991121
/* Begin XCConfigurationList section */
@@ -1015,6 +1137,15 @@
10151137
defaultConfigurationIsVisible = 0;
10161138
defaultConfigurationName = Release;
10171139
};
1140+
F71C452827918A88000C696F /* Build configuration list for PBXNativeTarget "TeadsSampleAppUITests" */ = {
1141+
isa = XCConfigurationList;
1142+
buildConfigurations = (
1143+
F71C452627918A88000C696F /* Debug */,
1144+
F71C452727918A88000C696F /* Release */,
1145+
);
1146+
defaultConfigurationIsVisible = 0;
1147+
defaultConfigurationName = Release;
1148+
};
10181149
/* End XCConfigurationList section */
10191150
};
10201151
rootObject = B5555A2A1F7CDF80007406D4 /* Project object */;

TeadsSampleApp.xcodeproj/xcshareddata/xcschemes/TeadsSampleApp.xcscheme

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@
3737
</BuildableReference>
3838
</MacroExpansion>
3939
<Testables>
40+
<TestableReference
41+
skipped = "NO">
42+
<BuildableReference
43+
BuildableIdentifier = "primary"
44+
BlueprintIdentifier = "F71C451D27918A88000C696F"
45+
BuildableName = "TeadsSampleAppUITests.xctest"
46+
BlueprintName = "TeadsSampleAppUITests"
47+
ReferencedContainer = "container:TeadsSampleApp.xcodeproj">
48+
</BuildableReference>
49+
</TestableReference>
4050
</Testables>
4151
</TestAction>
4252
<LaunchAction
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//
2+
// TeadsSampleAppUITests.swift
3+
// TeadsSampleAppUITests
4+
//
5+
// Created by Antoine Barrault on 14/01/2022.
6+
// Copyright © 2022 Teads. All rights reserved.
7+
//
8+
9+
import XCTest
10+
11+
class TeadsSampleAppUITests: XCTestCase {
12+
13+
override func setUpWithError() throws {
14+
continueAfterFailure = false
15+
}
16+
17+
func testInReadIntegrationInScrollView() throws {
18+
let app = XCUIApplication()
19+
app.launch()
20+
let collectionViewsQuery = app.collectionViews
21+
collectionViewsQuery.otherElements.containing(.staticText, identifier: "Creatives").element.swipeUp()
22+
app.collectionViews.cells.staticTexts["ScrollView"].tap()
23+
let scrollViewsQuery = XCUIApplication().scrollViews.firstMatch
24+
let articleElement = scrollViewsQuery.otherElements.containing(.staticText, identifier:"ARTICLE").element
25+
let elementsQuery = scrollViewsQuery.otherElements
26+
while !elementsQuery.otherElements["teads-player"].exists {
27+
articleElement.swipeUp()
28+
}
29+
let player = elementsQuery.otherElements["teads-player"]
30+
XCTAssert(player.frame.height > 80)
31+
}
32+
33+
}

0 commit comments

Comments
 (0)