Migrate spaces.spec.ts from Cypress to Playwright (#11986)
* Remove old percy media query CSS Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Stabilise soft_logout.spec.ts Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update screenshots using `toMatchScreenshot` assertion with CSS overrides Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix accidentally commented test Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Migrate spaces.spec.ts from Cypress to Playwright Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Delint Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Add screenshots Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
d7c682d05e
commit
eb6101cc1b
10 changed files with 324 additions and 380 deletions
|
@ -117,4 +117,18 @@ export class ElementAppPage {
|
|||
const button = await this.getSpacePanelButton(name);
|
||||
return button.dblclick();
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the given space by name. The space must be visible in the
|
||||
* space list.
|
||||
* @param name The space name to find and click on/open.
|
||||
*/
|
||||
public async viewSpaceByName(name: string): Promise<void> {
|
||||
const button = await this.getSpacePanelButton(name);
|
||||
return button.click();
|
||||
}
|
||||
|
||||
public async getClipboardText(): Promise<string> {
|
||||
return this.page.evaluate("navigator.clipboard.readText()");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -161,4 +161,17 @@ export class Client {
|
|||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Invites the given user to the given room.
|
||||
* @param roomId the id of the room to invite to
|
||||
* @param userId the id of the user to invite
|
||||
*/
|
||||
public async inviteUser(roomId: string, userId: string): Promise<void> {
|
||||
const client = await this.prepareClient();
|
||||
await client.evaluate((client, { roomId, userId }) => client.invite(roomId, userId), {
|
||||
roomId,
|
||||
userId,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue