Fix flakiness in playwright tests (#12512)
* Remove redundant option Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Stabilise app download dialog screenshot test Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Try to stabilise user menu opening in playwright tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Stabilise one-to-one-chat.spec.ts Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Stabilise kick.spec.ts Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Discard changes to playwright/element-web-test.ts --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
cc6958980b
commit
b283b18898
5 changed files with 15 additions and 4 deletions
|
@ -25,8 +25,9 @@ export class Settings {
|
|||
* Open the top left user menu, returning a Locator to the resulting context menu.
|
||||
*/
|
||||
public async openUserMenu(): Promise<Locator> {
|
||||
await this.page.getByRole("button", { name: "User menu" }).click();
|
||||
const locator = this.page.locator(".mx_ContextualMenu");
|
||||
if (await locator.locator(".mx_UserMenu_contextMenu_header").isVisible()) return locator;
|
||||
await this.page.getByRole("button", { name: "User menu" }).click();
|
||||
await locator.waitFor();
|
||||
return locator;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue