Fix/disable failing playwright tests (#12402)

* Set display name earlier to fix playwright test

Unsure why this is failing on CI, it's fine locally. Let's try
setting the display name earlier to see if that fixes it.

* Disable failing presence test

also comments

* Link issue too
This commit is contained in:
David Baker
2024-04-05 19:07:25 +01:00
committed by GitHub
parent 015b9386e1
commit f37821d62c
5 changed files with 14 additions and 6 deletions

View File

@@ -1032,6 +1032,16 @@ test.describe("Timeline", () => {
"et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut " +
"aliquip";
const newDisplayName = `${LONG_STRING} 2`;
// Set the display name to "LONG_STRING 2" in order to avoid screenshot tests from failing
// due to the generated random mxid being displayed inside the GELS summary.
// Note that we set it here as the test was failing on CI (but not locally!) if the name
// was changed afterwards. This is quite concerning, but maybe better than just disabling the
// whole test?
// https://github.com/element-hq/element-web/issues/27109
await app.client.setDisplayName(newDisplayName);
// Create a bot with a long display name
const bot = new Bot(page, homeserver, {
displayName: LONG_STRING,
@@ -1049,13 +1059,9 @@ test.describe("Timeline", () => {
await expect(
page
.locator(".mx_GenericEventListSummary_summary")
.getByText(OLD_NAME + " created and configured the room."),
.getByText(newDisplayName + " created and configured the room."),
).toBeVisible();
// Set the display name to "LONG_STRING 2" in order to avoid screenshot tests from failing
// due to the generated random mxid being displayed inside the GELS summary.
await app.client.setDisplayName(`${LONG_STRING} 2`);
// Have the bot send a long message
await bot.sendMessage(testRoomId, {
body: LONG_STRING,