Socket
Socket
Sign inDemoInstall

@wdio/types

Package Overview
Dependencies
Maintainers
0
Versions
171
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wdio/types - npm Package Compare versions

Comparing version 9.0.0-alpha.115 to 9.0.0-alpha.321

9

build/index.d.ts
import type * as Automation from './Automation.js';
import type * as Capabilities from './Capabilities.js';
import type * as Clients from './Clients.js';
import type * as Options from './Options.js';

@@ -13,3 +12,3 @@ import type * as Services from './Services.js';

export { MESSAGE_TYPES } from './Workers.js';
export type { Automation, Capabilities, Clients, Options, Services, Frameworks, Reporters, Workers };
export type { Automation, Capabilities, Options, Services, Frameworks, Reporters, Workers };
export type JsonPrimitive = string | number | boolean | null;

@@ -55,4 +54,8 @@ export type JsonObject = {

}
interface Config extends Options.Testrunner {
interface Config extends Options.Testrunner, Capabilities.WithRequestedTestrunnerCapabilities {
}
interface RemoteConfig extends Options.WebdriverIO, Capabilities.WithRequestedCapabilities {
}
interface MultiremoteConfig extends Options.Testrunner, Capabilities.WithRequestedMultiremoteCapabilities {
}
interface HookFunctionExtension {

@@ -59,0 +62,0 @@ }

/// <reference types="node" resolution-mode="require"/>
import type { W3CCapabilities, DesiredCapabilities, RemoteCapabilities, RemoteCapability, MultiRemoteCapabilities } from './Capabilities.js';
import type { Hooks, ServiceEntry } from './Services.js';

@@ -75,37 +74,2 @@ import type { ReporterEntry } from './Reporters.js';

/**
* Defines the capabilities you want to run in your WebDriver session. Check out the
* [WebDriver Protocol](https://w3c.github.io/webdriver/#capabilities) for more details.
* If you want to run multiremote session you need to define an object that has the
* browser instance names as string and their capabilities as values.
*
* @example
* ```js
* // WebDriver session
* const browser = remote({
* capabilities: {
* browserName: 'chrome',
* browserVersion: 86
* platformName: 'Windows 10'
* }
* })
*
* // multiremote session
* const browser = remote({
* capabilities: {
* browserA: {
* browserName: 'chrome',
* browserVersion: 86
* platformName: 'Windows 10'
* },
* browserB: {
* browserName: 'firefox',
* browserVersion: 74
* platformName: 'Mac OS X'
* }
* }
* })
* ```
*/
capabilities: W3CCapabilities | DesiredCapabilities;
/**
* Level of logging verbosity.

@@ -174,57 +138,7 @@ *

}
export interface MultiRemoteBrowserOptions {
sessionId?: string;
capabilities: DesiredCapabilities;
}
export type SauceRegions = 'us' | 'eu' | 'apac' | 'us-west-1' | 'us-east-1' | 'us-east-4' | 'eu-central-1' | 'apac-southeast-1' | 'staging';
export interface WebdriverIO extends Omit<WebDriver, 'capabilities'>, Pick<Hooks, 'onReload' | 'beforeCommand' | 'afterCommand'> {
export interface WebdriverIO extends WebDriver, Pick<Hooks, 'onReload' | 'beforeCommand' | 'afterCommand'> {
/**
* Defines the capabilities you want to run in your WebDriver session. Check out the
* [WebDriver Protocol](https://w3c.github.io/webdriver/#capabilities) for more details.
* If you want to run a multiremote session you need to define instead of an array of
* capabilities an object that has an arbitrary browser instance name as string and its
* capabilities as values.
*
* @example
* ```js
* // wdio.conf.js
* export const config = {
* // ...
* capabilities: {
* browserName: 'safari',
* platformName: 'MacOS 10.13',
* ...
* }
* }
* ```
*
* @example
* ```
* // wdio.conf.js
* export const config = {
* // ...
* capabilities: {
* browserA: {
* browserName: 'chrome',
* browserVersion: 86
* platformName: 'Windows 10'
* },
* browserB: {
* browserName: 'firefox',
* browserVersion: 74
* platformName: 'Mac OS X'
* }
* }
* })
* ```
* @private
*/
capabilities: RemoteCapability;
/**
* Define the protocol you want to use for your browser automation.
* Currently only [`webdriver`](https://www.npmjs.com/package/webdriver) and
* [`devtools`](https://www.npmjs.com/package/devtools) are supported,
* as these are the main browser automation technologies available.
*
* @deprecated this option will be removed in future versions of WebdriverIO. We recommend to use WebDriver for browser or mobile automation.
*/
automationProtocol?: SupportedProtocols;

@@ -256,49 +170,4 @@ /**

}
export interface Testrunner extends Hooks, Omit<WebdriverIO, 'capabilities'>, WebdriverIO.HookFunctionExtension {
export interface Testrunner extends Hooks, WebdriverIO, WebdriverIO.HookFunctionExtension {
/**
* Defines a set of capabilities you want to run in your testrunner session. Check out the
* [WebDriver Protocol](https://w3c.github.io/webdriver/#capabilities) for more details.
* If you want to run a multiremote session you need to define instead of an array of
* capabilities an object that has an arbitrary browser instance name as string and its
* capabilities as values.
*
* @example
* ```js
* // wdio.conf.js
* export const config = {
* // define parallel running capabilities
* capabilities: [{
* browserName: 'safari',
* platformName: 'MacOS 10.13',
* ...
* }, {
* browserName: 'microsoftedge',
* platformName: 'Windows 10',
* ...
* }]
* }
* ```
*
* @example
* ```
* // wdio.conf.js
* export const config = {
* // multiremote example
* capabilities: {
* browserA: {
* browserName: 'chrome',
* browserVersion: 86
* platformName: 'Windows 10'
* },
* browserB: {
* browserName: 'firefox',
* browserVersion: 74
* platformName: 'Mac OS X'
* }
* }
* })
* ```
*/
capabilities: RemoteCapabilities;
/**
* Type of runner

@@ -328,3 +197,3 @@ * - local: every spec file group is spawned in its own local process

*/
suites?: Record<string, string[] | string[][]>;
suites?: Record<string, (string | string[])[] | string[][]>;
/**

@@ -449,5 +318,5 @@ * Maximum number of total parallel running workers.

/**
* autocompile options
* TSX custom TSConfig path
*/
autoCompileOpts?: AutoCompileConfig;
tsConfigPath?: string;
}

