mirror of
https://github.com/web-infra-dev/midscene.git
synced 2025-08-05 07:12:57 +00:00
20 lines
535 B
TypeScript
20 lines
535 B
TypeScript
![]() |
import { AiLocateElement } from '@/ai-model';
|
||
|
import { AiLocateSection } from '@/ai-model/inspect';
|
||
|
import { getContextFromFixture } from 'tests/evaluation';
|
||
|
import { expect, test } from 'vitest';
|
||
|
|
||
|
test(
|
||
|
'locate section',
|
||
|
async () => {
|
||
|
const { context } = await getContextFromFixture('antd-tooltip');
|
||
|
const { sectionBbox } = await AiLocateSection({
|
||
|
context,
|
||
|
sectionDescription: 'the version info on the top right corner',
|
||
|
});
|
||
|
expect(sectionBbox.length).toBe(4);
|
||
|
},
|
||
|
{
|
||
|
timeout: 60 * 1000,
|
||
|
},
|
||
|
);
|