You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error fields auto-set error messages if given, can specify a different text field border color, can have the validator add the colored border to errored text fields
XCTAssert(errors.count ==1,"Should come back with errors")
215
+
iflet errorText =self.ERROR_LABEL.text {
216
+
XCTAssert(errorText ==errors[self.REGISTER_TXT_FIELD]!.errorMessage,"Shouldn't have an error message on the label, got: \(self.ERROR_LABEL.text!), expected: \(errors[self.REGISTER_TXT_FIELD]!.errorMessage)")
217
+
}else{
218
+
XCTAssert(false,"Error label should have text, not nil")
XCTAssert(errors.count ==1,"Should come back with errors")
228
+
iflet errorText =self.ERROR_LABEL.text {
229
+
XCTAssert(errorText ==errors[self.REGISTER_TXT_FIELD]!.errorMessage,"Shouldn't have an error message on the label, got: \(self.ERROR_LABEL.text!), expected: \(errors[self.REGISTER_TXT_FIELD]!.errorMessage)")
230
+
231
+
self.REGISTER_TXT_FIELD.text =self.VALID_EMAIL
232
+
self.REGISTER_VALIDATOR.validate{(errors)->Voidin
233
+
XCTAssert(errors.count ==0,"Should not come back with errors")
234
+
XCTAssert(self.ERROR_LABEL.text ==nil,"Shouldn't have an error message on the label")
235
+
}
236
+
}else{
237
+
XCTAssert(false,"Error label should have text, not nil")
0 commit comments