Run Playwright tests on Firefox & "Safari" nightly (#28757)
* Run Playwright tests on Firefox Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update playwright.config.ts * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update end-to-end-tests.yaml * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Finalise Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Documentation Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * typo Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -15,37 +15,43 @@ test.describe("Room Directory", () => {
|
||||
botCreateOpts: { displayName: "Paul" },
|
||||
});
|
||||
|
||||
test("should allow admin to add alias & publish room to directory", async ({ page, app, user, bot }) => {
|
||||
const roomId = await app.client.createRoom({
|
||||
name: "Gaming",
|
||||
preset: "public_chat" as Preset,
|
||||
});
|
||||
test(
|
||||
"should allow admin to add alias & publish room to directory",
|
||||
{ tag: "@no-webkit" },
|
||||
async ({ page, app, user, bot }) => {
|
||||
const roomId = await app.client.createRoom({
|
||||
name: "Gaming",
|
||||
preset: "public_chat" as Preset,
|
||||
});
|
||||
|
||||
await app.viewRoomByName("Gaming");
|
||||
await app.settings.openRoomSettings();
|
||||
await app.viewRoomByName("Gaming");
|
||||
await app.settings.openRoomSettings();
|
||||
|
||||
// First add a local address `gaming`
|
||||
const localAddresses = page.locator(".mx_SettingsFieldset", { hasText: "Local Addresses" });
|
||||
await localAddresses.getByRole("textbox").fill("gaming");
|
||||
await localAddresses.getByRole("button", { name: "Add" }).click();
|
||||
await expect(localAddresses.getByText("#gaming:localhost")).toHaveClass("mx_EditableItem_item");
|
||||
// First add a local address `gaming`
|
||||
const localAddresses = page.locator(".mx_SettingsFieldset", { hasText: "Local Addresses" });
|
||||
await localAddresses.getByRole("textbox").fill("gaming");
|
||||
await localAddresses.getByRole("button", { name: "Add" }).click();
|
||||
await expect(localAddresses.getByText("#gaming:localhost")).toHaveClass("mx_EditableItem_item");
|
||||
|
||||
// Publish into the public rooms directory
|
||||
const publishedAddresses = page.locator(".mx_SettingsFieldset", { hasText: "Published Addresses" });
|
||||
await expect(publishedAddresses.locator("#canonicalAlias")).toHaveValue("#gaming:localhost");
|
||||
const checkbox = publishedAddresses
|
||||
.locator(".mx_SettingsFlag", { hasText: "Publish this room to the public in localhost's room directory?" })
|
||||
.getByRole("switch");
|
||||
await checkbox.check();
|
||||
await expect(checkbox).toBeChecked();
|
||||
// Publish into the public rooms directory
|
||||
const publishedAddresses = page.locator(".mx_SettingsFieldset", { hasText: "Published Addresses" });
|
||||
await expect(publishedAddresses.locator("#canonicalAlias")).toHaveValue("#gaming:localhost");
|
||||
const checkbox = publishedAddresses
|
||||
.locator(".mx_SettingsFlag", {
|
||||
hasText: "Publish this room to the public in localhost's room directory?",
|
||||
})
|
||||
.getByRole("switch");
|
||||
await checkbox.check();
|
||||
await expect(checkbox).toBeChecked();
|
||||
|
||||
await app.closeDialog();
|
||||
await app.closeDialog();
|
||||
|
||||
const resp = await bot.publicRooms({});
|
||||
expect(resp.total_room_count_estimate).toEqual(1);
|
||||
expect(resp.chunk).toHaveLength(1);
|
||||
expect(resp.chunk[0].room_id).toEqual(roomId);
|
||||
});
|
||||
const resp = await bot.publicRooms({});
|
||||
expect(resp.total_room_count_estimate).toEqual(1);
|
||||
expect(resp.chunk).toHaveLength(1);
|
||||
expect(resp.chunk[0].room_id).toEqual(roomId);
|
||||
},
|
||||
);
|
||||
|
||||
test(
|
||||
"should allow finding published rooms in directory",
|
||||
|
||||
Reference in New Issue
Block a user