From 3e6719e8abe97fec86520684f16d321b10727e49 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 25 Apr 2019 18:10:41 +0100 Subject: [PATCH] Wait for password validation --- src/usecases/signup.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/usecases/signup.js b/src/usecases/signup.js index cc58bff28b..a52baea961 100644 --- a/src/usecases/signup.js +++ b/src/usecases/signup.js @@ -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);