fix(ArrowAnnotate): Allow free-form text for arrow annotations (#5259)
This commit is contained in:
1 parent
4e6530d1d8
commit
3c8446a5e5
17 files changed
+156
-11
No files matched your search
@@ -9,15 +9,28 @@ import { Locator } from 'playwright';
|
||||
export async function simulateClicksOnElement({
|
||||
locator,
|
||||
points,
|
||||
button = 'left',
|
||||
}: {
|
||||
locator: Locator;
|
||||
points: { x: number; y: number }[];
|
||||
button?: 'left' | 'right' | 'middle';
|
||||
}) {
|
||||
for (const { x, y } of points) {
|
||||
await locator.click({ delay: 100, position: { x, y } });
|
||||
await locator.click({ delay: 100, position: { x, y }, button });
|
||||
}
|
||||
}
|
||||
|
||||
export async function simulateDoubleClickOnElement({
|
||||
locator,
|
||||
point,
|
||||
}: {
|
||||
locator: Locator;
|
||||
point: { x: number; y: number };
|
||||
}) {
|
||||
const { x, y } = point;
|
||||
await locator.dblclick({ delay: 100, position: { x, y } });
|
||||
}
|
||||
|
||||
/**
|
||||
* Simulates clicks on an element at a normalized point.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user