Fix the registration process to handle m.login.terms auth

This commit is contained in:
Travis Ralston 2018-11-01 17:55:48 -06:00
parent b2bd134945
commit f607cb2702

View file

@ -59,6 +59,12 @@ module.exports = async function signup(session, username, password, homeserver)
//confirm dialog saying you cant log back in without e-mail //confirm dialog saying you cant log back in without e-mail
const continueButton = await session.waitAndQuery('.mx_QuestionDialog button.mx_Dialog_primary'); const continueButton = await session.waitAndQuery('.mx_QuestionDialog button.mx_Dialog_primary');
await continueButton.click(); await continueButton.click();
//find the privacy policy checkbox and check it
//this should automatically move ahead with registration
const policyCheckbox = await session.waitAndQuery('.mx_Login_box input[type="checkbox"]');
await policyCheckbox.click();
//wait for registration to finish so the hash gets set //wait for registration to finish so the hash gets set
//onhashchange better? //onhashchange better?
await session.delay(2000); await session.delay(2000);