Skip to content

Commit a6d0474

Browse files
committed
test(desktop): wait for unpin animation and assert manual mention behavior
Signed-off-by: Tom Brow <[email protected]>
1 parent 8909575 commit a6d0474

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎desktop/tests/e2e/persistent-agent-audience.spec.ts‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,15 +601,23 @@ test("the mention button opens settings and can undo an address", async ({
601601
await expect(
602602
composer.getByRole("button", { name: "Mention someone" }),
603603
).toBeVisible();
604-
await input.fill("");
604+
await expect(
605+
composer.getByTestId(`composer-address-lock-${AGENT_A}`),
606+
).toHaveCount(0);
607+
// Clear through editor transactions before selecting a manual mention.
608+
await input.press("ControlOrMeta+A");
609+
await input.press("Backspace");
610+
await expect(input).toHaveText("");
605611

606612
await menu
607613
.getByRole("button", { name: "Mention Morgarita", exact: true })
608614
.click();
609615
await expect(input).toHaveText("@Morgarita ");
616+
// Explicitly opting out keeps subsequent mentions manual. The old avatar's
617+
// exit animation must not be mistaken for a newly pinned recipient.
610618
await expect(
611619
composer.getByTestId(`composer-address-lock-${AGENT_A}`),
612-
).toBeVisible();
620+
).toHaveCount(0);
613621

614622
await input.type("later");
615623
await input.press("Enter");

0 commit comments

Comments
 (0)