@@ -460,89 +329,2 @@ export interface TSConfigPathsOptions {

}
export interface AutoCompileConfig {
autoCompile?: boolean;
babelOpts?: Record<string, any>;
tsNodeOpts?: TSNodeOptions;
}
export interface TSNodeOptions {
/**
* Path to tsconfig file.
*/
project?: string;
/**
* Skip project config resolution and loading
*/
skipProject?: boolean;
/**
* JSON object to merge with compiler options
*/
compilerOptions?: Record<string, any>;
/**
* Use TypeScript's faster transpileModule
*/
transpileOnly?: boolean;
/**
* Opposite of --transpileOnly
*/
typeCheck?: boolean;
/**
* Use TypeScript's compiler host API
*/
compilerHost?: boolean;
/**
* Load files, include and exclude from tsconfig.json on startup.
* This may avoid certain typechecking failures. See Missing types for details.
*/
files?: boolean;
/**
* Ignore TypeScript warnings by diagnostic code
*/
ignoreDiagnostics?: string[];
/**
* Override the path patterns to skip compilation
*/
ignore?: RegExp;
/**
* Skip ignore checks
*/
skipIgnore?: boolean;
/**
* Specify a custom TypeScript compiler
*/
compiler?: string;
/**
* Re-order file extensions so that TypeScript imports are preferred
*/
preferTsExts?: boolean;
/**
* Logs TypeScript errors to stderr instead of throwing exceptions
*/
logError?: boolean;
/**
* Use pretty diagnostic formatter
*/
pretty?: boolean;
/**
* Behave as if invoked in this working directory
*/
cwd?: string;
/**
* Emit output files into `.ts-node` directory. Requires `--compilerHost`
*/
emit?: boolean;
/**
* Scope compiler to files within `scopeDir`. Anything outside this directory is ignored.
*/
scope?: boolean;
/**
* Directory within which compiler is limited when `scope` is enabled.
*/
scopeDir?: string;
/**
* Disable top-level await in REPL. Equivalent to node's `--no-experimental-repl-await`
*/
noExperimentalReplAwait?: boolean;
}
export interface MultiRemote extends Omit<Testrunner, 'capabilities'> {
capabilities: MultiRemoteCapabilities;
}
export type Definition<T> = {

@@ -549,0 +331,0 @@ [k in keyof T]: {

@@ -5,6 +5,6 @@ /// <reference types="node" resolution-mode="require"/>

import type { EventEmitter } from 'node:events';
import type { RemoteCapability } from './Capabilities.js';
import type { RequestedStandaloneCapabilities, RequestedMultiremoteCapabilities } from './Capabilities.js';
interface OutputFileFormatOptions {
cid: string;
capabilities: RemoteCapability;
capabilities: RequestedStandaloneCapabilities | RequestedMultiremoteCapabilities;
}

@@ -11,0 +11,0 @@ export interface Options {

@@ -1,3 +0,3 @@

import type { DesiredCapabilities, RemoteCapability, RemoteCapabilities } from './Capabilities.js';
import type { Testrunner as TestrunnerOptions, WebdriverIO as WebdriverIOOptions } from './Options.js';
import type { RequestedStandaloneCapabilities, RequestedMultiremoteCapabilities, TestrunnerCapabilities, ResolvedTestrunnerCapabilities } from './Capabilities.js';
import type { Suite, Test, TestResult } from './Frameworks.js';

@@ -25,3 +25,3 @@ import type { Worker } from './Workers.js';

export interface ServiceClass {
new (options: ServiceOption, caps: RemoteCapability, config: Omit<WebdriverIOOptions, 'capabilities'>): ServiceInstance;
new (options: ServiceOption, capabilities: ResolvedTestrunnerCapabilities, config: WebdriverIOOptions): ServiceInstance;
}

@@ -34,3 +34,3 @@ export interface ServicePlugin extends ServiceClass {

options?: Record<string, any>;
capabilities?: RemoteCapability;
capabilities?: WebdriverIO.Capabilities;
config?: TestrunnerOptions;

@@ -109,3 +109,3 @@ }

*/
onPrepare?(config: TestrunnerOptions, capabilities: RemoteCapabilities): unknown | Promise<unknown>;
onPrepare?(config: TestrunnerOptions, capabilities: TestrunnerCapabilities): unknown | Promise<unknown>;
/**

@@ -119,13 +119,13 @@ * Gets executed after all workers got shut down and the process is about to exit. An error

*/
onComplete?(exitCode: number, config: Omit<TestrunnerOptions, 'capabilities'>, capabilities: RemoteCapabilities, results: any): unknown | Promise<unknown>;
onComplete?(exitCode: number, config: Omit<TestrunnerOptions, 'capabilities'>, capabilities: TestrunnerCapabilities, results: any): unknown | Promise<unknown>;
/**
* Gets executed before a worker process is spawned and can be used to initialize specific service
* for that worker as well as modify runtime environments in an async fashion.
* @param cid capability id (e.g 0-0)
* @param caps object containing capabilities for session that will be spawn in the worker
* @param specs specs to be run in the worker process
* @param args object that will be merged with the main configuration once worker is initialized
* @param execArgv list of string arguments passed to the worker process
* @param cid capability id (e.g 0-0)
* @param capabilities object containing capabilities for session that will be spawn in the worker
* @param specs specs to be run in the worker process
* @param args object that will be merged with the main configuration once worker is initialized
* @param execArgv list of string arguments passed to the worker process
*/
onWorkerStart?(cid: string, caps: DesiredCapabilities, specs: string[], args: TestrunnerOptions, execArgv: string[]): unknown | Promise<unknown>;
onWorkerStart?(cid: string, capabilities: WebdriverIO.Capabilities, specs: string[], args: TestrunnerOptions, execArgv: string[]): unknown | Promise<unknown>;
/**

@@ -146,3 +146,3 @@ * Gets executed just after a worker process has exited.

*/
before?(capabilities: RemoteCapability, specs: string[], browser: any): unknown | Promise<unknown>;
before?(capabilities: RequestedStandaloneCapabilities | RequestedMultiremoteCapabilities, specs: string[], browser: any): unknown | Promise<unknown>;
/**

@@ -155,3 +155,3 @@ * Gets executed after all tests are done. You still have access to all global variables from

*/
after?(result: number, capabilities: RemoteCapability, specs: string[]): unknown | Promise<unknown>;
after?(result: number, capabilities: RequestedStandaloneCapabilities | RequestedMultiremoteCapabilities, specs: string[]): unknown | Promise<unknown>;
/**

@@ -165,3 +165,3 @@ * Gets executed just before initialising the webdriver session and test framework. It allows you

*/
beforeSession?(config: Omit<TestrunnerOptions, 'capabilities'>, capabilities: RemoteCapability, specs: string[], cid: string): unknown | Promise<unknown>;
beforeSession?(config: Omit<TestrunnerOptions, 'capabilities'>, capabilities: RequestedStandaloneCapabilities | RequestedMultiremoteCapabilities, specs: string[], cid: string): unknown | Promise<unknown>;
/**

@@ -173,3 +173,3 @@ * Gets executed right after terminating the webdriver session.

*/
afterSession?(config: TestrunnerOptions, capabilities: RemoteCapability, specs: string[]): unknown | Promise<unknown>;
afterSession?(config: TestrunnerOptions, capabilities: WebdriverIO.Capabilities, specs: string[]): unknown | Promise<unknown>;
/**

@@ -176,0 +176,0 @@ * Gets executed when a refresh happens.

/// <reference types="node" resolution-mode="require"/>
import type { EventEmitter } from 'node:events';
import type { Testrunner as TestrunnerOptions } from './Options.js';
import type { DesiredCapabilities, MultiRemoteCapabilities, RemoteCapability, W3CCapabilities } from './Capabilities.js';
export interface Job {
caps: DesiredCapabilities | W3CCapabilities | MultiRemoteCapabilities;
caps: WebdriverIO.Capabilities;
specs: string[];

@@ -14,3 +13,3 @@ hasTests: boolean;

configFile: string;
caps: RemoteCapability;
caps: WebdriverIO.Capabilities;
specs: string[];

@@ -41,3 +40,3 @@ execArgv: string[];

isMultiremote?: boolean;
capabilities: RemoteCapability;
capabilities: WebdriverIO.Capabilities;
};

@@ -48,5 +47,5 @@ origin: string;

export interface Worker extends Omit<TestrunnerOptions, 'capabilities' | 'specs' | 'rootDir'>, EventEmitter {
capabilities: RemoteCapability;
capabilities: WebdriverIO.Capabilities;
config: TestrunnerOptions;
caps: RemoteCapability;
caps: WebdriverIO.Capabilities;
cid: string;

@@ -53,0 +52,0 @@ isBusy?: boolean;

{
"name": "@wdio/types",
"version": "9.0.0-alpha.115+8196c4ccb",
"version": "9.0.0-alpha.321+63953a607",
"description": "Utility package providing type information for a variety of WebdriverIO interfaces",

@@ -35,3 +35,3 @@ "author": "Christian Bromann <mail@bromann.dev>",

},
"gitHead": "8196c4ccb4f66e217e161804ef549f18b60dccb3"
"gitHead": "63953a6079023cb390a113fe5ce1c1b01b8e4bb6"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc