venmo / VENTokenField

Easy-to-use token field that is used in the Venmo app.
MIT License
794 stars 195 forks source link

Improve collapse test, and reset view state after basic flow test #46

Closed brockboland closed 9 years ago

brockboland commented 9 years ago

Fixes #42

ayanonagon commented 9 years ago

This is great, thank you! :octocat: One question, wouldn’t the test fail if any of the tests runs before the first test?

brockboland commented 9 years ago

It shouldn't! I added back-spacing at the end of testBasicFlow to reset to the starting state, and confirmed that testResignFirstResponderAndCollapse works when run alone or as part of the full suite of tests.

ayanonagon commented 9 years ago

I guess testResignFirstResponderAndCollapse puts you in the 3 people state, but doesn’t affect the other tests. :+1:

brockboland commented 9 years ago

Ooh, good point: testResignFirstResponderAndCollapse is NOT resetting things to the starting state. It seems like there should be an afterEach method to clean things up, but it's tough because there's not a good way to clear all the existing tokens through KIF without simulating a bunch of backspaces.

ayanonagon commented 9 years ago

Yeah, definitely a little tough. For now though, this is a huge improvement, so I’ll merge it in. Thanks again @brockboland! :octocat: