1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-11 20:22:36 +03:00

Wait for password validation

This commit is contained in:
J. Ryan Stinnett
2019-04-25 18:10:41 +01:00
parent f82f9ecdb2
commit 3e6719e8ab

View File

@@ -43,6 +43,8 @@ module.exports = async function signup(session, username, password, homeserver)
/// has happened before checking the form is good to go
const registerButton = await session.query('.mx_Login_submit');
await registerButton.focus();
// Password validation is async, wait for it to complete before submit
await session.query(".mx_Field_valid #mx_RegistrationForm_password");
//check no errors
const error_text = await session.tryGetInnertext('.mx_Login_error');
assert.strictEqual(!!error_text, false);