protected IEnumerator testStep(string testString, bool shouldSeeError, string message) { message = message + " (" + testString + ") Failed -- "; string messageFieldSuffix; string messageObjectSuffix; if (shouldSeeError) { messageFieldSuffix = "No error triggered"; messageObjectSuffix = "No error message visible"; } else { messageFieldSuffix = "Unexpected error triggered"; messageObjectSuffix = "Unexpected error message visible "; } TestInputField.TextInput.text = testString; TestInputField.StartValidation(); while (!TestInputField.IsValidationComplete) { yield return(null); } IntegrationTestEx.FailIf(TestInputField.HasError != shouldSeeError, message + messageFieldSuffix); IntegrationTestEx.FailIf(ErrorObject.activeInHierarchy != shouldSeeError, message + messageObjectSuffix); }
private IEnumerator submitActions() { if (!DisplayNameInputField.IsValidationInProgress && !DisplayNameInputField.IsValidationComplete) { DisplayNameInputField.StartValidation(); } if (referAFriendEnabled && (!string.IsNullOrEmpty(ReferrerDisplayNameField.TextInput.text) || ReferrerDisplayNameField.HasError) && !ReferrerDisplayNameField.IsValidationInProgress && !ReferrerDisplayNameField.IsValidationComplete) { ReferrerDisplayNameField.StartValidation(); } while (!DisplayNameInputField.IsValidationComplete && (!referAFriendEnabled || !ReferrerDisplayNameField.IsValidationComplete)) { yield return(null); } if (DisplayNameInputField.HasError || ReferrerDisplayNameField.HasError) { ToggleInteraction(isInteractable: true); DisplayNameInputField.IsValidationComplete = false; ReferrerDisplayNameField.IsValidationComplete = false; } else { setDisplayName(); DisplayNameInputField.IsValidationComplete = false; } }
private IEnumerator submitActions() { if (isParentEmailFieldDisplayed && !ParentEmailInputField.IsValidationInProgress && !ParentEmailInputField.IsValidationComplete) { ParentEmailInputField.StartValidation(); } if (isFirstNameFieldDisplayed && !FirstNameInputField.IsValidationInProgress && !FirstNameInputField.IsValidationComplete) { FirstNameInputField.StartValidation(); } if (isLegalTextDisplayed && !LegalPanel.IsValidationInProgress && !LegalPanel.IsValidationComplete) { LegalPanel.ValidateLegalCheckBoxes(); } while ((isParentEmailFieldDisplayed && !ParentEmailInputField.IsValidationComplete) || (isFirstNameFieldDisplayed && !FirstNameInputField.IsValidationComplete) || (isLegalTextDisplayed && !LegalPanel.IsValidationComplete)) { yield return(null); } if ((isParentEmailFieldDisplayed && ParentEmailInputField.HasError) || (isFirstNameFieldDisplayed && FirstNameInputField.HasError) || (isLegalTextDisplayed && LegalPanel.HasError)) { ToggleInteraction(isInteractable: true); } else { updateAccount(); } }
public void StartValidation() { for (int i = 0; i < Validators.Length; i++) { InputFieldValidator inputFieldValidator = Validators[i]; if (!inputFieldValidator.IsValidationInProgress && !inputFieldValidator.IsValidationComplete) { inputFieldValidator.StartValidation(); } } }
private void startValidation() { for (int i = 0; i < validators.Length; i++) { InputFieldValidator inputFieldValidator = validators[i]; if (!inputFieldValidator.IsValidationInProgress && !inputFieldValidator.IsValidationComplete) { inputFieldValidator.StartValidation(); } } if (submitButton != null) { submitButton.SetWaitingForValidation(); } }
public void Update() { if (credentialsError) { if (!UsernameField.HasError) { PasswordField.StartValidation(); } if (!PasswordField.HasError) { UsernameField.StartValidation(); } if (!PasswordField.HasError && !UsernameField.HasError) { credentialsError = false; } } }