Last active
June 17, 2018 15:19
-
-
Save tilltue/964479a7920315f52f0d72ab34941e14 to your computer and use it in GitHub Desktop.
Example Delete Purchase Item
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//테이블 cell 을 delete 하면 물품이 삭제 된다. | |
//expect : cell swipe -> (delete) row | |
func test_DeletePurchaseItem() { | |
let addButtonMatcher = grey_allOf([grey_accessibilityID("addButton"),grey_sufficientlyVisible()]) | |
EarlGrey.select(elementWithMatcher: addButtonMatcher).perform(grey_tap()) | |
EarlGrey.select(elementWithMatcher: CustomMatcher.allOfsufficiently(id: "PriceTextField").matcher).perform(grey_replaceText("300")) | |
EarlGrey.select(elementWithMatcher: CustomMatcher.allOfsufficiently(id: "PurchaseInputConfirm").matcher).perform(grey_tap()) | |
EarlGrey.select(elementWithMatcher: grey_accessibilityID("ListOfPurchasesViewController")).assert(grey_sufficientlyVisible()) | |
EarlGrey.select(elementWithMatcher: grey_text("$ 300")).perform(grey_swipeFastInDirectionWithStartPoint(.left, 0.3, 0.3)) | |
EarlGrey.select(elementWithMatcher: CustomMatcher.displayButton(text: "삭제").matcher).perform(grey_tap()) | |
EarlGrey.select(elementWithMatcher: grey_text("$ 300")).assert(grey_notVisible()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment