mirror of
https://github.com/AppFlowy-IO/AppFlowy-Web.git
synced 2025-11-30 03:18:02 +08:00
54 lines
1.5 KiB
TypeScript
54 lines
1.5 KiB
TypeScript
/// <reference types="cypress" />
|
|
|
|
declare namespace Cypress {
|
|
interface Chainable {
|
|
/**
|
|
* Simulates real hover event using Chrome DevTools Protocol
|
|
*/
|
|
realHover(options?: {
|
|
/**
|
|
* Position of the hover relative to the element
|
|
*/
|
|
position?: 'topLeft' | 'top' | 'topRight' | 'left' | 'center' | 'right' | 'bottomLeft' | 'bottom' | 'bottomRight';
|
|
/**
|
|
* Pointer type for the hover
|
|
*/
|
|
pointer?: 'mouse' | 'pen';
|
|
/**
|
|
* Scroll behavior
|
|
*/
|
|
scrollBehavior?: 'center' | 'top' | 'bottom' | 'nearest' | false;
|
|
}): Chainable<Element>;
|
|
|
|
/**
|
|
* Simulates real click event using Chrome DevTools Protocol
|
|
*/
|
|
realClick(options?: {
|
|
button?: 'left' | 'middle' | 'right';
|
|
clickCount?: number;
|
|
position?: 'topLeft' | 'top' | 'topRight' | 'left' | 'center' | 'right' | 'bottomLeft' | 'bottom' | 'bottomRight';
|
|
x?: number;
|
|
y?: number;
|
|
pointer?: 'mouse' | 'pen';
|
|
scrollBehavior?: 'center' | 'top' | 'bottom' | 'nearest' | false;
|
|
}): Chainable<Element>;
|
|
|
|
/**
|
|
* Simulates real mouse press event using Chrome DevTools Protocol
|
|
*/
|
|
realPress(key: string | string[], options?: {
|
|
delay?: number;
|
|
pressDelay?: number;
|
|
log?: boolean;
|
|
}): Chainable<Element>;
|
|
|
|
/**
|
|
* Simulates real type event using Chrome DevTools Protocol
|
|
*/
|
|
realType(text: string, options?: {
|
|
delay?: number;
|
|
pressDelay?: number;
|
|
log?: boolean;
|
|
}): Chainable<Element>;
|
|
}
|
|
} |