TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Esteban Torres.
UITextField category with convenience methods for testing.
This category was primarily created due to FBSnapshotTestCase and ReactiveCocoa working together and "making some issues" or unexpected behaviors on the snapshots.
Due to the RACSignal
s (rac_textSignal
) bindings to UIButton
RACCommand
s responding to changes in UITextField
my FBSnapshotTestCase
were failing.
Even though we were "injecting" the correct data to the model the bindings were not firing the signal to enable the button.
In here you'll find an easy method that will set the text and will also fire the rac_textSignal
.
This is done by setting the text with KVC
and sending actions to the control:
[self setValue:@"<Passed Text>" forKeyPath:NSStringFromSelector(@selector(text))]; // Set the text like this to ensure that `KVO` will fire.
[self sendActionsForControlEvents:UIControlEventEditingChanged]; // This will fire the `rac_textSignal` and its effects.