public IEnumerator TC9NoPasswordInputRegistration() { GameObject createAccountCanvas = GameObject.Find("CreateAccountCanvas"); InputField emailInput = createAccountCanvas.transform.Find("UsernameInputField").GetComponent <InputField>(); InputField username = createAccountCanvas.transform.Find("NameInputField").GetComponent <InputField>(); InputField passwordInput = createAccountCanvas.transform.Find("PasswordInputField").GetComponent <InputField>(); InputField passwordConfirmInput = createAccountCanvas.transform.Find("PasswordConfirmInputField").GetComponent <InputField>(); CreateAccountControllerScript createAccountController = createAccountCanvas.transform.Find("CreateAccountController").GetComponent <CreateAccountControllerScript>(); emailInput.text = "*****@*****.**"; username.text = "Tansooyong"; passwordInput.text = ""; passwordConfirmInput.text = "P@55w0rD"; createAccountController.createAccount(); yield return(new WaitForSeconds(10)); Debug.Log(createAccountController.passwordEmpty.ToString()); Assert.IsTrue(createAccountController.passwordEmpty); }
public IEnumerator TC3CorrectRegistration() { GameObject createAccountCanvas = GameObject.Find("CreateAccountCanvas"); InputField emailInput = createAccountCanvas.transform.Find("UsernameInputField").GetComponent <InputField>(); InputField username = createAccountCanvas.transform.Find("NameInputField").GetComponent <InputField>(); InputField passwordInput = createAccountCanvas.transform.Find("PasswordInputField").GetComponent <InputField>(); InputField passwordConfirmInput = createAccountCanvas.transform.Find("PasswordConfirmInputField").GetComponent <InputField>(); CreateAccountControllerScript createAccountController = createAccountCanvas.transform.Find("CreateAccountController").GetComponent <CreateAccountControllerScript>(); emailInput.text = "*****@*****.**"; username.text = "taneleven"; passwordInput.text = "Qwerty123"; passwordConfirmInput.text = "Qwerty123"; createAccountController.createAccount(); yield return(new WaitForSeconds(10)); Debug.Log(createAccountController.check.ToString()); Assert.IsTrue(createAccountController.check); }