add ll tests to check if all expected members are in memberlist
also move verify-device use case to timeline to reuse memberlist query for this test.
This commit is contained in:
parent
5d06c65ce5
commit
239e6a4bce
3 changed files with 33 additions and 11 deletions
|
@ -23,14 +23,17 @@ const {
|
|||
scrollToTimelineTop
|
||||
} = require('../usecases/timeline');
|
||||
const createRoom = require('../usecases/create-room');
|
||||
const {getMembersInMemberlist} = require('../usecases/memberlist');
|
||||
const changeRoomSettings = require('../usecases/room-settings');
|
||||
const {enableLazyLoading} = require('../usecases/settings');
|
||||
const assert = require('assert');
|
||||
|
||||
module.exports = async function lazyLoadingScenarios(alice, bob, charlies) {
|
||||
console.log(" creating a room for lazy loading member scenarios:");
|
||||
await enableLazyLoading(alice);
|
||||
await setupRoomWithBobAliceAndCharlies(alice, bob, charlies);
|
||||
await checkPaginatedDisplayNames(alice, charlies);
|
||||
await checkMemberList(alice, charlies);
|
||||
}
|
||||
|
||||
const room = "Lazy Loading Test";
|
||||
|
@ -69,3 +72,16 @@ async function checkPaginatedDisplayNames(alice, charlies) {
|
|||
}, []);
|
||||
await checkTimelineContains(alice, expectedMessages, "Charly #1-10");
|
||||
}
|
||||
|
||||
async function checkMemberList(alice, charlies) {
|
||||
alice.log.step("checks the memberlist contains herself, bob and all charlies");
|
||||
const displayNames = (await getMembersInMemberlist(alice)).map((m) => m.displayName);
|
||||
assert(displayNames.includes("alice"));
|
||||
assert(displayNames.includes("bob"));
|
||||
charlies.sessions.forEach((charly) => {
|
||||
assert(displayNames.includes(charly.displayName()),
|
||||
`${charly.displayName()} should be in the member list, ` +
|
||||
`only have ${displayNames}`);
|
||||
});
|
||||
alice.log.done();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue