Skip to content

Commit

Permalink
Merge pull request #13 from testable/TES-547_wdio-7
Browse files Browse the repository at this point in the history
Tes 547 wdio 7
  • Loading branch information
avistramer authored May 27, 2021
2 parents 990e5e9 + 75dbfef commit c417a66
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 29 deletions.
58 changes: 30 additions & 28 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,36 +133,38 @@ declare module "testable-utils" {
export = testableUtils
}

declare namespace WebdriverIO {
interface Browser {
testableLogDebug: (message?: any) => any;
testableLogError: (message?: any) => any;
testableLogFatal: (message?: any) => any;
testableLogInfo: (message?: any) => any;
testableLogTrace: (message?: any) => any;
testableCsvGet: (name: string, index: number) => Promise<testableUtils.DataRow>
testableCsvRandom: (name: string) => Promise<testableUtils.DataRow>;
testableCsvNext: (name: string, options?: any) => Promise<Array<testableUtils.DataRow>>
testableResult: (resource?: string, url?: string) => any;
testableTiming: (result: any, options: testableUtils.ResultOptions) => Promise<void>;
testableCounter: (result: any, options: testableUtils.ResultOptions) => Promise<void>;
testableHistogram: (result: any, options: testableUtils.ResultOptions) => Promise<void>;
testableMetered: (result: any, options: testableUtils.ResultOptions) => Promise<void>;
testableGetMetric: () => any;
testableWaitForCondition: (options: testableUtils.Condition) => Promise<void>;
testableWaitForValue: (options: testableUtils.ValueCondition) => Promise<void>;
testableIncrementAndWaitForValue: (name: string, value?: number) => Promise<void>;
testableBarrier: (name: string, value?: any) => any;
testableInfo: () => any;

testableScreenshot: (name: string) => any;
testableStopwatch: (code: Function, metricName?: string, resource?: string) => any;
testableWaitForEvent: (eventName: string, timeout?: number, defaultVal?: any) => any;

testableWaitForFinish: () => Promise<void>;
declare global {
namespace WebdriverIO {
interface Browser {
testableLogDebug: (message?: any) => any;
testableLogError: (message?: any) => any;
testableLogFatal: (message?: any) => any;
testableLogInfo: (message?: any) => any;
testableLogTrace: (message?: any) => any;
testableCsvGet: (name: string, index: number) => Promise<testableUtils.DataRow>
testableCsvRandom: (name: string) => Promise<testableUtils.DataRow>;
testableCsvNext: (name: string, options?: any) => Promise<Array<testableUtils.DataRow>>
testableResult: (resource?: string, url?: string) => any;
testableTiming: (result: any, options: testableUtils.ResultOptions) => Promise<void>;
testableCounter: (result: any, options: testableUtils.ResultOptions) => Promise<void>;
testableHistogram: (result: any, options: testableUtils.ResultOptions) => Promise<void>;
testableMetered: (result: any, options: testableUtils.ResultOptions) => Promise<void>;
testableGetMetric: () => any;
testableWaitForCondition: (options: testableUtils.Condition) => Promise<void>;
testableWaitForValue: (options: testableUtils.ValueCondition) => Promise<void>;
testableIncrementAndWaitForValue: (name: string, value?: number) => Promise<void>;
testableBarrier: (name: string, value?: any) => any;
testableInfo: () => any;

testableScreenshot: (name: string) => any;
testableStopwatch: (code: Function, metricName?: string, resource?: string) => any;
testableWaitForEvent: (eventName: string, timeout?: number, defaultVal?: any) => any;

testableWaitForFinish: () => Promise<void>;
}
}
}

declare module "@wdio/sync" {
declare module "webdriverio/sync" {
export = WebdriverIO
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "testable-utils",
"version": "0.5.8",
"version": "0.5.9",
"description": "Utilities for Testable scripts",
"author": "Avi Stramer",
"keywords": [
Expand Down

0 comments on commit c417a66

Please sign in to comment.