@serenity-js/webdriverio-8 3.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1232 -0
- package/LICENSE.md +201 -0
- package/NOTICE.md +1 -0
- package/README.md +234 -0
- package/esm/adapter/TestRunnerLoader.d.ts +17 -0
- package/esm/adapter/TestRunnerLoader.d.ts.map +1 -0
- package/esm/adapter/TestRunnerLoader.js +63 -0
- package/esm/adapter/TestRunnerLoader.js.map +1 -0
- package/esm/adapter/WebdriverIOFrameworkAdapter.d.ts +25 -0
- package/esm/adapter/WebdriverIOFrameworkAdapter.d.ts.map +1 -0
- package/esm/adapter/WebdriverIOFrameworkAdapter.js +90 -0
- package/esm/adapter/WebdriverIOFrameworkAdapter.js.map +1 -0
- package/esm/adapter/WebdriverIOFrameworkAdapterFactory.d.ts +18 -0
- package/esm/adapter/WebdriverIOFrameworkAdapterFactory.d.ts.map +1 -0
- package/esm/adapter/WebdriverIOFrameworkAdapterFactory.js +18 -0
- package/esm/adapter/WebdriverIOFrameworkAdapterFactory.js.map +1 -0
- package/esm/adapter/WebdriverIONotifier.d.ts +71 -0
- package/esm/adapter/WebdriverIONotifier.d.ts.map +1 -0
- package/esm/adapter/WebdriverIONotifier.js +390 -0
- package/esm/adapter/WebdriverIONotifier.js.map +1 -0
- package/esm/adapter/index.d.ts +2 -0
- package/esm/adapter/index.d.ts.map +1 -0
- package/esm/adapter/index.js +2 -0
- package/esm/adapter/index.js.map +1 -0
- package/esm/adapter/reporter/BrowserCapabilitiesReporter.d.ts +18 -0
- package/esm/adapter/reporter/BrowserCapabilitiesReporter.d.ts.map +1 -0
- package/esm/adapter/reporter/BrowserCapabilitiesReporter.js +42 -0
- package/esm/adapter/reporter/BrowserCapabilitiesReporter.js.map +1 -0
- package/esm/adapter/reporter/InitialisesReporters.d.ts +8 -0
- package/esm/adapter/reporter/InitialisesReporters.d.ts.map +1 -0
- package/esm/adapter/reporter/InitialisesReporters.js +2 -0
- package/esm/adapter/reporter/InitialisesReporters.js.map +1 -0
- package/esm/adapter/reporter/OutputStreamBuffer.d.ts +13 -0
- package/esm/adapter/reporter/OutputStreamBuffer.d.ts.map +1 -0
- package/esm/adapter/reporter/OutputStreamBuffer.js +25 -0
- package/esm/adapter/reporter/OutputStreamBuffer.js.map +1 -0
- package/esm/adapter/reporter/OutputStreamBufferPrinter.d.ts +16 -0
- package/esm/adapter/reporter/OutputStreamBufferPrinter.d.ts.map +1 -0
- package/esm/adapter/reporter/OutputStreamBufferPrinter.js +24 -0
- package/esm/adapter/reporter/OutputStreamBufferPrinter.js.map +1 -0
- package/esm/adapter/reporter/ProvidesWriteStream.d.ts +8 -0
- package/esm/adapter/reporter/ProvidesWriteStream.d.ts.map +1 -0
- package/esm/adapter/reporter/ProvidesWriteStream.js +2 -0
- package/esm/adapter/reporter/ProvidesWriteStream.js.map +1 -0
- package/esm/adapter/reporter/TagPrinter.d.ts +17 -0
- package/esm/adapter/reporter/TagPrinter.d.ts.map +1 -0
- package/esm/adapter/reporter/TagPrinter.js +52 -0
- package/esm/adapter/reporter/TagPrinter.js.map +1 -0
- package/esm/adapter/reporter/index.d.ts +6 -0
- package/esm/adapter/reporter/index.d.ts.map +1 -0
- package/esm/adapter/reporter/index.js +6 -0
- package/esm/adapter/reporter/index.js.map +1 -0
- package/esm/api.d.ts +3 -0
- package/esm/api.d.ts.map +1 -0
- package/esm/api.js +2 -0
- package/esm/api.js.map +1 -0
- package/esm/config/WebdriverIOConfig.d.ts +95 -0
- package/esm/config/WebdriverIOConfig.d.ts.map +1 -0
- package/esm/config/WebdriverIOConfig.js +2 -0
- package/esm/config/WebdriverIOConfig.js.map +1 -0
- package/esm/config/index.d.ts +2 -0
- package/esm/config/index.d.ts.map +1 -0
- package/esm/config/index.js +2 -0
- package/esm/config/index.js.map +1 -0
- package/esm/index.d.ts +16 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +14 -0
- package/esm/index.js.map +1 -0
- package/esm/screenplay/abilities/BrowseTheWebWithWebdriverIO.d.ts +40 -0
- package/esm/screenplay/abilities/BrowseTheWebWithWebdriverIO.d.ts.map +1 -0
- package/esm/screenplay/abilities/BrowseTheWebWithWebdriverIO.js +43 -0
- package/esm/screenplay/abilities/BrowseTheWebWithWebdriverIO.js.map +1 -0
- package/esm/screenplay/abilities/index.d.ts +2 -0
- package/esm/screenplay/abilities/index.d.ts.map +1 -0
- package/esm/screenplay/abilities/index.js +2 -0
- package/esm/screenplay/abilities/index.js.map +1 -0
- package/esm/screenplay/index.d.ts +3 -0
- package/esm/screenplay/index.d.ts.map +1 -0
- package/esm/screenplay/index.js +3 -0
- package/esm/screenplay/index.js.map +1 -0
- package/esm/screenplay/models/WebdriverIOBrowsingSession.d.ts +25 -0
- package/esm/screenplay/models/WebdriverIOBrowsingSession.d.ts.map +1 -0
- package/esm/screenplay/models/WebdriverIOBrowsingSession.js +125 -0
- package/esm/screenplay/models/WebdriverIOBrowsingSession.js.map +1 -0
- package/esm/screenplay/models/WebdriverIOCookie.d.ts +15 -0
- package/esm/screenplay/models/WebdriverIOCookie.d.ts.map +1 -0
- package/esm/screenplay/models/WebdriverIOCookie.js +42 -0
- package/esm/screenplay/models/WebdriverIOCookie.js.map +1 -0
- package/esm/screenplay/models/WebdriverIOErrorHandler.d.ts +9 -0
- package/esm/screenplay/models/WebdriverIOErrorHandler.d.ts.map +1 -0
- package/esm/screenplay/models/WebdriverIOErrorHandler.js +20 -0
- package/esm/screenplay/models/WebdriverIOErrorHandler.js.map +1 -0
- package/esm/screenplay/models/WebdriverIOModalDialogHandler.d.ts +27 -0
- package/esm/screenplay/models/WebdriverIOModalDialogHandler.d.ts.map +1 -0
- package/esm/screenplay/models/WebdriverIOModalDialogHandler.js +74 -0
- package/esm/screenplay/models/WebdriverIOModalDialogHandler.js.map +1 -0
- package/esm/screenplay/models/WebdriverIOPage.d.ts +50 -0
- package/esm/screenplay/models/WebdriverIOPage.d.ts.map +1 -0
- package/esm/screenplay/models/WebdriverIOPage.js +219 -0
- package/esm/screenplay/models/WebdriverIOPage.js.map +1 -0
- package/esm/screenplay/models/WebdriverIOPageElement.d.ts +34 -0
- package/esm/screenplay/models/WebdriverIOPageElement.d.ts.map +1 -0
- package/esm/screenplay/models/WebdriverIOPageElement.js +220 -0
- package/esm/screenplay/models/WebdriverIOPageElement.js.map +1 -0
- package/esm/screenplay/models/WebdriverIOPuppeteerModalDialogHandler.d.ts +30 -0
- package/esm/screenplay/models/WebdriverIOPuppeteerModalDialogHandler.d.ts.map +1 -0
- package/esm/screenplay/models/WebdriverIOPuppeteerModalDialogHandler.js +77 -0
- package/esm/screenplay/models/WebdriverIOPuppeteerModalDialogHandler.js.map +1 -0
- package/esm/screenplay/models/WebdriverProtocolErrorCode.d.ts +39 -0
- package/esm/screenplay/models/WebdriverProtocolErrorCode.d.ts.map +1 -0
- package/esm/screenplay/models/WebdriverProtocolErrorCode.js +40 -0
- package/esm/screenplay/models/WebdriverProtocolErrorCode.js.map +1 -0
- package/esm/screenplay/models/index.d.ts +5 -0
- package/esm/screenplay/models/index.d.ts.map +1 -0
- package/esm/screenplay/models/index.js +5 -0
- package/esm/screenplay/models/index.js.map +1 -0
- package/esm/screenplay/models/locators/WebdriverIOLocator.d.ts +33 -0
- package/esm/screenplay/models/locators/WebdriverIOLocator.d.ts.map +1 -0
- package/esm/screenplay/models/locators/WebdriverIOLocator.js +123 -0
- package/esm/screenplay/models/locators/WebdriverIOLocator.js.map +1 -0
- package/esm/screenplay/models/locators/WebdriverIORootLocator.d.ts +17 -0
- package/esm/screenplay/models/locators/WebdriverIORootLocator.d.ts.map +1 -0
- package/esm/screenplay/models/locators/WebdriverIORootLocator.js +30 -0
- package/esm/screenplay/models/locators/WebdriverIORootLocator.js.map +1 -0
- package/esm/screenplay/models/locators/index.d.ts +3 -0
- package/esm/screenplay/models/locators/index.d.ts.map +1 -0
- package/esm/screenplay/models/locators/index.js +3 -0
- package/esm/screenplay/models/locators/index.js.map +1 -0
- package/lib/adapter/TestRunnerLoader.d.ts +17 -0
- package/lib/adapter/TestRunnerLoader.d.ts.map +1 -0
- package/lib/adapter/TestRunnerLoader.js +67 -0
- package/lib/adapter/TestRunnerLoader.js.map +1 -0
- package/lib/adapter/WebdriverIOFrameworkAdapter.d.ts +25 -0
- package/lib/adapter/WebdriverIOFrameworkAdapter.d.ts.map +1 -0
- package/lib/adapter/WebdriverIOFrameworkAdapter.js +127 -0
- package/lib/adapter/WebdriverIOFrameworkAdapter.js.map +1 -0
- package/lib/adapter/WebdriverIOFrameworkAdapterFactory.d.ts +18 -0
- package/lib/adapter/WebdriverIOFrameworkAdapterFactory.d.ts.map +1 -0
- package/lib/adapter/WebdriverIOFrameworkAdapterFactory.js +22 -0
- package/lib/adapter/WebdriverIOFrameworkAdapterFactory.js.map +1 -0
- package/lib/adapter/WebdriverIONotifier.d.ts +71 -0
- package/lib/adapter/WebdriverIONotifier.d.ts.map +1 -0
- package/lib/adapter/WebdriverIONotifier.js +394 -0
- package/lib/adapter/WebdriverIONotifier.js.map +1 -0
- package/lib/adapter/index.d.ts +2 -0
- package/lib/adapter/index.d.ts.map +1 -0
- package/lib/adapter/index.js +18 -0
- package/lib/adapter/index.js.map +1 -0
- package/lib/adapter/reporter/BrowserCapabilitiesReporter.d.ts +18 -0
- package/lib/adapter/reporter/BrowserCapabilitiesReporter.d.ts.map +1 -0
- package/lib/adapter/reporter/BrowserCapabilitiesReporter.js +49 -0
- package/lib/adapter/reporter/BrowserCapabilitiesReporter.js.map +1 -0
- package/lib/adapter/reporter/InitialisesReporters.d.ts +8 -0
- package/lib/adapter/reporter/InitialisesReporters.d.ts.map +1 -0
- package/lib/adapter/reporter/InitialisesReporters.js +3 -0
- package/lib/adapter/reporter/InitialisesReporters.js.map +1 -0
- package/lib/adapter/reporter/OutputStreamBuffer.d.ts +13 -0
- package/lib/adapter/reporter/OutputStreamBuffer.d.ts.map +1 -0
- package/lib/adapter/reporter/OutputStreamBuffer.js +29 -0
- package/lib/adapter/reporter/OutputStreamBuffer.js.map +1 -0
- package/lib/adapter/reporter/OutputStreamBufferPrinter.d.ts +16 -0
- package/lib/adapter/reporter/OutputStreamBufferPrinter.d.ts.map +1 -0
- package/lib/adapter/reporter/OutputStreamBufferPrinter.js +28 -0
- package/lib/adapter/reporter/OutputStreamBufferPrinter.js.map +1 -0
- package/lib/adapter/reporter/ProvidesWriteStream.d.ts +8 -0
- package/lib/adapter/reporter/ProvidesWriteStream.d.ts.map +1 -0
- package/lib/adapter/reporter/ProvidesWriteStream.js +3 -0
- package/lib/adapter/reporter/ProvidesWriteStream.js.map +1 -0
- package/lib/adapter/reporter/TagPrinter.d.ts +17 -0
- package/lib/adapter/reporter/TagPrinter.d.ts.map +1 -0
- package/lib/adapter/reporter/TagPrinter.js +56 -0
- package/lib/adapter/reporter/TagPrinter.js.map +1 -0
- package/lib/adapter/reporter/index.d.ts +6 -0
- package/lib/adapter/reporter/index.d.ts.map +1 -0
- package/lib/adapter/reporter/index.js +22 -0
- package/lib/adapter/reporter/index.js.map +1 -0
- package/lib/api.d.ts +3 -0
- package/lib/api.d.ts.map +1 -0
- package/lib/api.js +18 -0
- package/lib/api.js.map +1 -0
- package/lib/config/WebdriverIOConfig.d.ts +95 -0
- package/lib/config/WebdriverIOConfig.d.ts.map +1 -0
- package/lib/config/WebdriverIOConfig.js +3 -0
- package/lib/config/WebdriverIOConfig.js.map +1 -0
- package/lib/config/index.d.ts +2 -0
- package/lib/config/index.d.ts.map +1 -0
- package/lib/config/index.js +18 -0
- package/lib/config/index.js.map +1 -0
- package/lib/index.d.ts +16 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +52 -0
- package/lib/index.js.map +1 -0
- package/lib/package.json +1 -0
- package/lib/screenplay/abilities/BrowseTheWebWithWebdriverIO.d.ts +40 -0
- package/lib/screenplay/abilities/BrowseTheWebWithWebdriverIO.d.ts.map +1 -0
- package/lib/screenplay/abilities/BrowseTheWebWithWebdriverIO.js +47 -0
- package/lib/screenplay/abilities/BrowseTheWebWithWebdriverIO.js.map +1 -0
- package/lib/screenplay/abilities/index.d.ts +2 -0
- package/lib/screenplay/abilities/index.d.ts.map +1 -0
- package/lib/screenplay/abilities/index.js +18 -0
- package/lib/screenplay/abilities/index.js.map +1 -0
- package/lib/screenplay/index.d.ts +3 -0
- package/lib/screenplay/index.d.ts.map +1 -0
- package/lib/screenplay/index.js +19 -0
- package/lib/screenplay/index.js.map +1 -0
- package/lib/screenplay/models/WebdriverIOBrowsingSession.d.ts +25 -0
- package/lib/screenplay/models/WebdriverIOBrowsingSession.d.ts.map +1 -0
- package/lib/screenplay/models/WebdriverIOBrowsingSession.js +129 -0
- package/lib/screenplay/models/WebdriverIOBrowsingSession.js.map +1 -0
- package/lib/screenplay/models/WebdriverIOCookie.d.ts +15 -0
- package/lib/screenplay/models/WebdriverIOCookie.d.ts.map +1 -0
- package/lib/screenplay/models/WebdriverIOCookie.js +46 -0
- package/lib/screenplay/models/WebdriverIOCookie.js.map +1 -0
- package/lib/screenplay/models/WebdriverIOErrorHandler.d.ts +9 -0
- package/lib/screenplay/models/WebdriverIOErrorHandler.d.ts.map +1 -0
- package/lib/screenplay/models/WebdriverIOErrorHandler.js +24 -0
- package/lib/screenplay/models/WebdriverIOErrorHandler.js.map +1 -0
- package/lib/screenplay/models/WebdriverIOModalDialogHandler.d.ts +27 -0
- package/lib/screenplay/models/WebdriverIOModalDialogHandler.d.ts.map +1 -0
- package/lib/screenplay/models/WebdriverIOModalDialogHandler.js +78 -0
- package/lib/screenplay/models/WebdriverIOModalDialogHandler.js.map +1 -0
- package/lib/screenplay/models/WebdriverIOPage.d.ts +50 -0
- package/lib/screenplay/models/WebdriverIOPage.d.ts.map +1 -0
- package/lib/screenplay/models/WebdriverIOPage.js +256 -0
- package/lib/screenplay/models/WebdriverIOPage.js.map +1 -0
- package/lib/screenplay/models/WebdriverIOPageElement.d.ts +34 -0
- package/lib/screenplay/models/WebdriverIOPageElement.d.ts.map +1 -0
- package/lib/screenplay/models/WebdriverIOPageElement.js +257 -0
- package/lib/screenplay/models/WebdriverIOPageElement.js.map +1 -0
- package/lib/screenplay/models/WebdriverIOPuppeteerModalDialogHandler.d.ts +30 -0
- package/lib/screenplay/models/WebdriverIOPuppeteerModalDialogHandler.d.ts.map +1 -0
- package/lib/screenplay/models/WebdriverIOPuppeteerModalDialogHandler.js +81 -0
- package/lib/screenplay/models/WebdriverIOPuppeteerModalDialogHandler.js.map +1 -0
- package/lib/screenplay/models/WebdriverProtocolErrorCode.d.ts +39 -0
- package/lib/screenplay/models/WebdriverProtocolErrorCode.d.ts.map +1 -0
- package/lib/screenplay/models/WebdriverProtocolErrorCode.js +43 -0
- package/lib/screenplay/models/WebdriverProtocolErrorCode.js.map +1 -0
- package/lib/screenplay/models/index.d.ts +5 -0
- package/lib/screenplay/models/index.d.ts.map +1 -0
- package/lib/screenplay/models/index.js +21 -0
- package/lib/screenplay/models/index.js.map +1 -0
- package/lib/screenplay/models/locators/WebdriverIOLocator.d.ts +33 -0
- package/lib/screenplay/models/locators/WebdriverIOLocator.d.ts.map +1 -0
- package/lib/screenplay/models/locators/WebdriverIOLocator.js +128 -0
- package/lib/screenplay/models/locators/WebdriverIOLocator.js.map +1 -0
- package/lib/screenplay/models/locators/WebdriverIORootLocator.d.ts +17 -0
- package/lib/screenplay/models/locators/WebdriverIORootLocator.d.ts.map +1 -0
- package/lib/screenplay/models/locators/WebdriverIORootLocator.js +34 -0
- package/lib/screenplay/models/locators/WebdriverIORootLocator.js.map +1 -0
- package/lib/screenplay/models/locators/index.d.ts +3 -0
- package/lib/screenplay/models/locators/index.d.ts.map +1 -0
- package/lib/screenplay/models/locators/index.js +19 -0
- package/lib/screenplay/models/locators/index.js.map +1 -0
- package/package.json +122 -0
- package/src/adapter/TestRunnerLoader.ts +90 -0
- package/src/adapter/WebdriverIOFrameworkAdapter.ts +130 -0
- package/src/adapter/WebdriverIOFrameworkAdapterFactory.ts +39 -0
- package/src/adapter/WebdriverIONotifier.ts +480 -0
- package/src/adapter/index.ts +1 -0
- package/src/adapter/reporter/BrowserCapabilitiesReporter.ts +63 -0
- package/src/adapter/reporter/InitialisesReporters.ts +8 -0
- package/src/adapter/reporter/OutputStreamBuffer.ts +30 -0
- package/src/adapter/reporter/OutputStreamBufferPrinter.ts +30 -0
- package/src/adapter/reporter/ProvidesWriteStream.ts +8 -0
- package/src/adapter/reporter/TagPrinter.ts +69 -0
- package/src/adapter/reporter/index.ts +5 -0
- package/src/api.ts +2 -0
- package/src/config/WebdriverIOConfig.ts +94 -0
- package/src/config/index.ts +1 -0
- package/src/index.ts +32 -0
- package/src/screenplay/abilities/BrowseTheWebWithWebdriverIO.ts +46 -0
- package/src/screenplay/abilities/index.ts +1 -0
- package/src/screenplay/index.ts +2 -0
- package/src/screenplay/models/WebdriverIOBrowsingSession.ts +176 -0
- package/src/screenplay/models/WebdriverIOCookie.ts +51 -0
- package/src/screenplay/models/WebdriverIOErrorHandler.ts +25 -0
- package/src/screenplay/models/WebdriverIOModalDialogHandler.ts +99 -0
- package/src/screenplay/models/WebdriverIOPage.ts +311 -0
- package/src/screenplay/models/WebdriverIOPageElement.ts +280 -0
- package/src/screenplay/models/WebdriverIOPuppeteerModalDialogHandler.ts +100 -0
- package/src/screenplay/models/WebdriverProtocolErrorCode.ts +38 -0
- package/src/screenplay/models/index.ts +4 -0
- package/src/screenplay/models/locators/WebdriverIOLocator.ts +176 -0
- package/src/screenplay/models/locators/WebdriverIORootLocator.ts +34 -0
- package/src/screenplay/models/locators/index.ts +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InitialisesReporters.js","sourceRoot":"","sources":["../../../src/adapter/reporter/InitialisesReporters.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { OutputStream } from '@serenity-js/core/lib/adapter/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* @package
|
|
4
|
+
*/
|
|
5
|
+
export declare class OutputStreamBuffer implements OutputStream {
|
|
6
|
+
private readonly prefix;
|
|
7
|
+
private buffer;
|
|
8
|
+
constructor(prefix: string);
|
|
9
|
+
write(content: string): void;
|
|
10
|
+
hasContent(): boolean;
|
|
11
|
+
flush(): string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=OutputStreamBuffer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OutputStreamBuffer.d.ts","sourceRoot":"","sources":["../../../src/adapter/reporter/OutputStreamBuffer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAE3E;;GAEG;AACH,qBAAa,kBAAmB,YAAW,YAAY;IAGvC,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,MAAM,CAAM;gBAES,MAAM,EAAE,MAAM;IAG3C,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI5B,UAAU,IAAI,OAAO;IAIrB,KAAK,IAAI,MAAM;CAUlB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @package
|
|
3
|
+
*/
|
|
4
|
+
export class OutputStreamBuffer {
|
|
5
|
+
prefix;
|
|
6
|
+
buffer = '';
|
|
7
|
+
constructor(prefix) {
|
|
8
|
+
this.prefix = prefix;
|
|
9
|
+
}
|
|
10
|
+
write(content) {
|
|
11
|
+
this.buffer += content;
|
|
12
|
+
}
|
|
13
|
+
hasContent() {
|
|
14
|
+
return this.buffer !== '';
|
|
15
|
+
}
|
|
16
|
+
flush() {
|
|
17
|
+
const prefixedContent = this.buffer
|
|
18
|
+
.split('\n')
|
|
19
|
+
.map(line => `${this.prefix} ${line}\n`)
|
|
20
|
+
.join('');
|
|
21
|
+
this.buffer = '';
|
|
22
|
+
return prefixedContent;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=OutputStreamBuffer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OutputStreamBuffer.js","sourceRoot":"","sources":["../../../src/adapter/reporter/OutputStreamBuffer.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAGE;IAFrB,MAAM,GAAG,EAAE,CAAC;IAEpB,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAC3C,CAAC;IAED,KAAK,CAAC,OAAe;QACjB,IAAI,CAAC,MAAM,IAAI,OAAO,CAAC;IAC3B,CAAC;IAED,UAAU;QACN,OAAO,IAAI,CAAC,MAAM,KAAK,EAAE,CAAC;IAC9B,CAAC;IAED,KAAK;QACD,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM;aAC9B,KAAK,CAAC,IAAI,CAAC;aACX,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAI,IAAI,CAAC,MAAO,IAAK,IAAK,IAAI,CAAC;aAC3C,IAAI,CAAC,EAAE,CAAC,CAAC;QAEd,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QAEjB,OAAO,eAAe,CAAC;IAC3B,CAAC;CACJ"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Stage, StageCrewMember } from '@serenity-js/core';
|
|
2
|
+
import type { OutputStream } from '@serenity-js/core/lib/adapter/index.js';
|
|
3
|
+
import type { DomainEvent } from '@serenity-js/core/lib/events/index.js';
|
|
4
|
+
import type { OutputStreamBuffer } from './OutputStreamBuffer.js';
|
|
5
|
+
/**
|
|
6
|
+
* @package
|
|
7
|
+
*/
|
|
8
|
+
export declare class OutputStreamBufferPrinter implements StageCrewMember {
|
|
9
|
+
private readonly buffer;
|
|
10
|
+
private readonly outputStream;
|
|
11
|
+
private stage?;
|
|
12
|
+
constructor(buffer: OutputStreamBuffer, outputStream: OutputStream, stage?: Stage);
|
|
13
|
+
assignedTo(stage: Stage): StageCrewMember;
|
|
14
|
+
notifyOf(event: DomainEvent): void;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=OutputStreamBufferPrinter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OutputStreamBufferPrinter.d.ts","sourceRoot":"","sources":["../../../src/adapter/reporter/OutputStreamBufferPrinter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAC,MAAM,uCAAuC,CAAC;AAGxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;GAEG;AACH,qBAAa,yBAA0B,YAAW,eAAe;IAEzD,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,KAAK,CAAC;gBAFG,MAAM,EAAE,kBAAkB,EAC1B,YAAY,EAAE,YAAY,EACnC,KAAK,CAAC,EAAE,KAAK;IAIzB,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,eAAe;IAMzC,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;CAKrC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SceneFinished } from '@serenity-js/core/lib/events/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* @package
|
|
4
|
+
*/
|
|
5
|
+
export class OutputStreamBufferPrinter {
|
|
6
|
+
buffer;
|
|
7
|
+
outputStream;
|
|
8
|
+
stage;
|
|
9
|
+
constructor(buffer, outputStream, stage) {
|
|
10
|
+
this.buffer = buffer;
|
|
11
|
+
this.outputStream = outputStream;
|
|
12
|
+
this.stage = stage;
|
|
13
|
+
}
|
|
14
|
+
assignedTo(stage) {
|
|
15
|
+
this.stage = stage;
|
|
16
|
+
return this;
|
|
17
|
+
}
|
|
18
|
+
notifyOf(event) {
|
|
19
|
+
if (event instanceof SceneFinished && this.buffer.hasContent()) {
|
|
20
|
+
this.outputStream.write(this.buffer.flush());
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=OutputStreamBufferPrinter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OutputStreamBufferPrinter.js","sourceRoot":"","sources":["../../../src/adapter/reporter/OutputStreamBufferPrinter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAItE;;GAEG;AACH,MAAM,OAAO,yBAAyB;IAEb;IACA;IACT;IAHZ,YACqB,MAA0B,EAC1B,YAA0B,EACnC,KAAa;QAFJ,WAAM,GAAN,MAAM,CAAoB;QAC1B,iBAAY,GAAZ,YAAY,CAAc;QACnC,UAAK,GAAL,KAAK,CAAQ;IAEzB,CAAC;IAED,UAAU,CAAC,KAAY;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,QAAQ,CAAC,KAAkB;QACvB,IAAI,KAAK,YAAY,aAAa,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;YAC7D,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QACjD,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProvidesWriteStream.d.ts","sourceRoot":"","sources":["../../../src/adapter/reporter/ProvidesWriteStream.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CAAC;CACxD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProvidesWriteStream.js","sourceRoot":"","sources":["../../../src/adapter/reporter/ProvidesWriteStream.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Tag } from '@serenity-js/core/lib/model/index.js';
|
|
2
|
+
import type { Capabilities } from '@wdio/types';
|
|
3
|
+
/**
|
|
4
|
+
* @package
|
|
5
|
+
*/
|
|
6
|
+
export declare class TagPrinter {
|
|
7
|
+
tagsFor(capability: Capabilities.DesiredCapabilities | Capabilities.W3CCapabilities): Tag[];
|
|
8
|
+
private browserTagFor;
|
|
9
|
+
private platformTagFor;
|
|
10
|
+
private browserNameFrom;
|
|
11
|
+
private browserVersionFrom;
|
|
12
|
+
private platformNameFrom;
|
|
13
|
+
private platformVersionFrom;
|
|
14
|
+
private desired;
|
|
15
|
+
private isW3C;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=TagPrinter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagPrinter.d.ts","sourceRoot":"","sources":["../../../src/adapter/reporter/TagPrinter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAC;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,qBAAa,UAAU;IACnB,OAAO,CAAC,UAAU,EAAE,YAAY,CAAC,mBAAmB,GAAG,YAAY,CAAC,eAAe,GAAG,GAAG,EAAE;IAS3F,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,kBAAkB;IAQ1B,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,mBAAmB;IAK3B,OAAO,CAAC,OAAO;IAMf,OAAO,CAAC,KAAK;CAGhB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { BrowserTag, PlatformTag } from '@serenity-js/core/lib/model/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* @package
|
|
4
|
+
*/
|
|
5
|
+
export class TagPrinter {
|
|
6
|
+
tagsFor(capability) {
|
|
7
|
+
const desiredCapabilities = this.desired(capability);
|
|
8
|
+
return [
|
|
9
|
+
this.browserTagFor(desiredCapabilities),
|
|
10
|
+
this.platformTagFor(desiredCapabilities),
|
|
11
|
+
];
|
|
12
|
+
}
|
|
13
|
+
browserTagFor(capabilities) {
|
|
14
|
+
return new BrowserTag(this.browserNameFrom(capabilities), this.browserVersionFrom(capabilities));
|
|
15
|
+
}
|
|
16
|
+
platformTagFor(capabilities) {
|
|
17
|
+
return new PlatformTag(this.platformNameFrom(capabilities), this.platformVersionFrom(capabilities));
|
|
18
|
+
}
|
|
19
|
+
browserNameFrom(capabilities) {
|
|
20
|
+
return capabilities.browserName
|
|
21
|
+
|| capabilities.browser
|
|
22
|
+
|| (capabilities['appium:app'] && capabilities['appium:app'].replace('sauce-storage:', ''))
|
|
23
|
+
|| 'unknown';
|
|
24
|
+
}
|
|
25
|
+
browserVersionFrom(capabilities) {
|
|
26
|
+
return capabilities.deviceName // mobile web
|
|
27
|
+
|| capabilities['appium:deviceName']
|
|
28
|
+
|| capabilities.browserVersion // W3C format
|
|
29
|
+
|| capabilities.version // JSONWP format
|
|
30
|
+
|| capabilities.browser_version; // BrowserStack
|
|
31
|
+
}
|
|
32
|
+
platformNameFrom(capabilities) {
|
|
33
|
+
return capabilities.platformName
|
|
34
|
+
|| capabilities['appium:platformName']
|
|
35
|
+
|| capabilities.platform
|
|
36
|
+
|| capabilities.os
|
|
37
|
+
|| 'unknown';
|
|
38
|
+
}
|
|
39
|
+
platformVersionFrom(capabilities) {
|
|
40
|
+
return capabilities['appium:platformVersion']
|
|
41
|
+
|| capabilities.os_version;
|
|
42
|
+
}
|
|
43
|
+
desired(capabilities) {
|
|
44
|
+
return this.isW3C(capabilities)
|
|
45
|
+
? capabilities.alwaysMatch
|
|
46
|
+
: capabilities;
|
|
47
|
+
}
|
|
48
|
+
isW3C(capabilities) {
|
|
49
|
+
return !!capabilities.alwaysMatch;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=TagPrinter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagPrinter.js","sourceRoot":"","sources":["../../../src/adapter/reporter/TagPrinter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAG/E;;GAEG;AACH,MAAM,OAAO,UAAU;IACnB,OAAO,CAAC,UAA2E;QAC/E,MAAM,mBAAmB,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAErD,OAAO;YACH,IAAI,CAAC,aAAa,CAAC,mBAAmB,CAAC;YACvC,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC;SAC3C,CAAC;IACN,CAAC;IAEO,aAAa,CAAC,YAA8C;QAChE,OAAO,IAAI,UAAU,CACjB,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,EAClC,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,CACxC,CAAC;IACN,CAAC;IAEO,cAAc,CAAC,YAA8C;QACjE,OAAO,IAAI,WAAW,CAClB,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,EACnC,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,CACzC,CAAC;IACN,CAAC;IAEO,eAAe,CAAC,YAA8C;QAClE,OAAO,YAAY,CAAC,WAAW;eACxB,YAAY,CAAC,OAAO;eACpB,CAAC,YAAY,CAAC,YAAY,CAAC,IAAI,YAAY,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;eACxF,SAAS,CAAC;IACrB,CAAC;IAEO,kBAAkB,CAAC,YAA8C;QACrE,OAAO,YAAY,CAAC,UAAU,CAAU,aAAa;eAC9C,YAAY,CAAC,mBAAmB,CAAC;eACjC,YAAY,CAAC,cAAc,CAAM,aAAa;eAC9C,YAAY,CAAC,OAAO,CAAa,gBAAgB;eACjD,YAAY,CAAC,eAAe,CAAC,CAAI,eAAe;IAC3D,CAAC;IAEO,gBAAgB,CAAC,YAA8C;QACnE,OAAO,YAAY,CAAC,YAAY;eACzB,YAAY,CAAC,qBAAqB,CAAC;eACnC,YAAY,CAAC,QAAQ;eACrB,YAAY,CAAC,EAAE;eACf,SAAS,CAAC;IACrB,CAAC;IAEO,mBAAmB,CAAC,YAA8C;QACtE,OAAO,YAAY,CAAC,wBAAwB,CAAC;eACtC,YAAY,CAAC,UAAU,CAAC;IACnC,CAAC;IAEO,OAAO,CAAC,YAA2C;QACvD,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC;YAC3B,CAAC,CAAC,YAAY,CAAC,WAAW;YAC1B,CAAC,CAAC,YAAY,CAAC;IACvB,CAAC;IAEO,KAAK,CAAC,YAA2C;QACrD,OAAO,CAAC,CAAE,YAA6C,CAAC,WAAW,CAAC;IACxE,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapter/reporter/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapter/reporter/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC"}
|
package/esm/api.d.ts
ADDED
package/esm/api.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,cAAc,uBAAuB,CAAC"}
|
package/esm/api.js
ADDED
package/esm/api.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AACA,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { SerenityConfig } from '@serenity-js/core';
|
|
2
|
+
import type { Options } from '@wdio/types';
|
|
3
|
+
/**
|
|
4
|
+
* [WebdriverIO configuration object](https://webdriver.io/docs/configurationfile/),
|
|
5
|
+
* with [Serenity/JS-specific additions](https://serenity-js.orgapi/core/class/SerenityConfig/).
|
|
6
|
+
*
|
|
7
|
+
* ## Integrating WebdriverIO with Serenity/JS
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* // wdio.conf.ts
|
|
11
|
+
* import { WebdriverIOConfig } from '@serenity-js/webdriverio-8'
|
|
12
|
+
*
|
|
13
|
+
* export const config: WebdriverIOConfig = {
|
|
14
|
+
*
|
|
15
|
+
* framework: '@serenity-js/webdriverio-8',
|
|
16
|
+
*
|
|
17
|
+
* serenity: {
|
|
18
|
+
* runner: 'cucumber',
|
|
19
|
+
* // runner: 'mocha',
|
|
20
|
+
* // runner: 'jasmine',
|
|
21
|
+
*
|
|
22
|
+
* crew: [
|
|
23
|
+
* // Optional, print test execution results to standard output
|
|
24
|
+
* '@serenity-js/console-reporter',
|
|
25
|
+
*
|
|
26
|
+
* // Optional, produce Serenity BDD reports
|
|
27
|
+
* // and living documentation (HTML)
|
|
28
|
+
* '@serenity-js/serenity-bdd',
|
|
29
|
+
* [ '@serenity-js/core:ArtifactArchiver', {
|
|
30
|
+
* outputDirectory: 'target/site/serenity'
|
|
31
|
+
* } ],
|
|
32
|
+
*
|
|
33
|
+
* // Optional, automatically capture screenshots
|
|
34
|
+
* // upon interaction failure
|
|
35
|
+
* [ '@serenity-js/web:Photographer', {
|
|
36
|
+
* strategy: 'TakePhotosOfFailures'
|
|
37
|
+
* // strategy: 'TakePhotosOfInteractions'
|
|
38
|
+
* } ],
|
|
39
|
+
* ]
|
|
40
|
+
* },
|
|
41
|
+
*
|
|
42
|
+
* // Configure your Cucumber runner
|
|
43
|
+
* cucumberOpts: {
|
|
44
|
+
* // see Cucumber configuration options below
|
|
45
|
+
* },
|
|
46
|
+
*
|
|
47
|
+
* // ... or Jasmine runner
|
|
48
|
+
* jasmineOpts: {
|
|
49
|
+
* // see Jasmine configuration options below
|
|
50
|
+
* },
|
|
51
|
+
*
|
|
52
|
+
* // ... or Mocha runner
|
|
53
|
+
* mochaOpts: {
|
|
54
|
+
* // see Mocha configuration options below
|
|
55
|
+
* },
|
|
56
|
+
*
|
|
57
|
+
* runner: 'local',
|
|
58
|
+
*
|
|
59
|
+
* specs: [
|
|
60
|
+
* './features/*.feature',
|
|
61
|
+
*
|
|
62
|
+
* // or for Mocha/Jasmine
|
|
63
|
+
* // './*.spec.ts'
|
|
64
|
+
* ],
|
|
65
|
+
*
|
|
66
|
+
* // Any other WebdriverIO configuration
|
|
67
|
+
* }
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* ## Learn more
|
|
71
|
+
*
|
|
72
|
+
* - [WebdriverIO configuration file](https://webdriver.io/docs/configurationfile/)
|
|
73
|
+
* - [`CucumberConfig`](https://serenity-js.org/api/cucumber-adapter/interface/CucumberConfig/)
|
|
74
|
+
* - [`JasmineConfig`](https://serenity-js.org/api/jasmine-adapter/interface/JasmineConfig/)
|
|
75
|
+
* - [`MochaConfig`](https://serenity-js.org/api/mocha-adapter/interface/MochaConfig/)
|
|
76
|
+
*
|
|
77
|
+
* @group Configuration
|
|
78
|
+
*/
|
|
79
|
+
export interface WebdriverIOConfig extends Options.Testrunner {
|
|
80
|
+
/**
|
|
81
|
+
* Serenity/JS configuration with an additional `runner` entry
|
|
82
|
+
* allowing to specify the test runner, such as `cucumber`, `mocha`, or `jasmine`.
|
|
83
|
+
*
|
|
84
|
+
* #### Learn more
|
|
85
|
+
*
|
|
86
|
+
* - [WebdriverIO configuration file](https://webdriver.io/docs/configurationfile/)
|
|
87
|
+
* - [`CucumberConfig`](https://serenity-js.org/api/cucumber-adapter/interface/CucumberConfig/)
|
|
88
|
+
* - [`JasmineConfig`](https://serenity-js.org/api/jasmine-adapter/interface/JasmineConfig/)
|
|
89
|
+
* - [`MochaConfig`](https://serenity-js.org/api/mocha-adapter/interface/MochaConfig/)
|
|
90
|
+
*/
|
|
91
|
+
serenity?: SerenityConfig & {
|
|
92
|
+
runner?: string;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=WebdriverIOConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebdriverIOConfig.d.ts","sourceRoot":"","sources":["../../src/config/WebdriverIOConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AACH,MAAM,WAAW,iBAAkB,SAAQ,OAAO,CAAC,UAAU;IAEzD;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,cAAc,GAAG;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebdriverIOConfig.js","sourceRoot":"","sources":["../../src/config/WebdriverIOConfig.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
package/esm/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Capabilities } from '@wdio/types';
|
|
2
|
+
import type { EventEmitter } from 'events';
|
|
3
|
+
import type { InitialisesReporters, ProvidesWriteStream } from './adapter/reporter/index.js';
|
|
4
|
+
import type { WebdriverIOConfig } from './config/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* WebdriverIO Framework Adapter integrates WebdriverIO with Serenity/JS
|
|
7
|
+
*/
|
|
8
|
+
declare const _default: {
|
|
9
|
+
init(cid: string, config: WebdriverIOConfig, specs: string[], capabilities: Capabilities.RemoteCapability, reporter: EventEmitter & ProvidesWriteStream & InitialisesReporters): Promise<{
|
|
10
|
+
hasTests: () => boolean;
|
|
11
|
+
run: () => Promise<number>;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
15
|
+
export * from './api.js';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAC7F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D;;GAEG;;cAGU,MAAM,UACH,iBAAiB,SAClB,MAAM,EAAE,gBACD,YAAY,CAAC,gBAAgB,YACjC,YAAY,GAAG,mBAAmB,GAAG,oBAAoB,GACpE,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;QAAC,GAAG,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC;;AAPvE,wBAkBE;AAEF,cAAc,UAAU,CAAC"}
|
package/esm/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { serenity } from '@serenity-js/core';
|
|
2
|
+
import { ModuleLoader, Path } from '@serenity-js/core/lib/io/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* WebdriverIO Framework Adapter integrates WebdriverIO with Serenity/JS
|
|
5
|
+
*/
|
|
6
|
+
export default {
|
|
7
|
+
async init(cid, config, specs, capabilities, reporter) {
|
|
8
|
+
const { WebdriverIOFrameworkAdapterFactory } = await import('./adapter/index.js');
|
|
9
|
+
const adapterFactory = new WebdriverIOFrameworkAdapterFactory(serenity, new ModuleLoader(process.cwd()), Path.from(process.cwd()));
|
|
10
|
+
return adapterFactory.init(cid, config, specs, capabilities, reporter);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export * from './api.js';
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,mCAAmC,CAAC;AAOvE;;GAEG;AACH,eAAe;IACX,KAAK,CAAC,IAAI,CACN,GAAW,EACX,MAAyB,EACzB,KAAe,EACf,YAA2C,EAC3C,QAAmE;QAEnE,MAAM,EAAE,kCAAkC,EAAE,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,CAAC;QAElF,MAAM,cAAc,GAAG,IAAI,kCAAkC,CACzD,QAAQ,EACR,IAAI,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,EAC/B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAC3B,CAAC;QAEF,OAAO,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;IAC3E,CAAC;CACJ,CAAC;AAEF,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import 'webdriverio';
|
|
2
|
+
import { BrowseTheWeb } from '@serenity-js/web';
|
|
3
|
+
/**
|
|
4
|
+
* This implementation of the [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
5
|
+
* enables the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to interact with web front-ends using [WebdriverIO](https://webdriver.io/).
|
|
6
|
+
*
|
|
7
|
+
* ## Using WebdriverIO to `BrowseTheWeb`
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { actorCalled } from '@serenity-js/core'
|
|
11
|
+
* import { BrowseTheWebWithWebdriverIO } from '@serenity-js/webdriverio-8'
|
|
12
|
+
* import { By, Navigate, PageElement, Text } from '@serenity-js/web'
|
|
13
|
+
* import { Ensure, equals } from '@serenity-js/assertions'
|
|
14
|
+
* import { browser } from '@wdio/globals'
|
|
15
|
+
*
|
|
16
|
+
* const HomePage = {
|
|
17
|
+
* title: () =>
|
|
18
|
+
* PageElement.located(By.css('h1')).describedAs('title')
|
|
19
|
+
* }
|
|
20
|
+
*
|
|
21
|
+
* await actorCalled('Wendy')
|
|
22
|
+
* .whoCan(BrowseTheWebWithWebdriverIO.using(browser)) // `browser` is global in WebdriverIO tests
|
|
23
|
+
* .attemptsTo(
|
|
24
|
+
* Navigate.to(`https://serenity-js.org`),
|
|
25
|
+
* Ensure.that(Text.of(HomePage.title()), equals('Serenity/JS')),
|
|
26
|
+
* );
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* ## Learn more
|
|
30
|
+
* - [WebdriverIO website](https://webdriver.io/)
|
|
31
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
32
|
+
* - [`Ability`](https://serenity-js.org/api/core/class/Ability/)
|
|
33
|
+
* - [`Actor`](https://serenity-js.org/api/core/class/Actor/)
|
|
34
|
+
*
|
|
35
|
+
* @group Abilities
|
|
36
|
+
*/
|
|
37
|
+
export declare class BrowseTheWebWithWebdriverIO extends BrowseTheWeb<WebdriverIO.Element> {
|
|
38
|
+
static using(browserInstance: WebdriverIO.Browser): BrowseTheWebWithWebdriverIO;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=BrowseTheWebWithWebdriverIO.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrowseTheWebWithWebdriverIO.d.ts","sourceRoot":"","sources":["../../../src/screenplay/abilities/BrowseTheWebWithWebdriverIO.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,2BAA4B,SAAQ,YAAY,CAAC,WAAW,CAAC,OAAO,CAAC;IAE9E,MAAM,CAAC,KAAK,CAAC,eAAe,EAAE,WAAW,CAAC,OAAO,GAAG,2BAA2B;CAGlF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import 'webdriverio';
|
|
2
|
+
import { BrowseTheWeb } from '@serenity-js/web';
|
|
3
|
+
import { WebdriverIOBrowsingSession } from '../models/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* This implementation of the [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
6
|
+
* enables the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to interact with web front-ends using [WebdriverIO](https://webdriver.io/).
|
|
7
|
+
*
|
|
8
|
+
* ## Using WebdriverIO to `BrowseTheWeb`
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { actorCalled } from '@serenity-js/core'
|
|
12
|
+
* import { BrowseTheWebWithWebdriverIO } from '@serenity-js/webdriverio-8'
|
|
13
|
+
* import { By, Navigate, PageElement, Text } from '@serenity-js/web'
|
|
14
|
+
* import { Ensure, equals } from '@serenity-js/assertions'
|
|
15
|
+
* import { browser } from '@wdio/globals'
|
|
16
|
+
*
|
|
17
|
+
* const HomePage = {
|
|
18
|
+
* title: () =>
|
|
19
|
+
* PageElement.located(By.css('h1')).describedAs('title')
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* await actorCalled('Wendy')
|
|
23
|
+
* .whoCan(BrowseTheWebWithWebdriverIO.using(browser)) // `browser` is global in WebdriverIO tests
|
|
24
|
+
* .attemptsTo(
|
|
25
|
+
* Navigate.to(`https://serenity-js.org`),
|
|
26
|
+
* Ensure.that(Text.of(HomePage.title()), equals('Serenity/JS')),
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* ## Learn more
|
|
31
|
+
* - [WebdriverIO website](https://webdriver.io/)
|
|
32
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
33
|
+
* - [`Ability`](https://serenity-js.org/api/core/class/Ability/)
|
|
34
|
+
* - [`Actor`](https://serenity-js.org/api/core/class/Actor/)
|
|
35
|
+
*
|
|
36
|
+
* @group Abilities
|
|
37
|
+
*/
|
|
38
|
+
export class BrowseTheWebWithWebdriverIO extends BrowseTheWeb {
|
|
39
|
+
static using(browserInstance) {
|
|
40
|
+
return new BrowseTheWebWithWebdriverIO(new WebdriverIOBrowsingSession(browserInstance));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=BrowseTheWebWithWebdriverIO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrowseTheWebWithWebdriverIO.js","sourceRoot":"","sources":["../../../src/screenplay/abilities/BrowseTheWebWithWebdriverIO.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,OAAO,2BAA4B,SAAQ,YAAiC;IAE9E,MAAM,CAAC,KAAK,CAAC,eAAoC;QAC7C,OAAO,IAAI,2BAA2B,CAAC,IAAI,0BAA0B,CAAC,eAAe,CAAC,CAAC,CAAC;IAC5F,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/screenplay/abilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/screenplay/abilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/screenplay/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/screenplay/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import 'webdriverio';
|
|
2
|
+
import type { BrowserCapabilities } from '@serenity-js/web';
|
|
3
|
+
import { BrowsingSession } from '@serenity-js/web';
|
|
4
|
+
import { WebdriverIOPage } from '../models/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* WebdriverIO-specific implementation of [`BrowsingSession`](https://serenity-js.org/api/web/class/BrowsingSession/).
|
|
7
|
+
*
|
|
8
|
+
* @group Models
|
|
9
|
+
*/
|
|
10
|
+
export declare class WebdriverIOBrowsingSession extends BrowsingSession<WebdriverIOPage> {
|
|
11
|
+
protected readonly browser: WebdriverIO.Browser;
|
|
12
|
+
constructor(browser: WebdriverIO.Browser);
|
|
13
|
+
allPages(): Promise<Array<WebdriverIOPage>>;
|
|
14
|
+
/**
|
|
15
|
+
* @param page
|
|
16
|
+
*/
|
|
17
|
+
changeCurrentPageTo(page: WebdriverIOPage): Promise<void>;
|
|
18
|
+
private activeWindowHandle;
|
|
19
|
+
currentPage(): Promise<WebdriverIOPage>;
|
|
20
|
+
protected registerCurrentPage(): Promise<WebdriverIOPage>;
|
|
21
|
+
private modalDialogHandlerFor;
|
|
22
|
+
private puppeteerPageFor;
|
|
23
|
+
browserCapabilities(): Promise<BrowserCapabilities>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=WebdriverIOBrowsingSession.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebdriverIOBrowsingSession.d.ts","sourceRoot":"","sources":["../../../src/screenplay/models/WebdriverIOBrowsingSession.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAIrB,OAAO,KAAK,EAAE,mBAAmB,EAAsB,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAKrD;;;;GAIG;AACH,qBAAa,0BAA2B,SAAQ,eAAe,CAAC,eAAe,CAAC;IAEhE,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO;gBAA5B,OAAO,EAAE,WAAW,CAAC,OAAO;IAQ5C,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IA8B1D;;OAEG;IACY,mBAAmB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;YAoB1D,kBAAkB;IAmBjB,WAAW,IAAI,OAAO,CAAC,eAAe,CAAC;cAwB7B,mBAAmB,IAAI,OAAO,CAAC,eAAe,CAAC;YAkB1D,qBAAqB;YAMrB,gBAAgB;IAwBrB,mBAAmB,IAAI,OAAO,CAAC,mBAAmB,CAAC;CAG/D"}
|