更新 UI 编辑器返回交互测试
按现役浮动关闭按钮的可访问名称查询
This commit is contained in:
@@ -6140,10 +6140,12 @@ export function registerProjectWorkbenchFoundationTests() {
|
||||
}),
|
||||
);
|
||||
fireEvent.click(await screen.findByRole('button', { name: 'UI 编辑器' }));
|
||||
await screen.findByRole('button', { name: '返回资源' });
|
||||
fireEvent.click(screen.getByRole('button', { name: '返回资源' }));
|
||||
await screen.findByRole('button', { name: '关闭 UI 编辑器' });
|
||||
fireEvent.click(screen.getByRole('button', { name: '关闭 UI 编辑器' }));
|
||||
await waitFor(() =>
|
||||
expect(screen.queryByRole('button', { name: '返回资源' })).toBeNull(),
|
||||
expect(
|
||||
screen.queryByRole('button', { name: '关闭 UI 编辑器' }),
|
||||
).toBeNull(),
|
||||
);
|
||||
|
||||
const restoredCanvas = await screen.findByRole('region', {
|
||||
|
||||
Reference in New Issue
Block a user