fix: guard migrations against missing tables and fix highlighted text assertion

- Make migrate_v6_to_v7 check skills table existence before ALTER
- Make migrate_v7_to_v8 check model_pricing table existence before UPDATE
- Fix SessionManagerPage test: use getByRole heading instead of getAllByText
  which breaks when highlightText splits text across <mark> elements
This commit is contained in:
Jason
2026-04-10 11:20:47 +08:00
parent c4458cf280
commit b85e449949
2 changed files with 42 additions and 29 deletions
+3 -1
View File
@@ -184,7 +184,9 @@ describe("SessionManagerPage", () => {
});
await waitFor(() =>
expect(screen.getAllByText("Alpha Session")).toHaveLength(2),
expect(
screen.getByRole("heading", { name: "Alpha Session" }),
).toBeInTheDocument(),
);
fireEvent.click(screen.getByRole("button", { name: /删除会话/i }));