appium-webdriveragent 16.12.3 → 16.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/WebDriverAgent.xcodeproj/project.pbxproj +6 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationApp_watchOS.xcscheme +2 -0
- package/WebDriverAgentLib/Info.plist +2 -2
- package/WebDriverAgentTests/IntegrationApp/COORDINATE_PROBE.md +50 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/FBCoordinateProbeViewController.h +4 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/FBCoordinateProbeViewController.m +176 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/ViewController.m +8 -2
- package/WebDriverAgentTests/IntegrationApp/Info.plist +2 -2
- package/WebDriverAgentTests/IntegrationApp/Resources/Base.lproj/Main.storyboard +27 -11
- package/WebDriverAgentTests/IntegrationTests/FBConfigurationTests.m +4 -5
- package/WebDriverAgentTests/IntegrationTests/FBIntegrationTestCase.m +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [16.12.4](https://github.com/appium/WebDriverAgent/compare/v16.12.3...v16.12.4) (2026-09-06)
|
|
2
|
+
|
|
3
|
+
### Miscellaneous Chores
|
|
4
|
+
|
|
5
|
+
* add coordinate screen in the integration app ([#1251](https://github.com/appium/WebDriverAgent/issues/1251)) ([de6acac](https://github.com/appium/WebDriverAgent/commit/de6acac7ebbaf70915f0c09093e3a12623efcea2))
|
|
6
|
+
|
|
1
7
|
## [16.12.3](https://github.com/appium/WebDriverAgent/compare/v16.12.2...v16.12.3) (2026-09-04)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
|
@@ -932,6 +932,7 @@
|
|
|
932
932
|
BEA2FA45BED17FE03010FECD /* FBFindElementCommands.h in Headers */ = {isa = PBXBuildFile; fileRef = EE9AB7581CAEDF0C008C271F /* FBFindElementCommands.h */; };
|
|
933
933
|
BF9B191D841681A571BAFED1 /* _XCTestObservationPrivate-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = C840A8703A7C8D48897E158A /* _XCTestObservationPrivate-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
934
934
|
BFF5D9B9446DD542E5D6017D /* XCTTagSelection.h in Headers */ = {isa = PBXBuildFile; fileRef = 8E2092D85A7C691F157B1971 /* XCTTagSelection.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
935
|
+
C01249000000000000000003 /* FBCoordinateProbeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C01249000000000000000002 /* FBCoordinateProbeViewController.m */; };
|
|
935
936
|
C040AE5F2E3B934E8EEAEE0F /* XCUIApplicationProcessDelegate-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 43FCB89739438814F43BCA24 /* XCUIApplicationProcessDelegate-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
936
937
|
C07F140AF96143A0A5CAA2B0 /* XCTestCaseDiscoveryUIAutomationDelegate-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = E29888B75A756D1CCD21604C /* XCTestCaseDiscoveryUIAutomationDelegate-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
937
938
|
C1414C29C836902466C4D6DB /* XCTestCastMethodNamesUIAutomationDelegate-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = A80A1C12FA9899367D316E8C /* XCTestCastMethodNamesUIAutomationDelegate-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
@@ -1748,6 +1749,8 @@
|
|
|
1748
1749
|
B8A163261EFA440E42CA6AC1 /* XCTRunnerDaemonSessionUIAutomationDelegate-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCTRunnerDaemonSessionUIAutomationDelegate-Protocol.h"; sourceTree = "<group>"; };
|
|
1749
1750
|
B98A9F937EF98D6359FCCC7A /* XCTRuntimeIssueDetectionPolicy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = XCTRuntimeIssueDetectionPolicy.h; sourceTree = "<group>"; };
|
|
1750
1751
|
BCED63DFD03326F6351165FE /* WDAFindIntegrationTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WDAFindIntegrationTests.swift; sourceTree = "<group>"; };
|
|
1752
|
+
C01249000000000000000001 /* FBCoordinateProbeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FBCoordinateProbeViewController.h; sourceTree = "<group>"; };
|
|
1753
|
+
C01249000000000000000002 /* FBCoordinateProbeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBCoordinateProbeViewController.m; sourceTree = "<group>"; };
|
|
1751
1754
|
C840A8703A7C8D48897E158A /* _XCTestObservationPrivate-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "_XCTestObservationPrivate-Protocol.h"; sourceTree = "<group>"; };
|
|
1752
1755
|
C878996F07A9B26E66FC4EAC /* WDAClickIntegrationTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WDAClickIntegrationTests.swift; sourceTree = "<group>"; };
|
|
1753
1756
|
C8FB547322D3949C00B69954 /* LSApplicationWorkspace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LSApplicationWorkspace.h; sourceTree = "<group>"; };
|
|
@@ -2732,6 +2735,8 @@
|
|
|
2732
2735
|
EE55B3231D1D5388003AAAEC /* FBTableDataSource.m */,
|
|
2733
2736
|
EE9B76841CF7997600275851 /* ViewController.h */,
|
|
2734
2737
|
EE9B76851CF7997600275851 /* ViewController.m */,
|
|
2738
|
+
C01249000000000000000001 /* FBCoordinateProbeViewController.h */,
|
|
2739
|
+
C01249000000000000000002 /* FBCoordinateProbeViewController.m */,
|
|
2735
2740
|
315A14FF2518CB8700A3A064 /* TouchableView.h */,
|
|
2736
2741
|
315A15002518CB8700A3A064 /* TouchableView.m */,
|
|
2737
2742
|
315A15052518CC2800A3A064 /* TouchSpotView.h */,
|
|
@@ -4851,6 +4856,7 @@
|
|
|
4851
4856
|
315A15072518CC2800A3A064 /* TouchSpotView.m in Sources */,
|
|
4852
4857
|
EE9B76911CF7997600275851 /* main.m in Sources */,
|
|
4853
4858
|
EE9B768F1CF7997600275851 /* ViewController.m in Sources */,
|
|
4859
|
+
C01249000000000000000003 /* FBCoordinateProbeViewController.m in Sources */,
|
|
4854
4860
|
315A15012518CB8700A3A064 /* TouchableView.m in Sources */,
|
|
4855
4861
|
315A150A2518D6F400A3A064 /* TouchViewController.m in Sources */,
|
|
4856
4862
|
ADDA07241D6BB2BF001700AC /* FBScrollViewController.m in Sources */,
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
BuildableIdentifier = "primary"
|
|
47
47
|
BlueprintIdentifier = "9D6B02D8FC050BAF7159284F"
|
|
48
48
|
BuildableName = "IntegrationApp_watchOS.app"
|
|
49
|
+
BlueprintName = "IntegrationApp_watchOS"
|
|
49
50
|
ReferencedContainer = "container:WebDriverAgent.xcodeproj">
|
|
50
51
|
</BuildableReference>
|
|
51
52
|
</BuildableProductRunnable>
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
BuildableIdentifier = "primary"
|
|
63
64
|
BlueprintIdentifier = "9D6B02D8FC050BAF7159284F"
|
|
64
65
|
BuildableName = "IntegrationApp_watchOS.app"
|
|
66
|
+
BlueprintName = "IntegrationApp_watchOS"
|
|
65
67
|
ReferencedContainer = "container:WebDriverAgent.xcodeproj">
|
|
66
68
|
</BuildableReference>
|
|
67
69
|
</BuildableProductRunnable>
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
<key>CFBundlePackageType</key>
|
|
16
16
|
<string>FMWK</string>
|
|
17
17
|
<key>CFBundleShortVersionString</key>
|
|
18
|
-
<string>16.12.
|
|
18
|
+
<string>16.12.4</string>
|
|
19
19
|
<key>CFBundleSignature</key>
|
|
20
20
|
<string>????</string>
|
|
21
21
|
<key>CFBundleVersion</key>
|
|
22
|
-
<string>16.12.
|
|
22
|
+
<string>16.12.4</string>
|
|
23
23
|
<key>NSPrincipalClass</key>
|
|
24
24
|
<string/>
|
|
25
25
|
</dict>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Coordinate probe
|
|
2
|
+
|
|
3
|
+
Open **Coordinate Probe** below **DeepHierarchy** on the IntegrationApp home screen.
|
|
4
|
+
Use the standard Back button to return to the existing fixtures. Opening the probe
|
|
5
|
+
creates a fresh measurement session.
|
|
6
|
+
|
|
7
|
+
The **Touch** canvas records actual `UITouch.locationInView:` coordinates rather
|
|
8
|
+
than assuming that a gesture succeeded because it hit a large button. **Scroll**
|
|
9
|
+
shows 80 numbered rows, each 44 points high.
|
|
10
|
+
|
|
11
|
+
## Automation identifiers
|
|
12
|
+
|
|
13
|
+
| Identifier | Purpose |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `coordinate-probe` | Home screen button that opens the probe |
|
|
16
|
+
| `probe-status` | Label containing the measurement JSON |
|
|
17
|
+
| `coordinate-canvas` | Touch target |
|
|
18
|
+
| `probe-mode` | Touch/Scroll segmented control |
|
|
19
|
+
| `probe-table` | Scrollable table |
|
|
20
|
+
| `probe-row-0` through `probe-row-79` | Individual table rows |
|
|
21
|
+
|
|
22
|
+
The `probe-status` label exposes `start`, `last`, `phase`, and `count` after a
|
|
23
|
+
touch. `start` and `last` are **canvas-local app points**. It also exposes
|
|
24
|
+
`canvasBounds`, `canvasWindowRect`, `windowSize`, `screenSize`, and `scrollY`.
|
|
25
|
+
Geometry is refreshed when the view lays out, including after rotation or window
|
|
26
|
+
resizing. Touch-related fields are absent before the first touch.
|
|
27
|
+
|
|
28
|
+
For example, locate `coordinate-probe` by accessibility ID and click it. Then
|
|
29
|
+
locate `coordinate-canvas`, send an element-relative action, and read the JSON
|
|
30
|
+
from `probe-status`. Check that `count` increased and compare `start`/`last` with
|
|
31
|
+
the expected canvas-local point within a suitable tolerance. Derive test offsets
|
|
32
|
+
from the current element rectangle rather than hard-coding a device size.
|
|
33
|
+
|
|
34
|
+
## Native and compatibility builds
|
|
35
|
+
|
|
36
|
+
The screen uses the same source for both configurations. Keep the IntegrationApp
|
|
37
|
+
scheme and set the build's `TARGETED_DEVICE_FAMILY`:
|
|
38
|
+
|
|
39
|
+
- `1,2`: native support for iPhone and iPad (the existing default).
|
|
40
|
+
- `1`: iPhone-only; install on iPad to exercise iPhone compatibility mode.
|
|
41
|
+
|
|
42
|
+
These are build settings, not a switch within the running app. Verify the actual
|
|
43
|
+
window and element frames before interpreting results. An iPad-native app can
|
|
44
|
+
also run in a resized window; maximize it when testing a full-screen native case.
|
|
45
|
+
For the compatibility case, compare app and SpringBoard window sizes and the
|
|
46
|
+
reported element rectangles with the recorded probe geometry.
|
|
47
|
+
|
|
48
|
+
If keeping both builds installed at once, give them distinct bundle IDs. This
|
|
49
|
+
change does not add another app target or alter the existing bundle ID or signing
|
|
50
|
+
configuration.
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
#import "FBCoordinateProbeViewController.h"
|
|
2
|
+
|
|
3
|
+
@interface FBCoordinateProbeCanvas : UIView
|
|
4
|
+
@property (nonatomic, copy) void (^onTouch)(NSString *phase, CGPoint point);
|
|
5
|
+
@end
|
|
6
|
+
|
|
7
|
+
@implementation FBCoordinateProbeCanvas
|
|
8
|
+
|
|
9
|
+
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
|
10
|
+
{
|
|
11
|
+
self.onTouch(@"began", [touches.anyObject locationInView:self]);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
|
15
|
+
{
|
|
16
|
+
self.onTouch(@"moved", [touches.anyObject locationInView:self]);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
|
20
|
+
{
|
|
21
|
+
self.onTouch(@"ended", [touches.anyObject locationInView:self]);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
- (void)touchesCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
|
25
|
+
{
|
|
26
|
+
self.onTouch(@"cancelled", [touches.anyObject locationInView:self]);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
- (void)drawRect:(CGRect)rect
|
|
30
|
+
{
|
|
31
|
+
CGContextRef context = UIGraphicsGetCurrentContext();
|
|
32
|
+
CGContextSetStrokeColorWithColor(context, UIColor.whiteColor.CGColor);
|
|
33
|
+
for (NSInteger i = 1; i < 4; i++) {
|
|
34
|
+
CGFloat x = CGRectGetWidth(self.bounds) * i / 4.0;
|
|
35
|
+
CGFloat y = CGRectGetHeight(self.bounds) * i / 4.0;
|
|
36
|
+
CGContextMoveToPoint(context, x, 0);
|
|
37
|
+
CGContextAddLineToPoint(context, x, CGRectGetHeight(self.bounds));
|
|
38
|
+
CGContextMoveToPoint(context, 0, y);
|
|
39
|
+
CGContextAddLineToPoint(context, CGRectGetWidth(self.bounds), y);
|
|
40
|
+
}
|
|
41
|
+
CGContextStrokePath(context);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@end
|
|
45
|
+
|
|
46
|
+
@interface FBCoordinateProbeViewController () <UITableViewDataSource, UITableViewDelegate>
|
|
47
|
+
@property (nonatomic, strong) UILabel *statusLabel;
|
|
48
|
+
@property (nonatomic, strong) UISegmentedControl *modeControl;
|
|
49
|
+
@property (nonatomic, strong) FBCoordinateProbeCanvas *canvas;
|
|
50
|
+
@property (nonatomic, strong) UITableView *table;
|
|
51
|
+
@property (nonatomic, strong) NSMutableDictionary<NSString *, id> *measurement;
|
|
52
|
+
@property (nonatomic) NSUInteger touchCount;
|
|
53
|
+
@end
|
|
54
|
+
|
|
55
|
+
@implementation FBCoordinateProbeViewController
|
|
56
|
+
|
|
57
|
+
- (void)viewDidLoad
|
|
58
|
+
{
|
|
59
|
+
[super viewDidLoad];
|
|
60
|
+
self.title = @"Coordinate Probe";
|
|
61
|
+
self.view.backgroundColor = UIColor.systemBackgroundColor;
|
|
62
|
+
self.measurement = [NSMutableDictionary dictionary];
|
|
63
|
+
|
|
64
|
+
self.statusLabel = [UILabel new];
|
|
65
|
+
self.statusLabel.accessibilityIdentifier = @"probe-status";
|
|
66
|
+
self.statusLabel.font = [UIFont monospacedSystemFontOfSize:10 weight:UIFontWeightRegular];
|
|
67
|
+
self.statusLabel.numberOfLines = 0;
|
|
68
|
+
[self.view addSubview:self.statusLabel];
|
|
69
|
+
|
|
70
|
+
self.modeControl = [[UISegmentedControl alloc] initWithItems:@[@"Touch", @"Scroll"]];
|
|
71
|
+
self.modeControl.accessibilityIdentifier = @"probe-mode";
|
|
72
|
+
self.modeControl.selectedSegmentIndex = 0;
|
|
73
|
+
[self.modeControl addTarget:self action:@selector(modeChanged) forControlEvents:UIControlEventValueChanged];
|
|
74
|
+
[self.view addSubview:self.modeControl];
|
|
75
|
+
|
|
76
|
+
self.canvas = [FBCoordinateProbeCanvas new];
|
|
77
|
+
self.canvas.backgroundColor = UIColor.systemBlueColor;
|
|
78
|
+
self.canvas.isAccessibilityElement = YES;
|
|
79
|
+
self.canvas.accessibilityIdentifier = @"coordinate-canvas";
|
|
80
|
+
self.canvas.accessibilityLabel = @"Coordinate canvas";
|
|
81
|
+
self.canvas.accessibilityTraits = UIAccessibilityTraitAllowsDirectInteraction;
|
|
82
|
+
self.canvas.contentMode = UIViewContentModeRedraw;
|
|
83
|
+
__weak typeof(self) weakSelf = self;
|
|
84
|
+
self.canvas.onTouch = ^(NSString *phase, CGPoint point) {
|
|
85
|
+
FBCoordinateProbeViewController *controller = weakSelf;
|
|
86
|
+
if (nil == controller) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if ([phase isEqualToString:@"began"]) {
|
|
90
|
+
controller.touchCount++;
|
|
91
|
+
controller.measurement[@"start"] = @[@(point.x), @(point.y)];
|
|
92
|
+
}
|
|
93
|
+
controller.measurement[@"last"] = @[@(point.x), @(point.y)];
|
|
94
|
+
controller.measurement[@"phase"] = phase;
|
|
95
|
+
controller.measurement[@"count"] = @(controller.touchCount);
|
|
96
|
+
[controller publishMeasurement];
|
|
97
|
+
};
|
|
98
|
+
[self.view addSubview:self.canvas];
|
|
99
|
+
|
|
100
|
+
self.table = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
|
101
|
+
self.table.accessibilityIdentifier = @"probe-table";
|
|
102
|
+
self.table.rowHeight = 44;
|
|
103
|
+
self.table.dataSource = self;
|
|
104
|
+
self.table.delegate = self;
|
|
105
|
+
self.table.hidden = YES;
|
|
106
|
+
[self.view addSubview:self.table];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
- (void)viewDidLayoutSubviews
|
|
110
|
+
{
|
|
111
|
+
[super viewDidLayoutSubviews];
|
|
112
|
+
// Use the app's actual available area, including navigation bars and resized iPad windows.
|
|
113
|
+
CGRect safeFrame = self.view.safeAreaLayoutGuide.layoutFrame;
|
|
114
|
+
CGFloat width = MAX(0, CGRectGetWidth(safeFrame) - 40);
|
|
115
|
+
CGFloat left = CGRectGetMinX(safeFrame) + 20;
|
|
116
|
+
CGFloat top = CGRectGetMinY(safeFrame) + 8;
|
|
117
|
+
self.statusLabel.frame = CGRectMake(left, top, width, 96);
|
|
118
|
+
self.modeControl.frame = CGRectMake(left, top + 104, width, 30);
|
|
119
|
+
CGRect contentFrame = CGRectMake(left, top + 146, width,
|
|
120
|
+
MAX(0, CGRectGetMaxY(safeFrame) - top - 166));
|
|
121
|
+
self.canvas.frame = contentFrame;
|
|
122
|
+
self.table.frame = contentFrame;
|
|
123
|
+
[self publishMeasurement];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
- (void)publishMeasurement
|
|
127
|
+
{
|
|
128
|
+
UIWindow *window = self.view.window;
|
|
129
|
+
if (nil == window) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
CGRect bounds = self.canvas.bounds;
|
|
133
|
+
CGRect frame = [self.canvas convertRect:bounds toView:window];
|
|
134
|
+
// Touch coordinates are local to the canvas. Window geometry lets tests compare
|
|
135
|
+
// those measurements with WDA's element rectangles without assuming a screen size.
|
|
136
|
+
self.measurement[@"canvasBounds"] = @[@(bounds.size.width), @(bounds.size.height)];
|
|
137
|
+
self.measurement[@"canvasWindowRect"] = @[@(frame.origin.x), @(frame.origin.y),
|
|
138
|
+
@(frame.size.width), @(frame.size.height)];
|
|
139
|
+
self.measurement[@"windowSize"] = @[@(window.bounds.size.width), @(window.bounds.size.height)];
|
|
140
|
+
self.measurement[@"screenSize"] = @[@(window.screen.bounds.size.width), @(window.screen.bounds.size.height)];
|
|
141
|
+
self.measurement[@"scrollY"] = @(self.table.contentOffset.y);
|
|
142
|
+
NSData *data = [NSJSONSerialization dataWithJSONObject:self.measurement
|
|
143
|
+
options:NSJSONWritingSortedKeys
|
|
144
|
+
error:nil];
|
|
145
|
+
self.statusLabel.text = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
- (void)modeChanged
|
|
149
|
+
{
|
|
150
|
+
self.canvas.hidden = self.modeControl.selectedSegmentIndex == 1;
|
|
151
|
+
self.table.hidden = !self.canvas.hidden;
|
|
152
|
+
[self publishMeasurement];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
|
156
|
+
{
|
|
157
|
+
return 80;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
|
161
|
+
{
|
|
162
|
+
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"probe-row"];
|
|
163
|
+
if (nil == cell) {
|
|
164
|
+
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"probe-row"];
|
|
165
|
+
}
|
|
166
|
+
cell.textLabel.text = [NSString stringWithFormat:@"Probe row %ld", (long)indexPath.row];
|
|
167
|
+
cell.accessibilityIdentifier = [NSString stringWithFormat:@"probe-row-%ld", (long)indexPath.row];
|
|
168
|
+
return cell;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
|
|
172
|
+
{
|
|
173
|
+
[self publishMeasurement];
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@end
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
#import "ViewController.h"
|
|
10
|
+
#import "FBCoordinateProbeViewController.h"
|
|
10
11
|
|
|
11
12
|
@interface ViewController ()
|
|
12
13
|
@property (weak, nonatomic) IBOutlet UILabel *orentationLabel;
|
|
@@ -30,6 +31,11 @@
|
|
|
30
31
|
self.button.accessibilityCustomActions = @[action1, action2];
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
- (IBAction)showCoordinateProbe:(id)sender
|
|
35
|
+
{
|
|
36
|
+
[self.navigationController pushViewController:[FBCoordinateProbeViewController new] animated:NO];
|
|
37
|
+
}
|
|
38
|
+
|
|
33
39
|
- (BOOL)handleCustomAction:(UIAccessibilityCustomAction *)action
|
|
34
40
|
{
|
|
35
41
|
// Custom action handler - just return YES to indicate success
|
|
@@ -57,13 +63,13 @@
|
|
|
57
63
|
// lay out. This page exists purely as a fixture for exercising element
|
|
58
64
|
// lookups (e.g. class chain locators) against a deep accessibility tree.
|
|
59
65
|
UIViewController *deepHierarchyViewController = [UIViewController new];
|
|
60
|
-
deepHierarchyViewController.view.backgroundColor = UIColor.
|
|
66
|
+
deepHierarchyViewController.view.backgroundColor = UIColor.systemBackgroundColor;
|
|
61
67
|
deepHierarchyViewController.view.accessibilityIdentifier = @"DeepHierarchyPage";
|
|
62
68
|
|
|
63
69
|
NSInteger depth = 70;
|
|
64
70
|
// A plain UILabel sibling, not part of the nested chain below, so the
|
|
65
71
|
// fixture stays recognizable to a human glancing at the simulator instead
|
|
66
|
-
// of showing a blank
|
|
72
|
+
// of showing a blank screen.
|
|
67
73
|
UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 60, CGRectGetWidth(UIScreen.mainScreen.bounds) - 40, 60)];
|
|
68
74
|
titleLabel.text = [NSString stringWithFormat:@"Deep Hierarchy\n%ld nested elements", (long)depth];
|
|
69
75
|
titleLabel.numberOfLines = 2;
|
|
@@ -30,8 +30,6 @@
|
|
|
30
30
|
<string>Yo Yo</string>
|
|
31
31
|
<key>NSPhotoLibraryUsageDescription</key>
|
|
32
32
|
<string>Yo Yo</string>
|
|
33
|
-
<key>UILaunchStoryboardName</key>
|
|
34
|
-
<string>LaunchScreen</string>
|
|
35
33
|
<key>UIApplicationSceneManifest</key>
|
|
36
34
|
<dict>
|
|
37
35
|
<key>UIApplicationSupportsMultipleScenes</key>
|
|
@@ -49,6 +47,8 @@
|
|
|
49
47
|
</array>
|
|
50
48
|
</dict>
|
|
51
49
|
</dict>
|
|
50
|
+
<key>UILaunchStoryboardName</key>
|
|
51
|
+
<string>LaunchScreen</string>
|
|
52
52
|
<key>UIRequiredDeviceCapabilities</key>
|
|
53
53
|
<array>
|
|
54
54
|
<string>armv7</string>
|
|
@@ -83,8 +83,19 @@
|
|
|
83
83
|
<action selector="goToDeepHierarchy:" destination="BYZ-38-t0r" eventType="touchUpInside" id="dHi-03-Act"/>
|
|
84
84
|
</connections>
|
|
85
85
|
</button>
|
|
86
|
+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cPr-01-Btn">
|
|
87
|
+
<rect key="frame" x="139" y="418" width="136" height="30"/>
|
|
88
|
+
<accessibility key="accessibilityConfiguration" identifier="coordinate-probe"/>
|
|
89
|
+
<constraints>
|
|
90
|
+
<constraint firstAttribute="height" constant="30" id="cPr-02-Hgt"/>
|
|
91
|
+
</constraints>
|
|
92
|
+
<state key="normal" title="Coordinate Probe"/>
|
|
93
|
+
<connections>
|
|
94
|
+
<action selector="showCoordinateProbe:" destination="BYZ-38-t0r" eventType="touchUpInside" id="cPr-03-Act"/>
|
|
95
|
+
</connections>
|
|
96
|
+
</button>
|
|
86
97
|
</subviews>
|
|
87
|
-
<color key="backgroundColor"
|
|
98
|
+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
|
88
99
|
<accessibility key="accessibilityConfiguration" label="MainView"/>
|
|
89
100
|
<constraints>
|
|
90
101
|
<constraint firstItem="YgP-SF-TkS" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="41Q-cm-l5K"/>
|
|
@@ -101,6 +112,8 @@
|
|
|
101
112
|
<constraint firstItem="M2N-Yn-ytb" firstAttribute="top" secondItem="YgP-SF-TkS" secondAttribute="bottom" constant="8" id="tMN-gl-smg"/>
|
|
102
113
|
<constraint firstItem="dHi-01-Btn" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="dHi-04-Cnt"/>
|
|
103
114
|
<constraint firstItem="dHi-01-Btn" firstAttribute="top" secondItem="1Ht-AF-MGW" secondAttribute="bottom" constant="8" id="dHi-05-Top"/>
|
|
115
|
+
<constraint firstItem="cPr-01-Btn" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="cPr-04-Cnt"/>
|
|
116
|
+
<constraint firstItem="cPr-01-Btn" firstAttribute="top" secondItem="dHi-01-Btn" secondAttribute="bottom" constant="8" id="cPr-05-Top"/>
|
|
104
117
|
</constraints>
|
|
105
118
|
</view>
|
|
106
119
|
<navigationItem key="navigationItem" id="dmu-Fe-aoT"/>
|
|
@@ -237,7 +250,7 @@
|
|
|
237
250
|
<constraint firstAttribute="height" constant="21" id="VBZ-ac-GvI"/>
|
|
238
251
|
</constraints>
|
|
239
252
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
|
240
|
-
<color key="textColor"
|
|
253
|
+
<color key="textColor" systemColor="labelColor"/>
|
|
241
254
|
<nil key="highlightedColor"/>
|
|
242
255
|
</label>
|
|
243
256
|
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="Wim-fT-xNl">
|
|
@@ -282,7 +295,7 @@
|
|
|
282
295
|
<constraint firstAttribute="height" constant="21" id="664-Z3-V7W"/>
|
|
283
296
|
</constraints>
|
|
284
297
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
|
285
|
-
<color key="textColor"
|
|
298
|
+
<color key="textColor" systemColor="labelColor"/>
|
|
286
299
|
<nil key="highlightedColor"/>
|
|
287
300
|
</label>
|
|
288
301
|
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="hidden_invisible" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vt6-b1-U0h">
|
|
@@ -291,7 +304,7 @@
|
|
|
291
304
|
<constraint firstAttribute="height" constant="21" id="51j-sl-XYd"/>
|
|
292
305
|
</constraints>
|
|
293
306
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
|
294
|
-
<color key="textColor"
|
|
307
|
+
<color key="textColor" systemColor="labelColor"/>
|
|
295
308
|
<nil key="highlightedColor"/>
|
|
296
309
|
</label>
|
|
297
310
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GsS-jO-scK">
|
|
@@ -319,7 +332,7 @@
|
|
|
319
332
|
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no"/>
|
|
320
333
|
</textField>
|
|
321
334
|
</subviews>
|
|
322
|
-
<color key="backgroundColor"
|
|
335
|
+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
|
323
336
|
<constraints>
|
|
324
337
|
<constraint firstItem="GsS-jO-scK" firstAttribute="leading" secondItem="Ucg-Ag-VpP" secondAttribute="leadingMargin" constant="154" id="1RA-Fx-3Jh"/>
|
|
325
338
|
<constraint firstItem="SjL-dx-Zsi" firstAttribute="top" secondItem="U7D-NR-20N" secondAttribute="bottom" constant="8" id="3NW-Hc-tPr"/>
|
|
@@ -445,7 +458,7 @@
|
|
|
445
458
|
<constraint firstAttribute="height" constant="21" id="2qA-NT-ddc"/>
|
|
446
459
|
</constraints>
|
|
447
460
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
|
448
|
-
<color key="textColor"
|
|
461
|
+
<color key="textColor" systemColor="labelColor"/>
|
|
449
462
|
<nil key="highlightedColor"/>
|
|
450
463
|
</label>
|
|
451
464
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3Zk-wE-jwj">
|
|
@@ -466,7 +479,7 @@
|
|
|
466
479
|
<state key="normal" title="Create Alert (Force Touch)"/>
|
|
467
480
|
</button>
|
|
468
481
|
</subviews>
|
|
469
|
-
<color key="backgroundColor"
|
|
482
|
+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
|
470
483
|
<constraints>
|
|
471
484
|
<constraint firstItem="3Zk-wE-jwj" firstAttribute="centerX" secondItem="JWE-cA-TW0" secondAttribute="centerX" id="83u-1W-xLt"/>
|
|
472
485
|
<constraint firstItem="D7g-22-s49" firstAttribute="centerX" secondItem="JWE-cA-TW0" secondAttribute="centerX" id="9nT-k0-9gf"/>
|
|
@@ -527,7 +540,7 @@
|
|
|
527
540
|
</connections>
|
|
528
541
|
</button>
|
|
529
542
|
</subviews>
|
|
530
|
-
<color key="backgroundColor"
|
|
543
|
+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
|
531
544
|
<constraints>
|
|
532
545
|
<constraint firstItem="vYb-QB-vwU" firstAttribute="centerX" secondItem="55R-aH-x4M" secondAttribute="centerX" id="0MT-Eq-8dG"/>
|
|
533
546
|
<constraint firstItem="vYb-QB-vwU" firstAttribute="top" secondItem="yvD-8P-ibI" secondAttribute="bottom" constant="20" id="c3y-G3-HCj"/>
|
|
@@ -548,7 +561,7 @@
|
|
|
548
561
|
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="jo0-3M-nUd">
|
|
549
562
|
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
|
550
563
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
551
|
-
<color key="backgroundColor"
|
|
564
|
+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
|
552
565
|
<prototypes>
|
|
553
566
|
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" textLabel="2mC-E2-VxB" style="IBUITableViewCellStyleDefault" id="wCs-18-PFf">
|
|
554
567
|
<rect key="frame" x="0.0" y="50" width="414" height="44"/>
|
|
@@ -561,7 +574,7 @@
|
|
|
561
574
|
<rect key="frame" x="20" y="0.0" width="374" height="44"/>
|
|
562
575
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
|
563
576
|
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
|
564
|
-
<color key="textColor"
|
|
577
|
+
<color key="textColor" systemColor="labelColor"/>
|
|
565
578
|
<nil key="highlightedColor"/>
|
|
566
579
|
</label>
|
|
567
580
|
</subviews>
|
|
@@ -603,7 +616,7 @@
|
|
|
603
616
|
</userDefinedRuntimeAttributes>
|
|
604
617
|
</scrollView>
|
|
605
618
|
</subviews>
|
|
606
|
-
<color key="backgroundColor"
|
|
619
|
+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
|
607
620
|
<constraints>
|
|
608
621
|
<constraint firstItem="xEQ-MI-a2g" firstAttribute="top" secondItem="KLL-RT-L40" secondAttribute="top" id="Bep-no-nwg"/>
|
|
609
622
|
<constraint firstAttribute="trailing" secondItem="xEQ-MI-a2g" secondAttribute="trailing" id="akP-zz-jsv"/>
|
|
@@ -624,6 +637,9 @@
|
|
|
624
637
|
</scene>
|
|
625
638
|
</scenes>
|
|
626
639
|
<resources>
|
|
640
|
+
<systemColor name="labelColor">
|
|
641
|
+
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
|
642
|
+
</systemColor>
|
|
627
643
|
<systemColor name="systemBackgroundColor">
|
|
628
644
|
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
|
629
645
|
</systemColor>
|
|
@@ -21,14 +21,10 @@
|
|
|
21
21
|
|
|
22
22
|
@implementation FBConfigurationTests
|
|
23
23
|
|
|
24
|
-
- (void)
|
|
24
|
+
- (void)testReduceMotion
|
|
25
25
|
{
|
|
26
|
-
[super setUp];
|
|
27
26
|
[self launchApplication];
|
|
28
|
-
}
|
|
29
27
|
|
|
30
|
-
- (void)testReduceMotion
|
|
31
|
-
{
|
|
32
28
|
BOOL defaultReduceMotionEnabled = FBConfiguration.sharedInstance.reduceMotionEnabled;
|
|
33
29
|
|
|
34
30
|
FBConfiguration.sharedInstance.reduceMotionEnabled = YES;
|
|
@@ -44,6 +40,9 @@
|
|
|
44
40
|
XCTSkip(@"Deliberately freezes the app for several seconds, too slow/flaky for CI");
|
|
45
41
|
}
|
|
46
42
|
|
|
43
|
+
// Launch only after the CI skip so a skipped test cannot time out in app startup.
|
|
44
|
+
[self launchApplication];
|
|
45
|
+
|
|
47
46
|
NSTimeInterval previousDeadline = FBConfiguration.sharedInstance.accessibilityDeadline;
|
|
48
47
|
// Also bounds any snapshot-based wait -tap itself may perform once the app is stuck.
|
|
49
48
|
FBConfiguration.sharedInstance.accessibilityDeadline = 3.0;
|