Signed-off-by: Aaron Raimist <aaron@raim.ist>
This commit is contained in:
Aaron Raimist 2021-12-09 09:10:23 +00:00
parent 7b94e13a84
commit 2e8a93834b
103 changed files with 232 additions and 209 deletions

View file

@ -17,6 +17,7 @@ limitations under the License.
import { exec } from 'child_process';
import request = require('request-promise-native');
import { RestSession } from './session';
import { RestMultiSession } from './multi';

View file

@ -16,6 +16,7 @@ limitations under the License.
*/
import uuidv4 = require('uuid/v4');
import { RestSession } from "./session";
import { Logger } from "../logger";

View file

@ -15,6 +15,7 @@ limitations under the License.
*/
import request = require('request-promise-native');
import { Logger } from '../logger';
import { RestRoom } from './room';
import { approveConsent } from './consent';

View file

@ -15,8 +15,9 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { ElementSession } from "../session";
import { strict as assert } from 'assert';
import { ElementSession } from "../session";
import { sendMessage } from '../usecases/send-message';
import { acceptInvite } from '../usecases/accept-invite';
import { receiveMessage } from '../usecases/timeline';
@ -24,7 +25,6 @@ import { createDm } from '../usecases/create-room';
import { checkRoomSettings } from '../usecases/room-settings';
import { startSasVerification, acceptSasVerification } from '../usecases/verify';
import { setupSecureBackup } from '../usecases/security';
import { strict as assert } from 'assert';
import { measureStart, measureStop } from '../util';
export async function e2eEncryptionScenarios(alice: ElementSession, bob: ElementSession) {

View file

@ -15,6 +15,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { strict as assert } from 'assert';
import { delay } from '../util';
import { join } from '../usecases/join';
import { sendMessage } from '../usecases/send-message';
@ -25,7 +27,6 @@ import {
import { createRoom } from '../usecases/create-room';
import { getMembersInMemberlist } from '../usecases/memberlist';
import { changeRoomSettings } from '../usecases/room-settings';
import { strict as assert } from 'assert';
import { RestMultiSession } from "../rest/multi";
import { ElementSession } from "../session";

View file

@ -1,5 +1,3 @@
import { ElementSession } from "../session";
/*
Copyright 2021 The Matrix.org Foundation C.I.C.
@ -17,6 +15,7 @@ limitations under the License.
*/
import { createSpace, inviteSpace } from "../usecases/create-space";
import { ElementSession } from "../session";
export async function spacesScenarios(alice: ElementSession, bob: ElementSession): Promise<void> {
console.log(" creating a space for spaces scenarios:");

View file

@ -16,6 +16,7 @@ limitations under the License.
*/
import * as puppeteer from 'puppeteer';
import { Logger } from './logger';
import { LogBuffer } from './logbuffer';
import { delay } from './util';

View file

@ -15,9 +15,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import * as puppeteer from "puppeteer";
import { measureStart, measureStop } from '../util';
import { ElementSession } from "../session";
import * as puppeteer from "puppeteer";
export async function openRoomDirectory(session: ElementSession): Promise<void> {
const roomDirectoryButton = await session.query('.mx_LeftPanel_exploreButton');

View file

@ -16,6 +16,7 @@ limitations under the License.
*/
import { strict as assert } from 'assert';
import { ElementSession } from "../session";
export async function assertDialog(session: ElementSession, expectedTitle: string): Promise<void> {

View file

@ -16,9 +16,10 @@ limitations under the License.
*/
import { strict as assert } from 'assert';
import { ElementHandle } from "puppeteer";
import { openRoomSummaryCard } from "./rightpanel";
import { ElementSession } from "../session";
import { ElementHandle } from "puppeteer";
export async function openMemberInfo(session: ElementSession, name: String): Promise<void> {
const membersAndNames = await getMembersInMemberlist(session);

View file

@ -16,10 +16,11 @@ limitations under the License.
*/
import { strict as assert } from 'assert';
import { ElementHandle } from "puppeteer";
import { openRoomSummaryCard } from "./rightpanel";
import { acceptDialog } from './dialog';
import { ElementSession } from "../session";
import { ElementHandle } from "puppeteer";
export async function setSettingsToggle(session: ElementSession, toggle: ElementHandle, enabled): Promise<boolean> {
const className = await session.getElementProperty(toggle, "className");

View file

@ -15,6 +15,7 @@ limitations under the License.
*/
import { strict as assert } from 'assert';
import { ElementSession } from "../session";
export async function sendMessage(session: ElementSession, message: string): Promise<void> {

View file

@ -16,6 +16,7 @@ limitations under the License.
*/
import { strict as assert } from 'assert';
import { ElementSession } from "../session";
export async function openSettings(session: ElementSession, section: string): Promise<void> {

View file

@ -16,6 +16,7 @@ limitations under the License.
*/
import { strict as assert } from 'assert';
import { ElementSession } from "../session";
export async function signup(session: ElementSession, username: string, password: string,

View file

@ -16,9 +16,10 @@ limitations under the License.
*/
import { strict as assert } from 'assert';
import { ElementSession } from "../session";
import { ElementHandle } from "puppeteer";
import { ElementSession } from "../session";
export async function scrollToTimelineTop(session: ElementSession): Promise<void> {
session.log.step(`scrolls to the top of the timeline`);
await session.page.evaluate(() => {

View file

@ -15,6 +15,7 @@ limitations under the License.
*/
import { strict as assert } from 'assert';
import { ElementSession } from "../session";
export async function assertNoToasts(session: ElementSession): Promise<void> {

View file

@ -16,6 +16,7 @@ limitations under the License.
*/
import { strict as assert } from 'assert';
import { openMemberInfo } from "./memberlist";
import { ElementSession } from "../session";

View file

@ -14,12 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import * as fs from "fs";
import program = require('commander');
import { ElementSession } from './src/session';
import { scenario } from './src/scenario';
import { RestSessionCreator } from './src/rest/creator';
import * as fs from "fs";
import program = require('commander');
program
.option('--no-logs', "don't output logs, document html on error", false)
.option('--app-url [url]', "url to test", "http://localhost:5000")