Default the room header to on (#12803)
* Default the room header to on * Refactor code into helper method Add a method to open/close the room info panel and use it everywhere. * Fix broken tests, update snapshots and screenshots * Update room header tests to make sense with the new header
This commit is contained in:
parent
25fcd6a65f
commit
bb1b7f1fd0
59 changed files with 595 additions and 397 deletions
|
@ -224,7 +224,7 @@ test.describe("Cryptography", function () {
|
|||
await checkDMRoom(page);
|
||||
const bobRoomId = await bobJoin(page, bob);
|
||||
await testMessages(page, bob, bobRoomId);
|
||||
await verify(page, bob);
|
||||
await verify(app, bob);
|
||||
|
||||
// Assert that verified icon is rendered
|
||||
await page.getByTestId("base-card-back-button").click();
|
||||
|
@ -246,6 +246,6 @@ test.describe("Cryptography", function () {
|
|||
|
||||
// we need to have a room with the other user present, so we can open the verification panel
|
||||
await createSharedRoomWithUser(app, bob.credentials.userId);
|
||||
await verify(page, bob);
|
||||
await verify(app, bob);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -104,7 +104,7 @@ test.describe("Cryptography", function () {
|
|||
await expect(lastTileE2eIcon).not.toBeVisible();
|
||||
|
||||
/* Now verify Bob */
|
||||
await verify(page, bob);
|
||||
await verify(app, bob);
|
||||
|
||||
/* Existing message should be updated when user is verified. */
|
||||
await expect(last).toContainText("test encrypted 1");
|
||||
|
@ -222,7 +222,7 @@ test.describe("Cryptography", function () {
|
|||
await bobSecondDevice.prepareClient();
|
||||
|
||||
// verify Bob
|
||||
await verify(page, bob);
|
||||
await verify(app, bob);
|
||||
|
||||
// bob sends a valid event
|
||||
const testEvent = await bob.sendMessage(testRoomId, "Hoo!");
|
||||
|
|
|
@ -329,15 +329,6 @@ export async function createRoom(page: Page, roomName: string, isEncrypted: bool
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Open the room info panel and return the panel element
|
||||
* @param page - the page to use
|
||||
*/
|
||||
export const openRoomInfo = async (page: Page) => {
|
||||
await page.getByRole("button", { name: "Room info" }).click();
|
||||
return page.locator(".mx_RightPanel");
|
||||
};
|
||||
|
||||
/**
|
||||
* Configure the given MatrixClient to auto-accept any invites
|
||||
* @param client - the client to configure
|
||||
|
@ -357,10 +348,11 @@ export async function autoJoin(client: Client) {
|
|||
* @param page - the page to use
|
||||
* @param bob - the user to verify
|
||||
*/
|
||||
export const verify = async (page: Page, bob: Bot) => {
|
||||
export const verify = async (app: ElementAppPage, bob: Bot) => {
|
||||
const page = app.page;
|
||||
const bobsVerificationRequestPromise = waitForVerificationRequest(bob);
|
||||
|
||||
const roomInfo = await openRoomInfo(page);
|
||||
const roomInfo = await app.toggleRoomInfoPanel();
|
||||
await page.locator(".mx_RightPanelTabs").getByText("People").click();
|
||||
await roomInfo.getByText("Bob").click();
|
||||
await roomInfo.getByRole("button", { name: "Verify" }).click();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue