Skip to content

Commit ae30f34

Browse files
committed
neatening up test plans; added a localizable asset catalog image
1 parent dab4904 commit ae30f34

File tree

12 files changed

+99
-15
lines changed

12 files changed

+99
-15
lines changed

bk1ch09p380unitTesting/EmptyWindowUITests/EmptyWindowUITests.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ class EmptyWindowUITests: XCTestCase {
2323
func testExample() {
2424

2525
let app = XCUIApplication()
26-
app.buttons["Howdy"].tap()
26+
let screenshot = XCUIApplication().windows.firstMatch.screenshot()
27+
let attachment = XCTAttachment(screenshot: screenshot)
28+
attachment.lifetime = .keepAlways
29+
attachment.name = "OpeningScreen"
30+
self.add(attachment)
31+
app.buttons["GreetingButton"].tap()
2732
app.alerts["Howdy!"].buttons["OK"].tap()
2833

2934
}

bk1ch09p380unitTesting/EmptyWindow.xctestplan renamed to bk1ch09p380unitTesting/TestPlan1.xctestplan

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
{
22
"configurations" : [
33
{
4-
"name" : "EmptyWindowConfig",
4+
"name" : "TestPlan1Config1",
5+
"options" : {
6+
7+
}
8+
},
9+
{
10+
"name" : "TestPlan1Config2",
511
"options" : {
612

713
}

bk1ch09p380unitTesting/TestPlan.xctestplan renamed to bk1ch09p380unitTesting/TestPlan2.xctestplan

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"configurations" : [
33
{
4-
"name" : "TestPlanConfig",
4+
"name" : "TestPlan2Config",
55
"options" : {
66

77
}

bk1ch09p380unitTesting/bk1ch09p380unitTesting.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
814A1AB01D109C1F008F3FF6 /* EmptyWindowTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = EmptyWindowTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
4848
814A1AB21D109C1F008F3FF6 /* EmptyWindowTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyWindowTests.swift; sourceTree = "<group>"; };
4949
814A1AB41D109C1F008F3FF6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
50-
8185E5BE22D0EED2004AD7E2 /* TestPlan.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = TestPlan.xctestplan; sourceTree = "<group>"; };
51-
8185E5BF22D0EFD2004AD7E2 /* EmptyWindow.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = EmptyWindow.xctestplan; sourceTree = "<group>"; };
50+
8185E5BE22D0EED2004AD7E2 /* TestPlan2.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = TestPlan2.xctestplan; sourceTree = "<group>"; };
51+
8185E5BF22D0EFD2004AD7E2 /* TestPlan1.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = TestPlan1.xctestplan; sourceTree = "<group>"; };
5252
/* End PBXFileReference section */
5353

5454
/* Begin PBXFrameworksBuildPhase section */
@@ -79,8 +79,8 @@
7979
32080BE71AFE632800DB7A17 = {
8080
isa = PBXGroup;
8181
children = (
82-
8185E5BE22D0EED2004AD7E2 /* TestPlan.xctestplan */,
83-
8185E5BF22D0EFD2004AD7E2 /* EmptyWindow.xctestplan */,
82+
8185E5BE22D0EED2004AD7E2 /* TestPlan2.xctestplan */,
83+
8185E5BF22D0EFD2004AD7E2 /* TestPlan1.xctestplan */,
8484
32080BF21AFE632800DB7A17 /* bk1ch09p380unitTesting */,
8585
814A1AA31D109B13008F3FF6 /* EmptyWindowUITests */,
8686
814A1AB11D109C1F008F3FF6 /* EmptyWindowTests */,

bk1ch09p380unitTesting/bk1ch09p380unitTesting/Base.lproj/Main.storyboard

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
1717
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
1818
<subviews>
19-
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KSR-PR-fGd">
19+
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KSR-PR-fGd">
2020
<rect key="frame" x="44" y="45" width="61" height="30"/>
2121
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
22+
<accessibility key="accessibilityConfiguration" identifier="GreetingButton"/>
2223
<state key="normal" title="Howdy"/>
2324
<connections>
2425
<action selector="buttonPressed:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="d97-gm-Ww5"/>

bk1ch09p397localization/Empty Window/Assets.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@
8484
"idiom" : "ipad",
8585
"size" : "83.5x83.5",
8686
"scale" : "2x"
87+
},
88+
{
89+
"idiom" : "ios-marketing",
90+
"size" : "1024x1024",
91+
"scale" : "1x"
8792
}
8893
],
8994
"info" : {
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"version" : 1,
4+
"author" : "xcode"
5+
}
6+
}
283 Bytes
Loading
127 Bytes
Loading
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "180.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"scale" : "1x",
11+
"locale" : "en"
12+
},
13+
{
14+
"locale" : "fr",
15+
"idiom" : "universal",
16+
"filename" : "180_fr.png",
17+
"scale" : "1x"
18+
},
19+
{
20+
"idiom" : "universal",
21+
"scale" : "2x"
22+
},
23+
{
24+
"idiom" : "universal",
25+
"scale" : "2x",
26+
"locale" : "en"
27+
},
28+
{
29+
"idiom" : "universal",
30+
"scale" : "2x",
31+
"locale" : "fr"
32+
},
33+
{
34+
"idiom" : "universal",
35+
"scale" : "3x"
36+
},
37+
{
38+
"idiom" : "universal",
39+
"scale" : "3x",
40+
"locale" : "en"
41+
},
42+
{
43+
"idiom" : "universal",
44+
"scale" : "3x",
45+
"locale" : "fr"
46+
}
47+
],
48+
"info" : {
49+
"version" : 1,
50+
"author" : "xcode"
51+
},
52+
"properties" : {
53+
"localizable" : true
54+
}
55+
}

0 commit comments

Comments
 (0)