Align navigation regression checks with record dialog and asynchronous routing
This commit is contained in:
1 parent
5d500a932f
commit
92e892f8df
2 files changed
+6
-2
No files matched your search
@@ -546,7 +546,7 @@ it('deep links open the single choice dialog and refresh preserves user choice',
|
||||
renderPage('/cloud-agents/channels?account=' + legacy.id + '&target=' + agentB.slug);
|
||||
const dialog = await screen.findByRole('dialog', { name: '更换智能体' });
|
||||
expect(within(dialog).getByRole('radio', { name: agentB.name })).toBeChecked();
|
||||
expect(screen.getByTestId('location-path')).not.toHaveTextContent('target=');
|
||||
await waitFor(() => expect(screen.getByTestId('location-path')).not.toHaveTextContent('target='));
|
||||
expect(writes()).toEqual([]);
|
||||
});
|
||||
it.each(['accounts', 'agents'])(
|
||||
|
||||
@@ -53,7 +53,11 @@ it('opens the card list from the home Agents choice without changing the remembe
|
||||
fireEvent.click(screen.getByTestId('ai-module-option-cloud_agents'));
|
||||
|
||||
expect(await screen.findByRole('article', { name: draft.name })).toBeVisible();
|
||||
expect(await screen.findByRole('complementary', { name: '未确认的云端操作' })).toHaveTextContent('上次的问题');
|
||||
const records = await screen.findByRole('button', { name: '待处理记录(1)' });
|
||||
expect(screen.queryByRole('dialog', { name: '待处理记录' })).not.toBeInTheDocument();
|
||||
fireEvent.click(records);
|
||||
expect(await screen.findByRole('dialog', { name: '待处理记录' })).toHaveTextContent('上次的问题');
|
||||
fireEvent.click(screen.getByRole('button', { name: '关闭记录' }));
|
||||
expect(router.state.location.pathname + router.state.location.search).toBe('/cloud-agents?view=mine');
|
||||
expect(screen.queryByTestId('entry-editor')).not.toBeInTheDocument();
|
||||
expect(api.get).not.toHaveBeenCalled();
|
||||
|
||||
Reference in new issue
Block a user