Fix E2E test quality issues: always-passing assertions, unawaited checks, and dead code (#32801)
* Fix E2E test quality issues: always-passing assertions, unawaited checks, and dead code Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * apply review --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
ee5d2609df
commit
68070b2e97
@@ -441,7 +441,7 @@ test.describe("Threads", () => {
|
||||
textbox = locator.getByRole("textbox", { name: "Send an unencrypted message…" });
|
||||
await textbox.fill("Hello Mr. User");
|
||||
await textbox.press("Enter");
|
||||
await expect(locator.locator(".mx_EventTile_last").getByText("Hello Mr. User")).toBeAttached();
|
||||
await expect(locator.locator(".mx_EventTile_last").getByText("Hello Mr. User")).toBeVisible();
|
||||
// Close thread
|
||||
await locator.getByTestId("base-card-close-button").click();
|
||||
|
||||
@@ -454,8 +454,8 @@ test.describe("Threads", () => {
|
||||
await expect(page.locator(".mx_ThreadView_timelinePanelWrapper")).toHaveCount(1);
|
||||
|
||||
locator = page.locator(".mx_BaseCard");
|
||||
await expect(locator.locator(".mx_EventTile").first().getByText("Hello Mr. Bot")).toBeAttached();
|
||||
await expect(locator.locator(".mx_EventTile").last().getByText("Hello Mr. User")).toBeAttached();
|
||||
await expect(locator.locator(".mx_EventTile").first().getByText("Hello Mr. Bot")).toBeVisible();
|
||||
await expect(locator.locator(".mx_EventTile").last().getByText("Hello Mr. User")).toBeVisible();
|
||||
});
|
||||
|
||||
test("navigate through right panel", { tag: "@screenshot" }, async ({ page, app, user }) => {
|
||||
|
||||
Reference in New Issue
Block a user