mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-06 14:38:21 +00:00
Playwright test for history sharing on invite (#30948)
* Playwright: `getCurrentRoomIdFromUrl` Helper function to fish a room ID out of the URL * Playwright: use updated `Credentials` class from common lib Pick up the extended `Credentials` interface that was added in https://github.com/element-hq/element-modules/pull/80. * Playwright: use `routeConfigJson` from common lib https://github.com/element-hq/element-modules/pull/81 added a utility function for building and routing `config.json`; we should use it. * Playwright test for history sharing on invite Fixes https://github.com/element-hq/element-meta/issues/2920 * Avoid use of CSS in playwright locators
This commit is contained in:
committed by
GitHub
parent
0fcc4d15c8
commit
4a0e8d661f
@@ -27,8 +27,7 @@ test.describe("Create Knock Room", () => {
|
||||
|
||||
await expect(page.locator(".mx_RoomHeader").getByText("Cybersecurity")).toBeVisible();
|
||||
|
||||
const urlHash = await page.evaluate(() => window.location.hash);
|
||||
const roomId = urlHash.replace("#/room/", "");
|
||||
const roomId = await app.getCurrentRoomIdFromUrl();
|
||||
|
||||
// Room should have a knock join rule
|
||||
await waitForRoom(page, app.client, roomId, (room) => {
|
||||
@@ -44,8 +43,7 @@ test.describe("Create Knock Room", () => {
|
||||
|
||||
await expect(page.locator(".mx_RoomHeader").getByText("Cybersecurity")).toBeVisible();
|
||||
|
||||
const urlHash = await page.evaluate(() => window.location.hash);
|
||||
const roomId = urlHash.replace("#/room/", "");
|
||||
const roomId = await app.getCurrentRoomIdFromUrl();
|
||||
|
||||
await app.settings.openRoomSettings("Security & Privacy");
|
||||
|
||||
@@ -70,8 +68,7 @@ test.describe("Create Knock Room", () => {
|
||||
|
||||
await expect(page.locator(".mx_RoomHeader").getByText("Cybersecurity")).toBeVisible();
|
||||
|
||||
const urlHash = await page.evaluate(() => window.location.hash);
|
||||
const roomId = urlHash.replace("#/room/", "");
|
||||
const roomId = await app.getCurrentRoomIdFromUrl();
|
||||
|
||||
// Room should have a knock join rule
|
||||
await waitForRoom(page, app.client, roomId, (room) => {
|
||||
|
||||
Reference in New Issue
Block a user