Permalink
Browse files

Add new message field

As part of adding the message field, we go ahead and set up the table view controller we’ll be using. We set the accessibility identifier on the field to "messageTextField" so the acceptance test can find it.

![message text field](messageTextField.png)

The next error we get is similar: now we can’t find the Save button:

Red: NoMatchingElementException. accessibilityID('saveButton')
  • Loading branch information...
CodingItWrong committed Jan 2, 2018
1 parent ae3a817 commit 415591ad2008349573369b8d10f60ce51284e786
@@ -12,6 +12,7 @@
031D41971FFB0D8B00738CDE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 031D41961FFB0D8B00738CDE /* Assets.xcassets */; };
031D419A1FFB0D8B00738CDE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 031D41981FFB0D8B00738CDE /* LaunchScreen.storyboard */; };
031D41B11FFB0F3000738CDE /* CreatingAMessageTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 031D41B01FFB0F3000738CDE /* CreatingAMessageTest.swift */; };
031D41B51FFB0FDC00738CDE /* MessagesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 031D41B41FFB0FDC00738CDE /* MessagesViewController.swift */; };
4B32BCF2F40577F8ED96D981 /* EarlGrey.framework in EarlGrey Copy Files */ = {isa = PBXBuildFile; fileRef = ABE0AD732ED68DBB126181AB /* EarlGrey.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
579FB8715C3FAB22FE945D98 /* EarlGrey.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABE0AD732ED68DBB126181AB /* EarlGrey.framework */; };
7558B69A86CACB1E4542B5A1 /* Pods_LearnTDDInCocoaTouch.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B72CFF61DC9E26B62D5D706C /* Pods_LearnTDDInCocoaTouch.framework */; };
@@ -54,6 +55,7 @@
031D41A01FFB0D8B00738CDE /* LearnTDDInCocoaTouchTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LearnTDDInCocoaTouchTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
031D41A61FFB0D8B00738CDE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
031D41B01FFB0F3000738CDE /* CreatingAMessageTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreatingAMessageTest.swift; sourceTree = "<group>"; };
031D41B41FFB0FDC00738CDE /* MessagesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagesViewController.swift; sourceTree = "<group>"; };
1F125ED073084CD5A75837DD /* Pods-LearnTDDInCocoaTouch.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LearnTDDInCocoaTouch.release.xcconfig"; path = "Pods/Target Support Files/Pods-LearnTDDInCocoaTouch/Pods-LearnTDDInCocoaTouch.release.xcconfig"; sourceTree = "<group>"; };
5BA5D5DB522BFD732C81EB16 /* EarlGrey.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EarlGrey.swift; sourceTree = "<group>"; };
85A9AE3C4EEE4CA0BB3F364C /* Pods_LearnTDDInCocoaTouchTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LearnTDDInCocoaTouchTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -112,6 +114,7 @@
031D41961FFB0D8B00738CDE /* Assets.xcassets */,
031D41981FFB0D8B00738CDE /* LaunchScreen.storyboard */,
031D419B1FFB0D8B00738CDE /* Info.plist */,
031D41B41FFB0FDC00738CDE /* MessagesViewController.swift */,
);
path = LearnTDDInCocoaTouch;
sourceTree = "<group>";
@@ -367,6 +370,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
031D41B51FFB0FDC00738CDE /* MessagesViewController.swift in Sources */,
031D41901FFB0D8B00738CDE /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -1,11 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="3xp-yl-5MK">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes/>
<scenes>
<!--Messages View Controller-->
<scene sceneID="5n4-cG-46f">
<objects>
<tableViewController id="3xp-yl-5MK" customClass="MessagesViewController" customModule="LearnTDDInCocoaTouch" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="twS-W8-9oa">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<view key="tableHeaderView" contentMode="scaleToFill" id="6FX-fV-jGn">
<rect key="frame" x="0.0" y="0.0" width="375" height="58"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="OZZ-xr-cgC">
<rect key="frame" x="8" y="8" width="353" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" identifier="messageTextField"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="tew-VC-lKJ">
<rect key="frame" x="0.0" y="86" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="tew-VC-lKJ" id="iyF-Yw-bqs">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="3xp-yl-5MK" id="qjn-Wt-Gss"/>
<outlet property="delegate" destination="3xp-yl-5MK" id="jGL-fJ-sZ4"/>
</connections>
</tableView>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="51D-tk-gZd" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="13.6" y="116.49175412293854"/>
</scene>
</scenes>
</document>
@@ -0,0 +1,5 @@
import UIKit
class MessagesViewController: UITableViewController {
}

0 comments on commit 415591a

Please sign in to comment.