mirror of
https://github.com/AppFlowy-IO/AppFlowy-Web.git
synced 2025-11-29 02:38:00 +08:00
41 lines
1.0 KiB
TypeScript
41 lines
1.0 KiB
TypeScript
/// <reference types="cypress" />
|
|
|
|
declare namespace Cypress {
|
|
interface Cypress {
|
|
cy?: Chainable;
|
|
}
|
|
|
|
interface Chainable {
|
|
// Add any custom commands here
|
|
}
|
|
|
|
// Fix for uncaught:exception event
|
|
interface Actions {
|
|
(action: 'uncaught:exception', fn: (err: Error, runnable?: any) => boolean | void): void;
|
|
}
|
|
}
|
|
|
|
// Augment Cypress types to properly type jQuery results
|
|
declare global {
|
|
namespace Cypress {
|
|
interface JQuery<TElement = HTMLElement> extends JQuery<TElement> {
|
|
[index: number]: TElement;
|
|
length: number;
|
|
each(fn: (index: number, elem: TElement) => void): JQuery<TElement>;
|
|
filter(fn: (index: number, elem: TElement) => boolean): JQuery<TElement>;
|
|
find(selector: string): JQuery<TElement>;
|
|
text(): string;
|
|
attr(name: string): string | undefined;
|
|
last(): JQuery<TElement>;
|
|
}
|
|
|
|
// Fix Subject type to include response properties
|
|
interface Response<T = any> {
|
|
status: number;
|
|
body: T;
|
|
headers: { [key: string]: string };
|
|
}
|
|
}
|
|
}
|
|
|
|
export {}; |