Skip to content

Commit b85a867

Browse files
test(web): keep only the stash chip regression test
Drop the unfinished-mention case, which passes without the fix, and wait for the shell snapshot before stashing so the chip test no longer depends on an earlier test warming the environment. AI-assisted; verified with the tests and tools listed above.
1 parent 4feb620 commit b85a867

1 file changed

Lines changed: 2 additions & 30 deletions

File tree

‎apps/web/src/components/ChatView.browser.test.tsx‎

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ it("a stashed prompt ending in a file chip restores with the chip", async () =>
112112
});
113113
const chip = page.getByRole("button", { name: "Preview package.json" });
114114
await expect.element(chip).toBeVisible();
115+
// The stash shortcut is a no-op until the shell snapshot lists the project.
116+
await expect.element(page.getByText("render", { exact: true }).first()).toBeVisible();
115117

116118
const editor = page.getByTestId("composer-editor");
117119
await userEvent.click(editor);
@@ -123,33 +125,3 @@ it("a stashed prompt ending in a file chip restores with the chip", async () =>
123125
expect(editor.element().textContent).not.toContain("[package.json](package.json)");
124126
await expect.element(chip).toBeVisible();
125127
});
126-
127-
it("a stashed unfinished mention query restores as text", async () => {
128-
using _environment = installFakeEnvironment([]);
129-
__setClientSettingsForTests({
130-
...DEFAULT_CLIENT_SETTINGS,
131-
onboardingCompletedAt: "2026-01-01T00:00:00.000Z",
132-
});
133-
const draftId = DraftId.make("draft-28338");
134-
const drafts = useComposerDraftStore.getState();
135-
drafts.setProjectDraftThreadId(scopeProjectRef(ENVIRONMENT_ID, PROJECT_ID), draftId, {
136-
threadId: ThreadId.make("thread-28338"),
137-
});
138-
drafts.setPrompt(draftId, "Check @Rea");
139-
const router = getRouter(createMemoryHistory({ initialEntries: [`/draft/${draftId}`] }));
140-
await router.load();
141-
await using _app = await render(<AppRoot router={router} />, {
142-
// AppRoot brings its own router.
143-
router: false,
144-
});
145-
const editor = page.getByTestId("composer-editor");
146-
await vi.waitFor(() => expect(editor.element().textContent).toContain("Check @Rea"));
147-
148-
await userEvent.click(editor);
149-
await userEvent.keyboard("{ControlOrMeta>}s{/ControlOrMeta}");
150-
await vi.waitFor(() => expect(editor.element().textContent).not.toContain("Check"));
151-
await userEvent.keyboard("{ControlOrMeta>}s{/ControlOrMeta}");
152-
153-
await vi.waitFor(() => expect(editor.element().textContent).toContain("Check @Rea"));
154-
await expect.element(page.getByRole("button", { name: "Preview Rea" })).not.toBeInTheDocument();
155-
});

0 commit comments

Comments
 (0)