Skip to content

Instantly share code, notes, and snippets.

@tilltue
Last active June 24, 2018 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tilltue/89c6403b76044d85e65fd73f6abdf5e6 to your computer and use it in GitHub Desktop.
Save tilltue/89c6403b76044d85e65fd73f6abdf5e6 to your computer and use it in GitHub Desktop.
환율 선택 UI테스트
class CurrencySelectedViewController_UITest: XCTestCase {
var purchaseInputCoordinator: PurchaseInputCoordinator!
var purchaseInputViewController: PurchaseInputViewController!
let disposeBag = DisposeBag()
//...
//엔화를 선택하면 물품입력 화면에 통화가 엔화로 변경된다.
//expect: JPY selected -> changed currency at input purchase view
func test_SelectedCurrency() {
EarlGrey.select(elementWithMatcher: grey_accessibilityID("CurrencySelectedView")).perform(grey_tap())
EarlGrey.select(elementWithMatcher: CustomMatcher.displayLabel(text: "2018년 03월 18일").matcher).assert(grey_sufficientlyVisible())
EarlGrey.select(elementWithMatcher: grey_text("JPY"))
.usingSearch(grey_scrollInDirection(GREYDirection.up, 700),
onElementWith: grey_accessibilityID("CurrencySelectedTableView"))
.perform(grey_tap())
EarlGrey.select(elementWithMatcher: CustomMatcher.displayLabel(text: "일본 옌").matcher).assert(grey_sufficientlyVisible())
}
//...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment