forked from enviPath/enviPy
Current Dev State
This commit is contained in:
61
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/appium.md
generated
vendored
Normal file
61
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/appium.md
generated
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
name: Appium
|
||||
category: services
|
||||
tags: guide
|
||||
index: 3
|
||||
title: WebdriverIO - Appium Service
|
||||
---
|
||||
|
||||
Webdriver.io service plugin for Appium
|
||||
======================================
|
||||
|
||||
[webdriver.io](http://webdriver.io/) service plugin for [Appium](http://appium.io/). With this service installed, you need not to run Appium manually.
|
||||
|
||||
## Installation
|
||||
|
||||
The easiest way is to keep `wdio-appium-service` as a devDependency in your `package.json`.
|
||||
|
||||
```json
|
||||
{
|
||||
"devDependencies": {
|
||||
"wdio-appium-service": "~0.2.2"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You can this simply by adding it with:
|
||||
|
||||
```bash
|
||||
npm install wdio-appium-service --save-dev
|
||||
```
|
||||
|
||||
## How to Use
|
||||
|
||||
Please register this package as service plugin and specify command line arguments in [wdio.conf](http://webdriver.io/guide/getstarted/configuration.html). `'appium'` is used for command. If `command` key is provided in the configuration, it will be used.
|
||||
|
||||
```javascript
|
||||
{
|
||||
... // Other config
|
||||
|
||||
services: ['appium'],
|
||||
|
||||
appium: {
|
||||
args: {
|
||||
address: '127.0.0.1',
|
||||
commandTimeout: '7200',
|
||||
sessionOverride: true,
|
||||
debugLogSpacing: true,
|
||||
platformVersion: '9.1',
|
||||
platformName: 'iOS',
|
||||
showIosLog: true,
|
||||
deviceName: 'iPhone 6',
|
||||
nativeInstrumentsLib: true,
|
||||
isolateSimDevice: true,
|
||||
app: APP_PATH
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
For `args`, you can specify keys in lowerCamel. Its values are interpreted as its value. If value is boolean, `true` means specifying the key and `false` means not specifying.
|
||||
|
||||
For example, `platformVersion: '9.1'` will be converted to `--platform-version=9.1`, `sessionOverride: true` will be `--session-override`, `showIosLog: false` will specify nothing.
|
||||
62
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/browserstack.md
generated
vendored
Normal file
62
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/browserstack.md
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
name: Browserstack
|
||||
category: services
|
||||
tags: guide
|
||||
index: 1
|
||||
title: WebdriverIO - Browserstack Service
|
||||
---
|
||||
|
||||
Browserstack Service
|
||||
====================
|
||||
|
||||
A WebdriverIO service that manages local tunnel and job metadata for Browserstack users.
|
||||
|
||||
## Installation
|
||||
|
||||
Simply run:
|
||||
|
||||
```bash
|
||||
npm install --save-dev wdio-browserstack-service
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
WebdriverIO has Browserstack support out of the box. You should simply set `user` and `key` in your `wdio.conf.js` file. This service plugin provdies supports for [Browserstack Tunnel](https://www.browserstack.com/automate/node#setting-local-tunnel). Set `browserstackLocal: true` also to activate this feature.
|
||||
|
||||
```js
|
||||
// wdio.conf.js
|
||||
export.config = {
|
||||
// ...
|
||||
services: ['browserstack'],
|
||||
user: process.env.BROWSERSTACK_USERNAME,
|
||||
key: process.env.BROWSERSTACK_ACCESS_KEY,
|
||||
browserstackLocal: true,
|
||||
};
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### user
|
||||
Your Browserstack username.
|
||||
|
||||
Type: `String`
|
||||
|
||||
### key
|
||||
Your Browserstack access key.
|
||||
|
||||
Type: `String`
|
||||
|
||||
### browserstackLocal
|
||||
Set this to true to enable routing connections from Browserstack cloud through your computer.
|
||||
|
||||
Type: `Boolean`<br>
|
||||
Default: `false`
|
||||
|
||||
### browserstackOpts
|
||||
Specified optional will be passed down to BrowserstackLocal. See [this list](https://www.browserstack.com/local-testing#modifiers) for details.
|
||||
|
||||
Type: `Object`<br>
|
||||
Default: `{}`
|
||||
|
||||
## Known Issues
|
||||
|
||||
It's more of how webdriverio designed the multi-process model. It is extremely hard if not impossible to reliably transfer localIdentifier to child-processes. We recommend using it without the identifier at this moment, which will create an account-wide local tunnel.
|
||||
57
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/firefox-profile.md
generated
vendored
Normal file
57
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/firefox-profile.md
generated
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
name: firefox profile
|
||||
category: services
|
||||
tags: guide
|
||||
index: 5
|
||||
title: WebdriverIO - Firefox Profile Service
|
||||
---
|
||||
|
||||
WDIO Firefox Profile Service
|
||||
============================
|
||||
|
||||
You want to run your Firefox browser with a specific extension or need to set couple preferences? Selenium allows you to use a profile for the Firefox browser by passing this profile as `base64` string to the `firefox_profile` property in your desired capabilities. This requires to build that profile and convert it into `base64`. This service for the [wdio testrunner](http://webdriver.io/guide/testrunner/gettingstarted.html) takes the work of compiling the profile out of your hand and let's you define your desired options comfortable from the `wdio.conf.js` file.
|
||||
|
||||
To find all possible options just open [about:config](about:config) in your Firefox browser or go to [mozillaZine](http://kb.mozillazine.org/About:config_entries) website to find the whole documentation about each setting. In Addition to that you can define compiled (as `*.xpi`) Firefox extensions that should get installed before the test starts.
|
||||
|
||||
## Installation
|
||||
|
||||
The easiest way is to keep `wdio-firefox-profile-service` as a devDependency in your `package.json`.
|
||||
|
||||
```json
|
||||
{
|
||||
"devDependencies": {
|
||||
"wdio-firefox-profile-service": "~0.1"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You can simple do it by:
|
||||
|
||||
```bash
|
||||
npm install wdio-firefox-profile-service --save-dev
|
||||
```
|
||||
|
||||
Instructions on how to install `WebdriverIO` can be found [here.](http://webdriver.io/guide/getstarted/install.html)
|
||||
|
||||
## Configuration
|
||||
|
||||
Setup your profile by adding the `firefox-profile` service to your service list. Then define your settings in the `firefoxProfile` property like this:
|
||||
|
||||
```js
|
||||
// wdio.conf.js
|
||||
export.config = {
|
||||
// ...
|
||||
services: ['firefox-profile'],
|
||||
firefoxProfile: {
|
||||
extensions: ['/path/to/extensionA.xpi', '/path/to/extensionB.xpi'],
|
||||
'browser.startup.homepage': 'http://webdriver.io'
|
||||
},
|
||||
// ...
|
||||
};
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### firefoxProfile
|
||||
Contains all settings as key value pair. If you want to add an extension, use the `extensions` key with an array of string paths to the extensions you want to use.
|
||||
|
||||
Type: `Object`
|
||||
38
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/phantomjs.md
generated
vendored
Normal file
38
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/phantomjs.md
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
name: phantomjs
|
||||
category: services
|
||||
tags: guide
|
||||
index: 6
|
||||
title: WebdriverIO - PhantomJS Service
|
||||
---
|
||||
|
||||
PhantomJS Service
|
||||
===========================
|
||||
|
||||
[This service](https://github.com/cognitom/wdio-phantomjs-service) helps you to run PhantomJS seamlessly when running tests with the [WDIO testrunner](http://webdriver.io/guide/testrunner/gettingstarted.html). It uses [phantomjs-prebuilt](https://www.npmjs.com/package/phantomjs-prebuilt) NPM package.
|
||||
|
||||
## Installation
|
||||
|
||||
From npm:
|
||||
|
||||
```bash
|
||||
npm install --save-dev wdio-phantomjs-service
|
||||
```
|
||||
|
||||
Instructions on how to install `WebdriverIO` can be found [here.](http://webdriver.io/guide/getstarted/install.html)
|
||||
|
||||
## Configuration
|
||||
|
||||
In order to use the service you need to add `phantomjs` to your service array:
|
||||
|
||||
```js
|
||||
// wdio.conf.js
|
||||
export.config = {
|
||||
// ...
|
||||
services: ['phantomjs'],
|
||||
// ...
|
||||
};
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
See full examples [here](https://github.com/cognitom/webdriverio-examples/tree/master/wdio-wo-local-selenium).
|
||||
65
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/sauce.md
generated
vendored
Normal file
65
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/sauce.md
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
name: sauce
|
||||
category: services
|
||||
tags: guide
|
||||
index: 0
|
||||
title: WebdriverIO - Sauce Service
|
||||
---
|
||||
|
||||
Sauce Service
|
||||
=============
|
||||
|
||||
This service helps to integrate WebdriverIO and its WDIO testrunner with the [Sauce Labs](https://saucelabs.com/) service. It automatically sets the job status for you and updates all important job properties like job name, tags, availability or custom data. Having [Sauce Connect](https://wiki.saucelabs.com/display/DOCS/Sauce+Connect+Proxy) integrated you only need some minor tweaks to your configuration to run all your tests through a secure tunnel.
|
||||
|
||||
As stated above this service helps you to better integrate your tests with the Sauce service. One good example to show this are job annotations. These are special commands that annotate a job at a certain point of time to make it easy to find that point on the job details page.
|
||||
|
||||

|
||||
|
||||
This images shows the command list on Sauce Labs job details page running [this Cucumber test](https://github.com/webdriverio/webdriverio/blob/master/examples/wdio/runner-specs/cucumber/features/my-feature.feature). The service creates automatically job annotations to help you find commands that caused failing the test quickly.
|
||||
|
||||
## Installation
|
||||
|
||||
In order to use the service you need to download it from NPM:
|
||||
|
||||
```sh
|
||||
$ npm install wdio-sauce-service --save-dev
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
In order to use the service you need to set user and key in your wdio.conf.js file. It will automatically uses Sauce Labs to run your integration tests. If you want to use Sauce Connect you just need to set sauceConnect: true.
|
||||
|
||||
```js
|
||||
// wdio.conf.js
|
||||
export.config = {
|
||||
// ...
|
||||
services: ['sauce'],
|
||||
user: process.env.SAUCE_USERNAME,
|
||||
key: process.env.SAUCE_ACCESS_KEY,
|
||||
sauceConnect: true,
|
||||
// ...
|
||||
};
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### user
|
||||
Your Sauce Labs username.
|
||||
|
||||
Type: `String`
|
||||
|
||||
### key
|
||||
Your Sauce Labs access key.
|
||||
|
||||
Type: `String`
|
||||
|
||||
### sauceConnect
|
||||
If true it runs Sauce Connect and opens a secure connection between a Sauce Labs virtual machine running your browser tests.
|
||||
|
||||
Type: `Boolean`<br>
|
||||
Default: `false`
|
||||
|
||||
### sauceConnectOpts
|
||||
Apply Sauce Connect options (e.g. to change port number or logFile settings). See [this list](https://github.com/bermi/sauce-connect-launcher#advanced-usage) for more information.
|
||||
|
||||
Type: `Object`<br>
|
||||
Default: `{}`
|
||||
57
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/selenium-standalone.md
generated
vendored
Normal file
57
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/selenium-standalone.md
generated
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
name: selenium-standalone
|
||||
category: services
|
||||
tags: guide
|
||||
index: 4
|
||||
title: WebdriverIO - Selenium Standalone Service
|
||||
---
|
||||
|
||||
Selenium Standalone Service
|
||||
===========================
|
||||
|
||||
Handling the Selenium server is out of scope of the actual WebdriverIO project. This service helps you to run Selenium seamlessly when running tests with the [WDIO testrunner](http://webdriver.io/guide/testrunner/gettingstarted.html). It uses the well known [selenium-standalone](https://www.npmjs.com/package/selenium-standalone) NPM package that automatically sets up the standalone server and all required drivers for you.
|
||||
|
||||
## Installation
|
||||
|
||||
The easiest way is to keep `wdio-selenium-standalone-service` as a devDependency in your `package.json`.
|
||||
|
||||
```json
|
||||
{
|
||||
"devDependencies": {
|
||||
"wdio-selenium-standalone-service": "~0.1"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You can simple do it by:
|
||||
|
||||
```bash
|
||||
npm install wdio-selenium-standalone-service --save-dev
|
||||
```
|
||||
|
||||
Instructions on how to install `WebdriverIO` can be found [here.](http://webdriver.io/guide/getstarted/install.html)
|
||||
|
||||
## Configuration
|
||||
|
||||
By default, Google Chrome, Firefox and PhantomJS are available when installed on the host system. In order to use the service you need to add `selenium-standalone` to your service array:
|
||||
|
||||
```js
|
||||
// wdio.conf.js
|
||||
export.config = {
|
||||
// ...
|
||||
services: ['selenium-standalone'],
|
||||
// ...
|
||||
};
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### seleniumLogs
|
||||
Path where all logs from the Selenium server should be stored.
|
||||
|
||||
Type: `String`
|
||||
|
||||
### seleniumArgs
|
||||
Array of arguments for the Selenium server, passed directly to `child_process.spawn`.
|
||||
|
||||
Type: `String[]`<br>
|
||||
Default: `[]`
|
||||
79
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/static-server.md
generated
vendored
Normal file
79
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/static-server.md
generated
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
name: Static Server
|
||||
category: services
|
||||
tags: guide
|
||||
index: 7
|
||||
title: WebdriverIO - Static Server Service
|
||||
---
|
||||
|
||||
# Static Server Service
|
||||
|
||||
Some projects are front-end assets only and don't run on more than a static server. [This service](https://github.com/LeadPages/wdio-static-server-service) helps you to run a static file server during testing.
|
||||
|
||||
## Installation
|
||||
|
||||
The easiest way is to keep `wdio-static-server-service` as a devDependency in your `package.json`.
|
||||
|
||||
```json
|
||||
{
|
||||
"devDependencies": {
|
||||
"wdio-static-server-service": "^1.0.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You can simple do it by:
|
||||
|
||||
```bash
|
||||
npm install wdio-static-server-service --save-dev
|
||||
```
|
||||
|
||||
Instructions on how to install `WebdriverIO` can be found [here.](http://webdriver.io/guide/getstarted/install.html)
|
||||
|
||||
## Configuration
|
||||
|
||||
In order to use the static server service you need to add `static-server` to your service array:
|
||||
|
||||
```js
|
||||
// wdio.conf.js
|
||||
export.config = {
|
||||
// ...
|
||||
services: ['static-server'],
|
||||
// ...
|
||||
};
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### staticServerFolders (required)
|
||||
Array of folder paths and mount points.
|
||||
|
||||
Type: `Array<Object>`
|
||||
Props:
|
||||
- mount `{String}` - URL endpoint where folder will be mounted.
|
||||
- path `{String}` - Path to the folder to mount.
|
||||
|
||||
``` javascript
|
||||
// wdio.conf.js
|
||||
export.config = {
|
||||
// ...
|
||||
staticServerFolders: [
|
||||
{ mount: '/fixtures', path: './tests/fixtures' },
|
||||
{ mount: '/dist', path: './dist' },
|
||||
],
|
||||
// ...
|
||||
};
|
||||
```
|
||||
|
||||
### staticServerPort
|
||||
|
||||
Port to bind the server.
|
||||
|
||||
Type: `Number`
|
||||
|
||||
Default: `4567`
|
||||
|
||||
### staticServerLog
|
||||
|
||||
Debugging logs, will print mount points and requests. When `staticServerLogs` is set to `true` it will print into the console. Otherwise a string will be treated as the log folder.
|
||||
|
||||
Type: `Boolean` or `String`
|
||||
59
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/testingbot.md
generated
vendored
Normal file
59
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/testingbot.md
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
name: TestingBot
|
||||
category: services
|
||||
tags: guide
|
||||
index: 2
|
||||
title: WebdriverIO - TestingBot Service
|
||||
---
|
||||
|
||||
TestingBot Service
|
||||
==================
|
||||
|
||||
A WebdriverIO service. It updates the job metadata ('name', 'passed', 'tags', 'public', 'build', 'extra') and runs TestingBot Tunnel if desired.
|
||||
|
||||
## Installation
|
||||
|
||||
In order to use the service you need to download it from NPM:
|
||||
|
||||
```sh
|
||||
$ npm install wdio-testingbot-service --save-dev
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
In order to use the service you need to set user and key in your `wdio.conf.js` file, and set the `host` option to `hub.testingbot.com`. If you want to use [TestingBot Tunnel](https://testingbot.com/support/other/tunnel) you just need to set `tbTunnel: true`.
|
||||
|
||||
```js
|
||||
// wdio.conf.js
|
||||
export.config = {
|
||||
// ...
|
||||
services: ['testingbot'],
|
||||
user: process.env.TB_KEY,
|
||||
key: process.env.TB_SECRET,
|
||||
tbTunnel: true,
|
||||
// ...
|
||||
};
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### user
|
||||
Your TestingBot API KEY.
|
||||
|
||||
Type: `String`
|
||||
|
||||
### key
|
||||
Your TestingBot API SECRET.
|
||||
|
||||
Type: `String`
|
||||
|
||||
### tbTunnel
|
||||
If true it runs the TestingBot Tunnel and opens a secure connection between a TestingBot Virtual Machine running your browser tests.
|
||||
|
||||
Type: `Boolean`<br>
|
||||
Default: `false`
|
||||
|
||||
### tbTunnelOpts
|
||||
Apply TestingBot Tunnel options (e.g. to change port number or logFile settings). See [this list](https://github.com/testingbot/testingbot-tunnel-launcher) for more information.
|
||||
|
||||
Type: `Object`<br>
|
||||
Default: `{}`
|
||||
148
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/visual-regression.md
generated
vendored
Normal file
148
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/visual-regression.md
generated
vendored
Normal file
@ -0,0 +1,148 @@
|
||||
name: Visual Regression
|
||||
category: services
|
||||
tags: guide
|
||||
index: 8
|
||||
title: WebdriverIO - Visual Regression Service
|
||||
---
|
||||
|
||||
Visual Regression Service
|
||||
=========================
|
||||
|
||||
> Visual regression testing with WebdriverIO.
|
||||
|
||||
## Installation
|
||||
|
||||
wdio-visual-regression-service uses [wdio-screenshot](https://github.com/zinserjan/wdio-screenshot) for capturing screenhots.
|
||||
|
||||
You can install wdio-visual-regression-service via NPM as usual:
|
||||
|
||||
```sh
|
||||
$ npm install wdio-visual-regression-service --save-dev
|
||||
```
|
||||
|
||||
Instructions on how to install `WebdriverIO` can be found [here.](http://webdriver.io/guide/getstarted/install.html)
|
||||
|
||||
An example repository using the wdio-visual-regression service can be found [here.](https://github.com/zinserjan/webdriverio-example)
|
||||
|
||||
## Configuration
|
||||
Setup wdio-visual-regression-service by adding `visual-regression` to the service section of your WebdriverIO config and define your desired comparison strategy in `visualRegression`.
|
||||
|
||||
```js
|
||||
// wdio.conf.js
|
||||
|
||||
var path = require('path');
|
||||
var VisualRegressionCompare = require('wdio-visual-regression-service/compare');
|
||||
|
||||
function getScreenshotName(basePath) {
|
||||
return function(context) {
|
||||
var type = context.type;
|
||||
var testName = context.test.title;
|
||||
var browserVersion = parseInt(context.browser.version, 10);
|
||||
var browserName = context.browser.name;
|
||||
var browserWidth = context.meta.width;
|
||||
|
||||
return path.join(basePath, `${testName}_${type}_${browserName}_v${browserVersion}_${browserWidth}.png`);
|
||||
};
|
||||
}
|
||||
|
||||
exports.config = {
|
||||
// ...
|
||||
services: [
|
||||
'visual-regression',
|
||||
],
|
||||
visualRegression: {
|
||||
compare: new VisualRegressionCompare.LocalCompare({
|
||||
referenceName: getScreenshotName(path.join(process.cwd(), 'screenshots/reference')),
|
||||
screenshotName: getScreenshotName(path.join(process.cwd(), 'screenshots/screen')),
|
||||
diffName: getScreenshotName(path.join(process.cwd(), 'screenshots/diff')),
|
||||
misMatchTolerance: 0.01,
|
||||
}),
|
||||
viewportChangePause: 300,
|
||||
widths: [320, 480, 640, 1024],
|
||||
orientations: ['landscape', 'portrait'],
|
||||
},
|
||||
// ...
|
||||
};
|
||||
```
|
||||
|
||||
### Options
|
||||
Under the key `visualRegression` in your wdio.config.js you can pass a configuration object with the following structure:
|
||||
|
||||
* **compare** `Object` <br>
|
||||
screenshot compare method, see [Compare Methods](#compare-methods)
|
||||
|
||||
* **viewportChangePause** `Number` ( default: 100 ) <br>
|
||||
wait x milliseconds after viewport change. It can take a while for the browser to re-paint. This could lead to rendering issues and produces inconsistent results between runs.
|
||||
|
||||
* **widths** `Number[]` ( default: *[current-width]* ) (**desktop only**)<br>
|
||||
all screenshots will be taken in different screen widths (e.g. for responsive design tests)
|
||||
|
||||
* **orientations** `String[] {landscape, portrait}` ( default: *[current-orientation]* ) (**mobile only**)<br>
|
||||
all screenshots will be taken in different screen orientations (e.g. for responsive design tests)
|
||||
|
||||
### Compare Methods
|
||||
wdio-visual-regression-service allows the usage of different screenshot comparison methods.
|
||||
|
||||
#### VisualRegressionCompare.LocalCompare
|
||||
As it's name suggests *LocalCompare* captures screenshots locally on your computer and compares them against previous runs.
|
||||
|
||||
You can pass the following options to it's constructor as object:
|
||||
|
||||
* **referenceName** `Function` <br>
|
||||
pass in a function that returns the filename for the reference screenshot. Function receives a *context* object as first parameter with all relevant information about the command.
|
||||
|
||||
* **screenshotName** `Function` <br>
|
||||
pass in a function that returns the filename for the current screenshot. Function receives a *context* object as first parameter with all relevant information about the command.
|
||||
|
||||
* **diffName** `Function` <br>
|
||||
pass in a function that returns the filename for the diff screenshot. Function receives a *context* object as first parameter with all relevant information about the command.
|
||||
|
||||
* **misMatchTolerance** `Number` ( default: 0.01 ) <br>
|
||||
number between 0 and 100 that defines the degree of mismatch to consider two images as identical, increasing this value will decrease test coverage.
|
||||
|
||||
For an example of generating screenshot filesnames dependent on the current test name, have a look at the sample code of [Configuration](#configuration).
|
||||
|
||||
#### VisualRegressionCompare.SaveScreenshot
|
||||
This method is a stripped variant of `VisualRegressionCompare.LocalCompare` to capture only screenshots. This is quite useful when you just want to create reference screenshots and overwrite the previous one without diffing.
|
||||
|
||||
You can pass the following options to it's constructor as object:
|
||||
|
||||
* **screenshotName** `Function` <br>
|
||||
pass in a function that returns the filename for the current screenshot. Function receives a *context* object as first parameter with all relevant information about the command.
|
||||
|
||||
## Usage
|
||||
wdio-visual-regression-service enhances an WebdriverIO instance with the following commands:
|
||||
* `browser.checkViewport([{options}]);`
|
||||
* `browser.checkDocument([{options}]);`
|
||||
* `browser.checkElement(elementSelector, [{options}]);`
|
||||
|
||||
|
||||
All of these provide options that will help you to capture screenshots in different dimensions or to exclude unrelevant parts (e.g. content). The following options are
|
||||
available:
|
||||
|
||||
|
||||
* **exclude** `String[]|Object[]` (**not yet implemented**)<br>
|
||||
exclude frequently changing parts of your screenshot, you can either pass all kinds of different [WebdriverIO selector strategies](http://webdriver.io/guide/usage/selectors.html)
|
||||
that queries one or multiple elements or you can define x and y values which stretch a rectangle or polygon
|
||||
|
||||
* **hide** `String[]`<br>
|
||||
hides all elements queried by all kinds of different [WebdriverIO selector strategies](http://webdriver.io/guide/usage/selectors.html) (via `visibility: hidden`)
|
||||
|
||||
* **remove** `String[]`<br>
|
||||
removes all elements queried by all kinds of different [WebdriverIO selector strategies](http://webdriver.io/guide/usage/selectors.html) (via `display: none`)
|
||||
|
||||
* **widths** `Number[]` (**desktop only**)<br>
|
||||
Overrides the global *widths* value for this command. All screenshots will be taken in different screen widths (e.g. for responsive design tests)
|
||||
|
||||
* **orientations** `String[] {landscape, portrait}` (**mobile only**)<br>
|
||||
Overrides the global *orientations* value for this command. All screenshots will be taken in different screen orientations (e.g. for responsive design tests)
|
||||
|
||||
* **misMatchTolerance** `Number` <br>
|
||||
Overrides the global *misMatchTolerance* value for this command. Pass in a number between 0 and 100 that defines the degree of mismatch to consider two images as identical,
|
||||
|
||||
* **viewportChangePause** `Number` <br>
|
||||
Overrides the global *viewportChangePause* value for this command. Wait x milliseconds after viewport change.
|
||||
|
||||
### License
|
||||
|
||||
MIT
|
||||
63
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/webpack-dev-server
generated
vendored
Normal file
63
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/webpack-dev-server
generated
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
name: Webpack Dev Server
|
||||
category: services
|
||||
tags: guide
|
||||
index: 9
|
||||
title: WebdriverIO - Webpack Dev Server Service
|
||||
---
|
||||
|
||||
WDIO Webpack Dev Server Service
|
||||
====================
|
||||
|
||||
This allows you to run a local server with your built static assets using Webpack Dev Server before testing.
|
||||
|
||||
## Installation
|
||||
|
||||
``bash
|
||||
npm install wdio-webpack-dev-server-service --save-dev
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
This assumes you have:
|
||||
|
||||
- [set up WebdriverIO](https://webdriver.io/guide.html).
|
||||
- [set up Webpack Dev Server](https://webpack.js.org/guides/development/#webpack-dev-server) - the example will use `webpack.dev.config.js` as the configuration file.
|
||||
|
||||
Add the Webpack Dev Server service to your WebdriverIO services list:
|
||||
|
||||
```js
|
||||
// wdio.conf.js
|
||||
export.config = {
|
||||
// ...
|
||||
services: ['webpack-dev-server'],
|
||||
// ...
|
||||
};
|
||||
```
|
||||
|
||||
Options are set directly on your WebdriverIO config as well, e.g.
|
||||
|
||||
```js
|
||||
// wdio.conf.js
|
||||
export.config = {
|
||||
// ...
|
||||
webpackConfig: require('webpack.dev.config.js'),
|
||||
webpackPort: 8080,
|
||||
// ...
|
||||
};
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### `webpackConfig`
|
||||
Type: `String` | `Object`
|
||||
|
||||
Default: `webpack.config.js`
|
||||
|
||||
Either the absolute path to your Webpack configuration, or your actual Webpack configuration.
|
||||
|
||||
### `webpackPort`
|
||||
Type: Number
|
||||
|
||||
Default: `8080`
|
||||
|
||||
The port the Dev Server should be run on. You'll want to set this same port in the `baseUrl` option of your WebdriverIO configuration.
|
||||
64
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/webpack.md
generated
vendored
Normal file
64
static/js/ketcher2/node_modules/webdriverio/docs/guide/services/webpack.md
generated
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
name: Webpack
|
||||
category: services
|
||||
tags: guide
|
||||
index: 8
|
||||
title: WebdriverIO - Webpack Service
|
||||
---
|
||||
|
||||
WDIO Webpack Service
|
||||
====================
|
||||
|
||||
This allows you to build your static assets through webpack before testing.
|
||||
|
||||
## Installation
|
||||
|
||||
The easiest way is to keep `wdio-webpack-service` as a devDependency in your `package.json`.
|
||||
|
||||
```json
|
||||
{
|
||||
"devDependencies": {
|
||||
"wdio-webpack-service": "^1.0.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You can simple do it by:
|
||||
|
||||
```bash
|
||||
npm install wdio-webpack-service --save-dev
|
||||
```
|
||||
|
||||
Instructions on how to install `WebdriverIO` can be found [here.](http://webdriver.io/guide/getstarted/install.html)
|
||||
|
||||
## Configuration
|
||||
|
||||
In order to use the static server service you need to add `webpack` to your service array:
|
||||
|
||||
```js
|
||||
// wdio.conf.js
|
||||
export.config = {
|
||||
// ...
|
||||
services: ['webpack'],
|
||||
// ...
|
||||
};
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### webpackConfig (required)
|
||||
|
||||
The configuration for webpack to use in order to build the bundle. See [webpack's documentation](http://webpack.github.io/docs/configuration.html) for more information.
|
||||
|
||||
Type: `Object`
|
||||
|
||||
### webpackDriverConfig
|
||||
|
||||
This option lets you override some of the settings in you webpack config for the driver. You can use this to change things like where the files are placed. The configurations are merged using the [`webpack-merge`](https://github.com/survivejs/webpack-merge) project and the smart strategy.
|
||||
|
||||
Type: `Object`
|
||||
|
||||
### webpackLog
|
||||
|
||||
Debugging logs, will print mount points and requests. When `webpackLogs` is set to `true` it will print into the console. Otherwise a string will be treated as the log folder.
|
||||
|
||||
Type: `Boolean` or `String`
|
||||
Reference in New Issue
Block a user