Skip to content

Instantly share code, notes, and snippets.

@KaneCheshire
Last active July 9, 2018 12:01
Show Gist options
  • Save KaneCheshire/2788249ee3723d4a4a988dfcc7a6f12e to your computer and use it in GitHub Desktop.
Save KaneCheshire/2788249ee3723d4a4a988dfcc7a6f12e to your computer and use it in GitHub Desktop.
// PhotosTests.swift
class PhotosTests: XCTestCase {
func test_navigatingToPhotos() {
Given(I: logIn)
When(I: selectPhotosButton)
Then(I: seePhotosScreen)
}
private func logIn() {
// Log in code
}
private func selectPhotosButton() {
// Select photos button code
}
private func seePhotosScreen() {
// Assert photos screen is visible
}
}
// SettingsTests.swift
class SettingsTests: XCTestCase {
func test_navigatingToSettings() {
Given(I: logIn)
When(I: selectSettingsTab)
Then(I: seeSettingsScreen)
}
private func logIn() {
// Log in code
}
private func selectSettingsTab() {
// Select settings tab code
}
private func seeSettingsScreen() {
// Assert settings screen is visible
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment