Migrate remaining editing.spec.ts from Cypress to Playwright (#11976)

* Migrate user-view.spec.ts from Cypress to Playwright

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add bot support & update screenshot

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add screenshot

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Use JSHandle

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Remove stale snapshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Migrate remaining editing.spec.ts from Cypress to Playwright

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* yay

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2023-11-30 10:18:18 +00:00
committed by GitHub
parent 07b7ee6111
commit 79daa1a63c
12 changed files with 262 additions and 248 deletions
+2 -2
View File
@@ -31,7 +31,7 @@ test.describe("Consent", () => {
app,
}) => {
// Attempt to create a room using the js-sdk which should return an error with `M_CONSENT_NOT_GIVEN`
await app.createRoom({}).catch(() => {});
await app.client.createRoom({}).catch(() => {});
const newPagePromise = new Promise<Page>((resolve) => context.once("page", resolve));
const dialog = page.locator(".mx_QuestionDialog");
@@ -49,7 +49,7 @@ test.describe("Consent", () => {
await expect(page.locator(".mx_MatrixChat")).toBeVisible();
// attempt to perform the same action again and expect it to not fail
await app.createRoom({ name: "Test Room" });
await app.client.createRoom({ name: "Test Room" });
await expect(page.getByText("Test Room")).toBeVisible();
});
});