Skip to content

Commit 5566920

Browse files
committed
remove deprecations from UI test buttons
1 parent 01f2fae commit 5566920

File tree

2 files changed

+20
-71
lines changed

2 files changed

+20
-71
lines changed

tests/hosting-apps/ui-tests-app/Base.lproj/Main.storyboard

Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="sei-4F-1em">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="sei-4F-1em">
33
<device id="retina6_1" orientation="portrait" appearance="light"/>
44
<dependencies>
55
<deployment identifier="iOS"/>
6-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
77
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
88
<capability name="Stack View standard spacing" minToolsVersion="9.0"/>
99
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -18,73 +18,59 @@
1818
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
1919
<subviews>
2020
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="4iW-QJ-TOw">
21-
<rect key="frame" x="110" y="242.5" width="194" height="372"/>
21+
<rect key="frame" x="141.5" y="280.5" width="131" height="296"/>
2222
<subviews>
23-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nrZ-Da-kmk">
24-
<rect key="frame" x="31.5" y="0.0" width="131" height="30"/>
23+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nrZ-Da-kmk">
24+
<rect key="frame" x="0.0" y="0.0" width="131" height="30"/>
2525
<state key="normal" title="Setup Notifications"/>
2626
<connections>
2727
<action selector="setupNotifications:" destination="BYZ-38-t0r" eventType="touchUpInside" id="bnF-di-K3O"/>
2828
</connections>
2929
</button>
30-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6Os-fr-lOW">
31-
<rect key="frame" x="37.5" y="38" width="119" height="30"/>
30+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6Os-fr-lOW">
31+
<rect key="frame" x="6" y="38" width="119" height="30"/>
3232
<state key="normal" title="Send Notification"/>
3333
<connections>
3434
<action selector="sendNotification:" destination="BYZ-38-t0r" eventType="touchUpInside" id="hpJ-gl-lXe"/>
3535
</connections>
3636
</button>
37-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="94b-FC-ZDR">
38-
<rect key="frame" x="1" y="76" width="192" height="30"/>
39-
<state key="normal" title="Show System Notification#1"/>
40-
<connections>
41-
<action selector="showSystemNotificationTap:" destination="BYZ-38-t0r" eventType="touchUpInside" id="RJq-UE-rZ1"/>
42-
</connections>
43-
</button>
44-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ClN-Rv-e5u">
45-
<rect key="frame" x="0.0" y="114" width="194" height="30"/>
46-
<state key="normal" title="Show System Notification#2"/>
47-
<connections>
48-
<action selector="showSystemNotification2Tap:" destination="BYZ-38-t0r" eventType="touchUpInside" id="fP8-Yd-pIm"/>
49-
</connections>
50-
</button>
51-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZWv-tr-ec9">
52-
<rect key="frame" x="48" y="152" width="98" height="30"/>
37+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZWv-tr-ec9">
38+
<rect key="frame" x="16.5" y="76" width="98" height="30"/>
5339
<state key="normal" title="Show InApp#1"/>
5440
<connections>
5541
<action selector="showInAppTap:" destination="BYZ-38-t0r" eventType="touchUpInside" id="pTu-po-2uq"/>
5642
</connections>
5743
</button>
58-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="n7L-ga-JSt">
59-
<rect key="frame" x="47" y="190" width="100" height="30"/>
44+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="n7L-ga-JSt">
45+
<rect key="frame" x="15.5" y="114" width="100" height="30"/>
6046
<state key="normal" title="Show InApp#2"/>
6147
<connections>
6248
<action selector="showInApp2Tap:" destination="BYZ-38-t0r" eventType="touchUpInside" id="DYt-se-gcN"/>
6349
</connections>
6450
</button>
65-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Xdv-Oh-2In">
66-
<rect key="frame" x="46.5" y="228" width="101" height="30"/>
51+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Xdv-Oh-2In">
52+
<rect key="frame" x="15" y="152" width="101" height="30"/>
6753
<state key="normal" title="Show InApp#3"/>
6854
<connections>
6955
<action selector="showInApp3Tap:" destination="BYZ-38-t0r" eventType="touchUpInside" id="6Pw-iU-fHU"/>
7056
</connections>
7157
</button>
72-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Blv-TL-f6k">
73-
<rect key="frame" x="46.5" y="266" width="101" height="30"/>
58+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Blv-TL-f6k">
59+
<rect key="frame" x="15" y="190" width="101" height="30"/>
7460
<state key="normal" title="Show InApp#4"/>
7561
<connections>
7662
<action selector="showInApp4Tap:" destination="BYZ-38-t0r" eventType="touchUpInside" id="UhN-OK-8VY"/>
7763
</connections>
7864
</button>
79-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jGg-qX-F7e">
80-
<rect key="frame" x="47" y="304" width="100" height="30"/>
65+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jGg-qX-F7e">
66+
<rect key="frame" x="15.5" y="228" width="100" height="30"/>
8167
<state key="normal" title="Show InApp#5"/>
8268
<connections>
8369
<action selector="showInApp5Tap:" destination="BYZ-38-t0r" eventType="touchUpInside" id="WvB-Zh-OYU"/>
8470
</connections>
8571
</button>
86-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GXY-1l-3Vc">
87-
<rect key="frame" x="57.5" y="342" width="79" height="30"/>
72+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GXY-1l-3Vc">
73+
<rect key="frame" x="26" y="266" width="79" height="30"/>
8874
<state key="normal" title="Show Inbox"/>
8975
<connections>
9076
<action selector="showInboxTap:" destination="BYZ-38-t0r" eventType="touchUpInside" id="3PG-cc-piS"/>
@@ -99,6 +85,7 @@
9985
<nil key="highlightedColor"/>
10086
</label>
10187
</subviews>
88+
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
10289
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
10390
<constraints>
10491
<constraint firstItem="4iW-QJ-TOw" firstAttribute="centerY" secondItem="6Tk-OE-BBY" secondAttribute="centerY" id="QVv-Ok-cNO"/>
@@ -107,7 +94,6 @@
10794
<constraint firstItem="v7l-Fc-VhY" firstAttribute="bottom" secondItem="6Tk-OE-BBY" secondAttribute="bottom" id="uRg-EL-8X5"/>
10895
<constraint firstItem="v7l-Fc-VhY" firstAttribute="trailing" secondItem="6Tk-OE-BBY" secondAttribute="trailing" id="zgt-bz-AP2"/>
10996
</constraints>
110-
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
11197
</view>
11298
<tabBarItem key="tabBarItem" title="Home" id="Zt0-lc-8Jb"/>
11399
<connections>

tests/ui-tests/UITests.swift

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -101,43 +101,6 @@ class UITests: XCTestCase {
101101
waitForElementToAppear(app.staticTexts["MyUniqueCustomAction"])
102102
}
103103

104-
func testShowSystemNotification() {
105-
// Tap the Left Button
106-
app.buttons["Show System Notification#1"].tap()
107-
108-
let alert = app.alerts.element
109-
waitForElementToAppear(alert)
110-
111-
XCTAssertTrue(alert.staticTexts["Zee Title"].exists)
112-
XCTAssertTrue(alert.staticTexts["Zee Body"].exists)
113-
114-
app.buttons["Left Button"].tap()
115-
116-
waitForElementToAppear(app.staticTexts["Left Button"])
117-
118-
app.buttons["Show System Notification#1"].tap()
119-
waitForElementToAppear(alert)
120-
121-
// Tap the Right Button
122-
app.buttons["Right Button"].tap()
123-
waitForElementToAppear(app.staticTexts["Right Button"])
124-
}
125-
126-
func testShowSystemNotification2() {
127-
// Tap the Left Button
128-
app.buttons["Show System Notification#2"].tap()
129-
130-
let alert = app.alerts.element
131-
waitForElementToAppear(alert)
132-
133-
XCTAssertTrue(alert.staticTexts["Zee Title"].exists)
134-
XCTAssertTrue(alert.staticTexts["Zee Body"].exists)
135-
136-
app.buttons["Zee Button"].tap()
137-
138-
waitForElementToAppear(app.staticTexts["Zee Button"])
139-
}
140-
141104
func testShowInApp1() {
142105
inAppTest(buttonName: "Show InApp#1", linkName: "Click Me", expectedCallbackUrl: "http://website/resource#something")
143106
}

0 commit comments

Comments
 (0)