mirror of https://github.com/vector-im/riot-web
Fix end to end tests for new UI
parent
226abb457e
commit
802f9a4bc1
|
@ -79,35 +79,18 @@ module.exports = async function signup(session, username, password, homeserver)
|
||||||
const acceptButton = await session.query('.mx_InteractiveAuthEntryComponents_termsSubmit');
|
const acceptButton = await session.query('.mx_InteractiveAuthEntryComponents_termsSubmit');
|
||||||
await acceptButton.click();
|
await acceptButton.click();
|
||||||
|
|
||||||
//plow through cross-signing setup by entering arbitrary details
|
|
||||||
//TODO: It's probably important for the tests to know the passphrase
|
|
||||||
const xsigningPassphrase = 'a7eaXcjpa9!Yl7#V^h$B^%dovHUVX'; // https://xkcd.com/221/
|
|
||||||
let passphraseField = await session.query('.mx_CreateSecretStorageDialog_passPhraseField input');
|
|
||||||
await session.replaceInputText(passphraseField, xsigningPassphrase);
|
|
||||||
await session.delay(1000); // give it a second to analyze our passphrase for security
|
|
||||||
let xsignContButton = await session.query('.mx_CreateSecretStorageDialog .mx_Dialog_buttons .mx_Dialog_primary');
|
let xsignContButton = await session.query('.mx_CreateSecretStorageDialog .mx_Dialog_buttons .mx_Dialog_primary');
|
||||||
await xsignContButton.click();
|
await xsignContButton.click();
|
||||||
|
|
||||||
//repeat passphrase entry
|
|
||||||
passphraseField = await session.query('.mx_CreateSecretStorageDialog_passPhraseField input');
|
|
||||||
await session.replaceInputText(passphraseField, xsigningPassphrase);
|
|
||||||
await session.delay(1000); // give it a second to analyze our passphrase for security
|
|
||||||
xsignContButton = await session.query('.mx_CreateSecretStorageDialog .mx_Dialog_buttons .mx_Dialog_primary');
|
|
||||||
await xsignContButton.click();
|
|
||||||
|
|
||||||
//ignore the recovery key
|
//ignore the recovery key
|
||||||
//TODO: It's probably important for the tests to know the recovery key
|
//TODO: It's probably important for the tests to know the recovery key
|
||||||
const copyButton = await session.query('.mx_CreateSecretStorageDialog_recoveryKeyButtons_copyBtn');
|
const copyButton = await session.query('.mx_CreateSecretStorageDialog_recoveryKeyButtons_copyBtn');
|
||||||
await copyButton.click();
|
await copyButton.click();
|
||||||
|
|
||||||
//acknowledge that we copied the recovery key to a safe place
|
//acknowledge that we copied the recovery key to a safe place
|
||||||
const copyContinueButton = await session.query('.mx_CreateSecretStorageDialog .mx_Dialog_primary');
|
const copyContinueButton = await session.query('.mx_CreateSecretStorageDialog .mx_Dialog_buttons .mx_Dialog_primary');
|
||||||
await copyContinueButton.click();
|
await copyContinueButton.click();
|
||||||
|
|
||||||
//acknowledge that we're done cross-signing setup and our keys are safe
|
|
||||||
const doneOkButton = await session.query('.mx_CreateSecretStorageDialog .mx_Dialog_primary');
|
|
||||||
await doneOkButton.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?
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue