fix: 收窄创作入口关闭熔断范围

This commit is contained in:
2026-06-03 20:45:27 +08:00
parent 01a68bcf3d
commit deadce9cf1
9 changed files with 267 additions and 81 deletions

View File

@@ -6782,6 +6782,27 @@ test('creation draft hub skips visual novel shelves when entry is not open', asy
expect(screen.queryByText('该玩法入口暂不可用')).toBeNull();
});
test('platform home suppresses creation entry disabled bootstrap errors', async () => {
vi.mocked(listRpgEntryWorldLibrary).mockRejectedValue(
new Error(
'该玩法入口暂不可用 creation_entry_disabledrequestId: req-closed',
),
);
vi.mocked(listRpgCreationWorks).mockRejectedValue(
new Error('creation_entry_disabled'),
);
render(<TestWrapper withAuth />);
await waitFor(() => {
expect(listRpgEntryWorldLibrary).toHaveBeenCalled();
});
expect(screen.queryByText(/平台首页/u)).toBeNull();
expect(screen.queryByText(/creation_entry_disabled/u)).toBeNull();
expect(screen.queryByText(/该玩法入口暂不可用/u)).toBeNull();
});
test('published puzzle works appear on home and mobile game category channel', async () => {
const user = userEvent.setup();
const publishedPuzzleWork = {