@umbraco/playwright-testhelpers 16.0.59 → 16.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/lib/helpers/BasePage.d.ts +448 -0
  2. package/dist/lib/helpers/BasePage.js +551 -0
  3. package/dist/lib/helpers/BasePage.js.map +1 -0
  4. package/dist/lib/helpers/ConstantHelper.d.ts +17 -0
  5. package/dist/lib/helpers/ConstantHelper.js +17 -0
  6. package/dist/lib/helpers/ConstantHelper.js.map +1 -1
  7. package/dist/lib/helpers/ContentRenderUiHelper.js +4 -5
  8. package/dist/lib/helpers/ContentRenderUiHelper.js.map +1 -1
  9. package/dist/lib/helpers/ContentUiHelper.d.ts +1 -1
  10. package/dist/lib/helpers/ContentUiHelper.js +231 -340
  11. package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
  12. package/dist/lib/helpers/CurrentUserProfileUiHelper.js +4 -10
  13. package/dist/lib/helpers/CurrentUserProfileUiHelper.js.map +1 -1
  14. package/dist/lib/helpers/DataTypeUiHelper.js +205 -330
  15. package/dist/lib/helpers/DataTypeUiHelper.js.map +1 -1
  16. package/dist/lib/helpers/DictionaryUiHelper.js +8 -14
  17. package/dist/lib/helpers/DictionaryUiHelper.js.map +1 -1
  18. package/dist/lib/helpers/DocumentBlueprintUiHelper.js +2 -4
  19. package/dist/lib/helpers/DocumentBlueprintUiHelper.js.map +1 -1
  20. package/dist/lib/helpers/DocumentTypeUiHelper.js +16 -31
  21. package/dist/lib/helpers/DocumentTypeUiHelper.js.map +1 -1
  22. package/dist/lib/helpers/ExamineManagementUiHelper.js +3 -4
  23. package/dist/lib/helpers/ExamineManagementUiHelper.js.map +1 -1
  24. package/dist/lib/helpers/FormsUiHelper.js +72 -113
  25. package/dist/lib/helpers/FormsUiHelper.js.map +1 -1
  26. package/dist/lib/helpers/HealthCheckUiHelper.js +7 -8
  27. package/dist/lib/helpers/HealthCheckUiHelper.js.map +1 -1
  28. package/dist/lib/helpers/LanguageUiHelper.js +3 -6
  29. package/dist/lib/helpers/LanguageUiHelper.js.map +1 -1
  30. package/dist/lib/helpers/LogViewerUiHelper.js +18 -24
  31. package/dist/lib/helpers/LogViewerUiHelper.js.map +1 -1
  32. package/dist/lib/helpers/LoginUiHelper.js +3 -6
  33. package/dist/lib/helpers/LoginUiHelper.js.map +1 -1
  34. package/dist/lib/helpers/MediaTypeUiHelper.js +5 -8
  35. package/dist/lib/helpers/MediaTypeUiHelper.js.map +1 -1
  36. package/dist/lib/helpers/MediaUiHelper.js +26 -35
  37. package/dist/lib/helpers/MediaUiHelper.js.map +1 -1
  38. package/dist/lib/helpers/MemberGroupUiHelper.js +5 -9
  39. package/dist/lib/helpers/MemberGroupUiHelper.js.map +1 -1
  40. package/dist/lib/helpers/MemberTypeUiHelper.js +2 -3
  41. package/dist/lib/helpers/MemberTypeUiHelper.js.map +1 -1
  42. package/dist/lib/helpers/MemberUiHelper.js +15 -34
  43. package/dist/lib/helpers/MemberUiHelper.js.map +1 -1
  44. package/dist/lib/helpers/ModelsBuilderUiHelper.js +1 -2
  45. package/dist/lib/helpers/ModelsBuilderUiHelper.js.map +1 -1
  46. package/dist/lib/helpers/PackageUiHelper.js +10 -17
  47. package/dist/lib/helpers/PackageUiHelper.js.map +1 -1
  48. package/dist/lib/helpers/PartialViewUiHelper.js +6 -9
  49. package/dist/lib/helpers/PartialViewUiHelper.js.map +1 -1
  50. package/dist/lib/helpers/ProfilingUiHelper.js +8 -6
  51. package/dist/lib/helpers/ProfilingUiHelper.js.map +1 -1
  52. package/dist/lib/helpers/PublishedStatusUiHelper.js +1 -2
  53. package/dist/lib/helpers/PublishedStatusUiHelper.js.map +1 -1
  54. package/dist/lib/helpers/RedirectManagementUiHelper.js +5 -10
  55. package/dist/lib/helpers/RedirectManagementUiHelper.js.map +1 -1
  56. package/dist/lib/helpers/RelationTypeUiHelper.js +7 -10
  57. package/dist/lib/helpers/RelationTypeUiHelper.js.map +1 -1
  58. package/dist/lib/helpers/ScriptUiHelper.js +4 -8
  59. package/dist/lib/helpers/ScriptUiHelper.js.map +1 -1
  60. package/dist/lib/helpers/StylesheetUiHelper.js +2 -5
  61. package/dist/lib/helpers/StylesheetUiHelper.js.map +1 -1
  62. package/dist/lib/helpers/TelemetryDataUiHelper.js +2 -3
  63. package/dist/lib/helpers/TelemetryDataUiHelper.js.map +1 -1
  64. package/dist/lib/helpers/TemplateUiHelper.js +11 -18
  65. package/dist/lib/helpers/TemplateUiHelper.js.map +1 -1
  66. package/dist/lib/helpers/UiBaseLocators.d.ts +2 -2
  67. package/dist/lib/helpers/UiBaseLocators.js +228 -353
  68. package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
  69. package/dist/lib/helpers/UserGroupUiHelper.js +28 -45
  70. package/dist/lib/helpers/UserGroupUiHelper.js.map +1 -1
  71. package/dist/lib/helpers/UserUiHelper.js +18 -21
  72. package/dist/lib/helpers/UserUiHelper.js.map +1 -1
  73. package/dist/lib/helpers/WebhookUiHelper.js +11 -27
  74. package/dist/lib/helpers/WebhookUiHelper.js.map +1 -1
  75. package/dist/lib/helpers/WelcomeDashboardUiHelper.js +1 -2
  76. package/dist/lib/helpers/WelcomeDashboardUiHelper.js.map +1 -1
  77. package/dist/lib/helpers/differentAppSettingsHelpers/ExternalLoginUiHelpers.js +4 -9
  78. package/dist/lib/helpers/differentAppSettingsHelpers/ExternalLoginUiHelpers.js.map +1 -1
  79. package/dist/lib/helpers/differentAppSettingsHelpers/InstallUiHelper.js +6 -12
  80. package/dist/lib/helpers/differentAppSettingsHelpers/InstallUiHelper.js.map +1 -1
  81. package/dist/lib/helpers/index.d.ts +1 -0
  82. package/dist/lib/helpers/index.js +3 -1
  83. package/dist/lib/helpers/index.js.map +1 -1
  84. package/dist/tsconfig.tsbuildinfo +1 -1
  85. package/package.json +1 -1
