Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion desktop/tests/e2e/channels.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -690,14 +690,16 @@ test("creates the DM before preparing a persona mention", async ({ page }) => {
page.getByTestId(`new-dm-selected-${TEST_IDENTITIES.charlie.pubkey}`),
).toBeDisabled();
await expect(page.getByTestId("new-dm-search")).toBeDisabled();
await expect(page.getByTestId("new-message-recipient-popover")).toBeHidden();
await expect
.poll(async () =>
commandCount(await readCommandLog(page), "create_managed_agent"),
)
.toBeGreaterThan(baselineCreateCount);
await expect(page.getByTestId("chat-title")).toContainText("charlie");
await expect(page.getByTestId("chat-title")).toContainText("Fizz");
// Assert popover hidden after chat-title settles — by this point the send
// flow has completed and the UI has fully transitioned away from the popover.
await expect(page.getByTestId("new-message-recipient-popover")).toBeHidden();

const sendCommands = (await readCommandLog(page)).slice(
baselineCommands.length,
Expand Down Expand Up @@ -760,8 +762,11 @@ test("creates the DM before preparing a persona mention", async ({ page }) => {
test("routes an agent mention from an existing DM to the expanded conversation", async ({
page,
}) => {
// Delay persona provisioning so the follow-up expanded-DM open/start sequence
// cannot collapse into the same fast CI tick before assertions observe it.
await installMockBridge(page, {
activePersonaIds: ["builtin:fizz"],
createManagedAgentDelayMs: 100,
});
await page.goto("/");

Expand Down Expand Up @@ -815,7 +820,10 @@ test("routes an agent mention from an existing DM to the expanded conversation",
test("routes a relay-agent mention from an existing DM to the expanded conversation", async ({
page,
}) => {
// Delay the expanded open_dm call so routing/navigation settles
// deterministically under fast CI execution.
await installMockBridge(page, {
openDmDelayMs: 100,
relayAgents: [
{
pubkey: DM_RELAY_AGENT_PUBKEY,
Expand Down Expand Up @@ -940,8 +948,11 @@ test("does not reroute an expanded DM after the channel pane unmounts", async ({
test("drops an expanded DM after the first message fails", async ({ page }) => {
const retryMessage = "Retry without the agent";
const sendError = "Mock first DM send failed.";
// Delay persona provisioning so the follow-up expanded-DM open/start sequence
// cannot collapse into the same fast CI tick before assertions observe it.
await installMockBridge(page, {
activePersonaIds: ["builtin:fizz"],
createManagedAgentDelayMs: 100,
sendMessageErrors: [sendError],
});
await page.goto("/");
Expand Down
Loading