///
///
/**
* Configures Synpress for use with MetaMask.
*
* This function sets up the necessary configurations and hooks for running
* Cypress tests with MetaMask.
*
* @param on - Cypress plugin event handler
* @param config - Cypress plugin configuration options
* @param importDefaultWallet - Whether to import the default wallet
* @returns Modified Cypress configuration
* @throws Error If no Chrome browser is found in the configuration
*
* @remarks
* This function performs the following tasks:
*
* 1. Filters the available browsers to ensure only Chrome is used.
* 2. Sets up a 'before:browser:launch' hook to enable debug mode, establish
* a Playwright connection, and initialize MetaMask.
* 3. Sets up a 'before:spec' hook to import the MetaMask wallet before
* each test spec runs.
* 4. Provides task handlers for various MetaMask-related operations.
*
* @example
* ```typescript
* import { configureSynpress } from './configureSynpress';
*
* export default (on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions) => {
* return configureSynpress(on, config);
* };
* ```
*/
export default function configureSynpress(on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions, importDefaultWallet?: boolean): {
browsers: Cypress.Browser[];
projectRoot: string;
testingType: Cypress.TestingType;
version: string;
baseUrl: string | null;
env: {
[key: string]: any;
};
excludeSpecPattern: string | string[];
numTestsKeptInMemory: number;
port: number | null;
reporter: string;
reporterOptions: {
[key: string]: any;
};
slowTestThreshold: number;
watchForFileChanges: boolean;
defaultCommandTimeout: number;
execTimeout: number;
pageLoadTimeout: number;
modifyObstructiveCode: boolean;
requestTimeout: number;
responseTimeout: number;
taskTimeout: number;
fileServerFolder: string;
fixturesFolder: string | false;
downloadsFolder: string;
redirectionLimit: number;
resolvedNodePath: string;
resolvedNodeVersion: string;
screenshotOnRunFailure: boolean;
screenshotsFolder: string | false;
supportFile: string | false;
testIsolation: boolean;
videosFolder: string;
trashAssetsBeforeRuns: boolean;
videoCompression: number | boolean;
video: boolean;
chromeWebSecurity: boolean;
viewportHeight: number;
viewportWidth: number;
animationDistanceThreshold: number;
waitForAnimations: boolean;
scrollBehavior: Cypress.scrollBehaviorOptions;
experimentalCspAllowList: boolean | Cypress.experimentalCspAllowedDirectives[];
experimentalInteractiveRunEvents: boolean;
experimentalModifyObstructiveThirdPartyCode: boolean;
experimentalSkipDomainInjection: string[] | null;
experimentalJustInTimeCompile: boolean;
experimentalSourceRewriting: boolean;
experimentalStudio: boolean;
experimentalWebKitSupport: boolean;
experimentalMemoryManagement: boolean;
retries: Cypress.Nullable;
openMode?: Cypress.Nullable;
} | Cypress.RetryStrategyWithModeSpecs>;
includeShadowDom: boolean;
blockHosts: string | string[] | null;
projectId: string | null;
supportFolder: string;
specPattern: string | string[];
userAgent: string | null;
experimentalFetchPolyfill: boolean;
component: Cypress.ComponentConfigOptions;
e2e: Cypress.EndToEndConfigOptions;
clientCertificates: Cypress.ClientCertificate[];
setupNodeEvents: (on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions) => void | Cypress.PluginConfigOptions | Promise;
indexHtmlFile: string;
configFile: string;
arch: string;
hosts: {
[key: string]: string;
} | null;
isInteractive: boolean;
platform: "linux" | "darwin" | "win32";
remote: Cypress.RemoteState;
namespace: string;
repoRoot: string | null;
devServerPublicPathRoute: string;
cypressBinaryRoot: string;
browser?: Cypress.Browser;
autoOpen?: boolean;
browserUrl?: string;
clientRoute?: string;
cypressEnv?: string;
isNewProject?: boolean;
isTextTerminal?: boolean;
morgan?: boolean;
parentTestsFolder?: string;
parentTestsFolderDisplay?: string;
projectName?: string;
proxyUrl?: string;
report?: boolean;
reporterRoute?: string;
reporterUrl?: string;
socketId?: string | null;
socketIoCookie?: string;
socketIoRoute?: string;
spec?: Cypress.Spec | null;
specs?: Cypress.Spec[];
protocolEnabled?: boolean;
hideCommandLog?: boolean;
hideRunnerUi?: boolean;
};
//# sourceMappingURL=configureSynpress.d.ts.map