@@ -0,0 +1,448 @@
1
+ import { Locator, Page } from "@playwright/test";
2
+ /**
3
+ * Base page class providing common UI interaction methods.
4
+ * All methods follow best practices for reliability:
5
+ * - click: Always checks element visibility before clicking
6
+ * - enterText: Always clears before filling text
7
+ * - select: Waits for element visibility before selecting
8
+ */
9
+ export declare class BasePage {
10
+ readonly page: Page;
11
+ constructor(page: Page);
12
+ /**
13
+ * Clicks an element after verifying it is visible.
14
+ * @param locator - The element to click
15
+ * @param options - Optional click configuration
16
+ */
17
+ click(locator: Locator, options?: {
18
+ force?: boolean;
19
+ timeout?: number;
20
+ }): Promise<void>;
21
+ /**
22
+ * Double-clicks an element after verifying it is visible.
23
+ * @param locator - The element to double-click
24
+ * @param options - Optional configuration
25
+ */
26
+ doubleClick(locator: Locator, options?: {
27
+ force?: boolean;
28
+ timeout?: number;
29
+ }): Promise<void>;
30
+ /**
31
+ * Right-clicks an element after verifying it is visible.
32
+ * @param locator - The element to right-click
33
+ * @param options - Optional configuration
34
+ */
35
+ rightClick(locator: Locator, options?: {
36
+ force?: boolean;
37
+ timeout?: number;
38
+ }): Promise<void>;
39
+ /**
40
+ * Clicks an element using JavaScript (bypasses actionability checks).
41
+ * Use when standard click doesn't work due to overlapping elements.
42
+ * @param locator - The element to click
43
+ */
44
+ javascriptClick(locator: Locator): Promise<void>;
45
+ /**
46
+ * Enters text into an input field after clearing it.
47
+ * Verifies element visibility before interaction.
48
+ * @param locator - The input element
49
+ * @param text - The text to enter
50
+ * @param options - Optional configuration
51
+ */
52
+ enterText(locator: Locator, text: string, options?: {
53
+ clearFirst?: boolean;
54
+ verify?: boolean;
55
+ timeout?: number;
56
+ }): Promise<void>;
57
+ /**
58
+ * Types text character by character (simulates real typing).
59
+ * Useful when fill() doesn't trigger necessary events.
60
+ * @param locator - The input element
61
+ * @param text - The text to type
62
+ * @param options - Optional configuration
63
+ */
64
+ typeText(locator: Locator, text: string, options?: {
65
+ clearFirst?: boolean;
66
+ verify?: boolean;
67
+ delay?: number;
68
+ timeout?: number;
69
+ }): Promise<void>;
70
+ /**
71
+ * Clears an input field.
72
+ * @param locator - The input element to clear
73
+ * @param options - Optional configuration
74
+ */
75
+ clearText(locator: Locator, options?: {
76
+ timeout?: number;
77
+ }): Promise<void>;
78
+ /**
79
+ * Presses a keyboard key while focused on an element.
80
+ * @param locator - The element to focus
81
+ * @param key - The key to press (e.g., 'Enter', 'Tab', 'Escape')
82
+ */
83
+ pressKey(locator: Locator, key: string, options?: {
84
+ timeout?: number;
85
+ }): Promise<void>;
86
+ /**
87
+ * Selects an option from a dropdown by value.
88
+ * @param locator - The select element
89
+ * @param value - The option value to select
90
+ */
91
+ selectByValue(locator: Locator, value: string, options?: {
92
+ timeout?: number;
93
+ }): Promise<void>;
94
+ /**
95
+ * Selects an option from a dropdown by visible text.
96
+ * @param locator - The select element
97
+ * @param text - The option text to select
98
+ */
99
+ selectByText(locator: Locator, text: string, options?: {
100
+ timeout?: number;
101
+ }): Promise<void>;
102
+ /**
103
+ * Selects an option from a dropdown by index.
104
+ * @param locator - The select element
105
+ * @param index - The option index to select (0-based)
106
+ */
107
+ selectByIndex(locator: Locator, index: number, options?: {
108
+ timeout?: number;
109
+ }): Promise<void>;
110
+ /**
111
+ * Selects multiple options from a multi-select dropdown.
112
+ * @param locator - The select element
113
+ * @param values - Array of option values to select
114
+ */
115
+ selectMultiple(locator: Locator, values: string[], options?: {
116
+ timeout?: number;
117
+ }): Promise<void>;
118
+ /**
119
+ * Checks a checkbox if it's not already checked.
120
+ * @param locator - The checkbox element
121
+ */
122
+ check(locator: Locator, options?: {
123
+ force?: boolean;
124
+ timeout?: number;
125
+ }): Promise<void>;
126
+ /**
127
+ * Unchecks a checkbox if it's currently checked.
128
+ * @param locator - The checkbox element
129
+ */
130
+ uncheck(locator: Locator, options?: {
131
+ force?: boolean;
132
+ timeout?: number;
133
+ }): Promise<void>;
134
+ /**
135
+ * Sets a checkbox to a specific state.
136
+ * @param locator - The checkbox element
137
+ * @param checked - Whether the checkbox should be checked
138
+ */
139
+ setChecked(locator: Locator, checked: boolean, options?: {
140
+ force?: boolean;
141
+ timeout?: number;
142
+ }): Promise<void>;
143
+ /**
144
+ * Hovers over an element.
145
+ * @param locator - The element to hover over
146
+ */
147
+ hover(locator: Locator, options?: {
148
+ force?: boolean;
149
+ timeout?: number;
150
+ }): Promise<void>;
151
+ /**
152
+ * Focuses on an element.
153
+ * @param locator - The element to focus
154
+ */
155
+ focus(locator: Locator, options?: {
156
+ timeout?: number;
157
+ }): Promise<void>;
158
+ /**
159
+ * Hovers over one element and clicks another (for menus that appear on hover).
160
+ * @param hoverLocator - The element to hover over
161
+ * @param clickLocator - The element to click after hover
162
+ */
163
+ hoverAndClick(hoverLocator: Locator, clickLocator: Locator, options?: {
164
+ force?: boolean;
165
+ timeout?: number;
166
+ }): Promise<void>;
167
+ /**
168
+ * Waits for an element to be visible.
169
+ * @param locator - The element to wait for
170
+ * @param timeout - Maximum time to wait in milliseconds
171
+ */
172
+ waitForVisible(locator: Locator, timeout?: number): Promise<void>;
173
+ /**
174
+ * Waits for an element to be hidden.
175
+ * @param locator - The element to wait for
176
+ * @param timeout - Maximum time to wait in milliseconds
177
+ */
178
+ waitForHidden(locator: Locator, timeout?: number): Promise<void>;
179
+ /**
180
+ * Waits for an element to be attached to the DOM.
181
+ * @param locator - The element to wait for
182
+ * @param timeout - Maximum time to wait in milliseconds
183
+ */
184
+ waitForAttached(locator: Locator, timeout?: number): Promise<void>;
185
+ /**
186
+ * Waits for an element to be detached from the DOM.
187
+ * @param locator - The element to wait for
188
+ * @param timeout - Maximum time to wait in milliseconds
189
+ */
190
+ waitForDetached(locator: Locator, timeout?: number): Promise<void>;
191
+ /**
192
+ * Waits for the page to finish loading (network idle).
193
+ */
194
+ waitForPageLoad(): Promise<void>;
195
+ /**
196
+ * Waits for the DOM to be fully loaded.
197
+ */
198
+ waitForDOMContentLoaded(): Promise<void>;
199
+ /**
200
+ * Waits for all network requests to complete.
201
+ */
202
+ waitForLoadState(): Promise<void>;
203
+ /**
204
+ * Waits for an element to be enabled.
205
+ * @param locator - The element to wait for
206
+ * @param timeout - Maximum time to wait in milliseconds
207
+ */
208
+ waitForEnabled(locator: Locator, timeout?: number): Promise<void>;
209
+ /**
210
+ * Waits for an element to be disabled.
211
+ * @param locator - The element to wait for
212
+ * @param timeout - Maximum time to wait in milliseconds
213
+ */
214
+ waitForDisabled(locator: Locator, timeout?: number): Promise<void>;
215
+ /**
216
+ * Waits for an element to contain specific text.
217
+ * @param locator - The element to wait for
218
+ * @param text - The text to wait for
219
+ * @param timeout - Maximum time to wait in milliseconds
220
+ */
221
+ waitForText(locator: Locator, text: string, timeout?: number): Promise<void>;
222
+ /**
223
+ * Waits for an input to have a specific value.
224
+ * @param locator - The input element to wait for
225
+ * @param value - The value to wait for
226
+ * @param timeout - Maximum time to wait in milliseconds
227
+ */
228
+ waitForValue(locator: Locator, value: string, timeout?: number): Promise<void>;
229
+ /**
230
+ * Waits for an element to have a specific attribute value.
231
+ * @param locator - The element to wait for
232
+ * @param name - The attribute name
233
+ * @param value - The expected attribute value
234
+ * @param timeout - Maximum time to wait in milliseconds
235
+ */
236
+ waitForAttribute(locator: Locator, name: string, value: string | RegExp, timeout?: number): Promise<void>;
237
+ /**
238
+ * Waits for an element to have a specific CSS class.
239
+ * @param locator - The element to wait for
240
+ * @param className - The CSS class to wait for
241
+ * @param timeout - Maximum time to wait in milliseconds
242
+ */
243
+ waitForClass(locator: Locator, className: string | RegExp, timeout?: number): Promise<void>;
244
+ /**
245
+ * Waits for an element to be editable.
246
+ * @param locator - The element to wait for
247
+ * @param timeout - Maximum time to wait in milliseconds
248
+ */
249
+ waitForEditable(locator: Locator, timeout?: number): Promise<void>;
250
+ /**
251
+ * Waits for an element to be checked.
252
+ * @param locator - The checkbox/radio element to wait for
253
+ * @param timeout - Maximum time to wait in milliseconds
254
+ */
255
+ waitForChecked(locator: Locator, timeout?: number): Promise<void>;
256
+ /**
257
+ * Waits for an element to be unchecked.
258
+ * @param locator - The checkbox/radio element to wait for
259
+ * @param timeout - Maximum time to wait in milliseconds
260
+ */
261
+ waitForUnchecked(locator: Locator, timeout?: number): Promise<void>;
262
+ /**
263
+ * Waits for a specific URL or URL pattern.
264
+ * @param url - The URL string or regex pattern to wait for
265
+ * @param timeout - Maximum time to wait in milliseconds
266
+ */
267
+ waitForURL(url: string | RegExp, timeout?: number): Promise<void>;
268
+ /**
269
+ * Waits for a navigation to complete.
270
+ * @param timeout - Maximum time to wait in milliseconds
271
+ */
272
+ waitForNavigation(timeout?: number): Promise<void>;
273
+ /**
274
+ * Waits for a specific time (use sparingly, prefer explicit waits).
275
+ * @param milliseconds - Time to wait in milliseconds
276
+ */
277
+ waitForTimeout(milliseconds: number): Promise<void>;
278
+ /**
279
+ * Waits for a network request to a specific URL.
280
+ * @param urlOrPredicate - URL string, regex, or predicate function
281
+ * @param timeout - Maximum time to wait in milliseconds
282
+ */
283
+ waitForRequest(urlOrPredicate: string | RegExp | ((request: any) => boolean), timeout?: number): Promise<any>;
284
+ /**
285
+ * Waits for a network response from a specific URL.
286
+ * @param urlOrPredicate - URL string, regex, or predicate function
287
+ * @param timeout - Maximum time to wait in milliseconds
288
+ */
289
+ waitForResponse(urlOrPredicate: string | RegExp | ((response: any) => boolean), timeout?: number): Promise<any>;
290
+ /**
291
+ * Waits for an element to be focused.
292
+ * @param locator - The element to wait for
293
+ * @param timeout - Maximum time to wait in milliseconds
294
+ */
295
+ waitForFocused(locator: Locator, timeout?: number): Promise<void>;
296
+ /**
297
+ * Waits for an element to be empty (no text content).
298
+ * @param locator - The element to wait for
299
+ * @param timeout - Maximum time to wait in milliseconds
300
+ */
301
+ waitForEmpty(locator: Locator, timeout?: number): Promise<void>;
302
+ /**
303
+ * Waits for a function to return true.
304
+ * @param predicate - Function that returns a boolean or Promise<boolean>
305
+ * @param timeout - Maximum time to wait in milliseconds
306
+ */
307
+ waitForFunction(predicate: () => boolean | Promise<boolean>, timeout?: number): Promise<void>;
308
+ /**
309
+ * Waits for an element to have a specific CSS property value.
310
+ * @param locator - The element to wait for
311
+ * @param property - The CSS property name
312
+ * @param value - The expected CSS property value
313
+ * @param timeout - Maximum time to wait in milliseconds
314
+ */
315
+ waitForCSS(locator: Locator, property: string, value: string | RegExp, timeout?: number): Promise<void>;
316
+ /**
317
+ * Asserts that an element is visible.
318
+ * @param locator - The element to check
319
+ * @param isVisible - Whether the element should be visible (default: true)
320
+ */
321
+ isVisible(locator: Locator, isVisible?: boolean, timeout?: number): Promise<void>;
322
+ /**
323
+ * Asserts that an element is enabled.
324
+ * @param locator - The element to check
325
+ */
326
+ isEnabled(locator: Locator, timeout?: number): Promise<void>;
327
+ /**
328
+ * Asserts that an element is disabled.
329
+ * @param locator - The element to check
330
+ */
331
+ isDisabled(locator: Locator, timeout?: number): Promise<void>;
332
+ /**
333
+ * Asserts that an element is editable or not editable.
334
+ * @param locator - The element to check
335
+ * @param editable - Whether the element should be editable (default: true)
336
+ * @param timeout - Optional timeout in milliseconds
337
+ */
338
+ isEditable(locator: Locator, editable?: boolean, timeout?: number): Promise<void>;
339
+ /**
340
+ * Asserts that an element contains specific text.
341
+ * @param locator - The element to check
342
+ * @param text - The text to look for
343
+ */
344
+ containsText(locator: Locator, text: string, timeout?: number): Promise<void>;
345
+ /**
346
+ * Asserts that an element has specific text.
347
+ * @param locator - The element to check
348
+ * @param text - The exact text expected
349
+ */
350
+ hasText(locator: Locator, text: string, timeout?: number): Promise<void>;
351
+ /**
352
+ * Asserts that an input has a specific value.
353
+ * @param locator - The input element to check
354
+ * @param value - The expected value
355
+ */
356
+ hasValue(locator: Locator, value: string, timeout?: number): Promise<void>;
357
+ /**
358
+ * Asserts that an element has a specific attribute value.
359
+ * @param locator - The element to check
360
+ * @param name - The attribute name
361
+ * @param value - The expected attribute value
362
+ */
363
+ hasAttribute(locator: Locator, name: string, value: string, timeout?: number): Promise<void>;
364
+ /**
365
+ * Asserts that an element does not have a specific attribute value.
366
+ * @param locator - The element to check
367
+ * @param name - The attribute name
368
+ * @param value - The value the attribute should NOT have
369
+ * @param timeout - Optional timeout in milliseconds
370
+ */
371
+ doesNotHaveAttribute(locator: Locator, name: string, value: string, timeout?: number): Promise<void>;
372
+ /**
373
+ * Asserts that a specific number of elements exist.
374
+ * @param locator - The locator to count
375
+ * @param count - The expected count
376
+ */
377
+ hasCount(locator: Locator, count: number, timeout?: number): Promise<void>;
378
+ /**
379
+ * Gets the text content of an element.
380
+ * @param locator - The element to get text from
381
+ * @returns The text content
382
+ */
383
+ getText(locator: Locator, options?: {
384
+ timeout?: number;
385
+ }): Promise<string>;
386
+ /**
387
+ * Gets the value of an input element.
388
+ * @param locator - The input element
389
+ * @returns The input value
390
+ */
391
+ getValue(locator: Locator, options?: {
392
+ timeout?: number;
393
+ }): Promise<string>;
394
+ /**
395
+ * Gets an attribute value from an element.
396
+ * @param locator - The element
397
+ * @param attributeName - The attribute name
398
+ * @returns The attribute value or null
399
+ */
400
+ getAttribute(locator: Locator, attributeName: string, options?: {
401
+ timeout?: number;
402
+ }): Promise<string | null>;
403
+ /**
404
+ * Checks if an element is currently visible.
405
+ * @param locator - The element to check
406
+ * @returns True if visible, false otherwise
407
+ */
408
+ checkIsVisible(locator: Locator): Promise<boolean>;
409
+ /**
410
+ * Checks if a checkbox is checked.
411
+ * @param locator - The checkbox element
412
+ * @returns True if checked, false otherwise
413
+ */
414
+ isChecked(locator: Locator): Promise<boolean>;
415
+ /**
416
+ * Scrolls an element into view.
417
+ * @param locator - The element to scroll to
418
+ */
419
+ scrollIntoView(locator: Locator, options?: {
420
+ timeout?: number;
421
+ }): Promise<void>;
422
+ /**
423
+ * Sets files on a file input element.
424
+ * @param locator - The file input element
425
+ * @param filePath - Path to the file(s) to set
426
+ */
427
+ setInputFiles(locator: Locator, filePath: string | string[]): Promise<void>;
428
+ /**
429
+ * Clears files from a file input.
430
+ * @param locator - The file input element
431
+ */
432
+ clearInputFiles(locator: Locator): Promise<void>;
433
+ /**
434
+ * Drags an element and drops it on another element.
435
+ * @param source - The element to drag
436
+ * @param target - The element to drop on
437
+ */
438
+ dragTo(source: Locator, target: Locator, options?: {
439
+ sourcePosition?: {
440
+ x: number;
441
+ y: number;
442
+ };
443
+ targetPosition?: {
444
+ x: number;
445
+ y: number;
446
+ };
447
+ }): Promise<void>;
448
+ }