Skip to content

Commit

Permalink
Add About Screen UI tests
Browse files Browse the repository at this point in the history
Signed-off-by: Pushpinder Pal Singh <[email protected]>
  • Loading branch information
swiftlysingh committed Aug 1, 2020
1 parent ab39d5b commit 93eec01
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion SpaceDash/View/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="justified" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" minimumFontSize="13" translatesAutoresizingMaskIntoConstraints="NO" id="EV8-EB-CFC">
<rect key="frame" x="8" y="44" width="358" height="152"/>
<string key="text">SpaceDash is dashboard for all SpaceX stuff. This app will be a Dashboard for all the updates you desire from SpaceX. This app is still under active development. I have plans of adding some AR stuff and integerating some other API’s that will help me to diversify for different Space Agencies. I hope you are as excited as me to see what’s next for this app!</string>
<string key="text">SpaceDash is dashboard for all SpaceX stuff. This app will be a Dashboard for all the updates you desire from SpaceX. This app is still under active development. I have plans of adding some AR stuff and integrating some other API’s that will help me to diversify for different Space Agencies. I hope you are as excited as me to see what’s next for this app!</string>
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
Expand Down
21 changes: 21 additions & 0 deletions SpaceDashUITests/SpaceDashUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,26 @@ class SpaceXUITests: XCTestCase {
XCTAssertTrue(ships.exists)
}
}
func testAboutUI() throws {

let app = XCUIApplication()
app.tabBars.buttons["About"].twoFingerTap()

let aboutSpaceXTitle = app.staticTexts["About SpaceX"]
let aboutSpaceXPred = NSPredicate(format: "label like 'Space Exploration Technologies Corp., trading as SpaceX, is an American aerospace manufacturer and space transportation services company headquartered in Hawthorne, California. It was founded in 2002 by Elon Musk with the goal of reducing space transportation costs to enable the colonization of Mars.'")
let aboutSpaceXDesc = app.staticTexts.element(matching: aboutSpaceXPred)

let aboutSpaceDashTitle = app.staticTexts["About SpaceDash"]
let aboutSpaceDashPred = NSPredicate(format: "label like'SpaceDash is dashboard for all SpaceX stuff. This app will be a Dashboard for all the updates you desire from SpaceX. This app is still under active development. I have plans of adding some AR stuff and integrating some other API’s that will help me to diversify for different Space Agencies. I hope you are as excited as me to see what’s next for this app!'")
let aboutSpaceDashDesc = app.staticTexts.element(matching: aboutSpaceDashPred)

if app.tabBars.buttons["About"].isSelected {
XCTAssertTrue(aboutSpaceXDesc.exists)
XCTAssertTrue(aboutSpaceXTitle.exists)
XCTAssertTrue(aboutSpaceDashDesc.exists)
XCTAssertTrue(aboutSpaceDashTitle.exists)
}

}
}

0 comments on commit 93eec01

Please sign in to comment.