Benchmark multiple common user scenario
This commit is contained in:
parent
bef20dde48
commit
19cae42161
7 changed files with 38 additions and 8 deletions
|
@ -15,6 +15,8 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
const { measureStart, measureStop } = require('../util');
|
||||
|
||||
async function openRoomDirectory(session) {
|
||||
const roomDirectoryButton = await session.query('.mx_LeftPanel_exploreButton');
|
||||
await roomDirectoryButton.click();
|
||||
|
@ -52,6 +54,8 @@ async function createRoom(session, roomName, encrypted=false) {
|
|||
async function createDm(session, invitees) {
|
||||
session.log.step(`creates DM with ${JSON.stringify(invitees)}`);
|
||||
|
||||
await measureStart(session, "mx_CreateDM");
|
||||
|
||||
const dmsSublist = await findSublist(session, "people");
|
||||
const startChatButton = await dmsSublist.$(".mx_RoomSublist_auxButton");
|
||||
await startChatButton.click();
|
||||
|
@ -76,6 +80,8 @@ async function createDm(session, invitees) {
|
|||
|
||||
await session.query('.mx_MessageComposer');
|
||||
session.log.done();
|
||||
|
||||
await measureStop(session, "mx_CreateDM");
|
||||
}
|
||||
|
||||
module.exports = {openRoomDirectory, findSublist, createRoom, createDm};
|
||||
|
|
|
@ -16,9 +16,12 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
const {openRoomDirectory} = require('./create-room');
|
||||
const { measureStart, measureStop } = require('../util');
|
||||
|
||||
|
||||
module.exports = async function join(session, roomName) {
|
||||
session.log.step(`joins room "${roomName}"`);
|
||||
await measureStart(session, "mx_JoinRoom");
|
||||
await openRoomDirectory(session);
|
||||
const roomInput = await session.query('.mx_DirectorySearchBox input');
|
||||
await session.replaceInputText(roomInput, roomName);
|
||||
|
@ -26,5 +29,6 @@ module.exports = async function join(session, roomName) {
|
|||
const joinFirstLink = await session.query('.mx_RoomDirectory_table .mx_RoomDirectory_join .mx_AccessibleButton');
|
||||
await joinFirstLink.click();
|
||||
await session.query('.mx_MessageComposer');
|
||||
await measureStop(session, "mx_JoinRoom");
|
||||
session.log.done();
|
||||
};
|
||||
|
|
|
@ -74,7 +74,7 @@ async function doSasVerification(session) {
|
|||
return sasCodes;
|
||||
}
|
||||
|
||||
module.exports.startSasVerifcation = async function(session, name) {
|
||||
module.exports.startSasVerification = async function(session, name) {
|
||||
session.log.startGroup("starts verification");
|
||||
await startVerification(session, name);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue