From 3818dfc859703ab1112b0e592e845981ec30fb21 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 1 Mar 2022 13:05:30 +0000 Subject: [PATCH] Add end-to-end test for the user view (#7926) --- test/end-to-end-tests/src/scenario.ts | 2 ++ .../src/scenarios/user-view.ts | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 test/end-to-end-tests/src/scenarios/user-view.ts diff --git a/test/end-to-end-tests/src/scenario.ts b/test/end-to-end-tests/src/scenario.ts index 81b1f4041e..88b5a948c1 100644 --- a/test/end-to-end-tests/src/scenario.ts +++ b/test/end-to-end-tests/src/scenario.ts @@ -26,6 +26,7 @@ import { RestMultiSession } from "./rest/multi"; import { spacesScenarios } from './scenarios/spaces'; import { RestSession } from "./rest/session"; import { stickerScenarios } from './scenarios/sticker'; +import { userViewScenarios } from "./scenarios/user-view"; export async function scenario(createSession: (s: string) => Promise, restCreator: RestSessionCreator): Promise { @@ -45,6 +46,7 @@ export async function scenario(createSession: (s: string) => Promise { + console.log(" viewing a user from a permalink:"); + + alice.log.step(`views Bob's profile`); + await alice.goto(alice.url(`/#/user/@${bob.username}:localhost`)); + const profile = await alice.query("#mx_RightPanel .mx_UserInfo_profile h2"); + assert.equal(await alice.innerText(profile), "bob"); + alice.log.done(); +}