fix composer issue and more
This commit is contained in:
parent
af0c0c0afe
commit
2c983f8cee
7 changed files with 54 additions and 29 deletions
|
@ -20,20 +20,18 @@ module.exports = async function verifyDeviceForUser(session, name, expectedDevic
|
|||
session.log.step(`verifies e2e device for ${name}`);
|
||||
const memberNameElements = await session.queryAll(".mx_MemberList .mx_EntityTile_name");
|
||||
const membersAndNames = await Promise.all(memberNameElements.map(async (el) => {
|
||||
const innerTextHandle = await memberNameElements.getProperty("innerText");
|
||||
const innerText = await innerTextHandle.jsonValue();
|
||||
return [el, innerText];
|
||||
return [el, await session.innerText(el)];
|
||||
}));
|
||||
const matchingMember = membersAndNames.filter(([el, text]) => {
|
||||
return text === name;
|
||||
}).map(([el, name]) => el);
|
||||
}).map(([el]) => el)[0];
|
||||
await matchingMember.click();
|
||||
const firstVerifyButton = await session.waitAndQuery(".mx_MemberDeviceInfo_verify");
|
||||
await firstVerifyButton.click();
|
||||
const dialogCodeFields = await session.waitAndQueryAll(".mx_QuestionDialog code");
|
||||
assert.equal(dialogCodeFields.length, 2);
|
||||
const deviceId = dialogCodeFields[0];
|
||||
const deviceKey = dialogCodeFields[1];
|
||||
const deviceId = await session.innerText(dialogCodeFields[0]);
|
||||
const deviceKey = await session.innerText(dialogCodeFields[1]);
|
||||
assert.equal(expectedDevice.id, deviceId);
|
||||
assert.equal(expectedDevice.key, deviceKey);
|
||||
const confirmButton = await session.query(".mx_Dialog_primary");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue