Files
AppFlowy-Web/cypress/support/cypress.d.ts
Nathan.fooo 47e09d2a87 Support database container3 (#202)
* chore: support database container

* chore: fix chat

* chore: fix database tab views

* fix: database test

* fix: page action

* fix: test

* chore: rename

* fix: navigate
2025-12-17 11:01:14 +08:00

45 lines
1.2 KiB
TypeScript

/// <reference types="cypress" />
declare namespace Cypress {
interface Cypress {
cy?: Chainable;
}
interface Chainable {
/**
* Clear all IndexedDB databases to ensure clean test state
* This removes stale document caches from y-indexeddb and the app's Dexie cache
*/
clearAllIndexedDB(): Chainable<void>;
}
// 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 {};