diff --git a/README.md b/README.md index e56eb8053..bd60b709d 100644 --- a/README.md +++ b/README.md @@ -55,8 +55,6 @@ Hermione is a utility for integration testing of web pages using [WebdriverIO v7 - [takeScreenshotOnFails](#takescreenshotonfails) - [takeScreenshotOnFailsMode](#takescreenshotonfailsmode) - [takeScreenshotOnFailsTimeout](#takescreenshotonfailstimeout) - - [screenshotOnReject](#screenshotonreject) - - [screenshotOnRejectTimeout](#screenshotonrejecttimeout) - [testsPerSession](#testspersession) - [retry](#retry) - [shouldRetry](#shouldretry) @@ -613,7 +611,7 @@ Parameters: - ignoreElements (optional) `String|String[]` – elements, matching specified selectors will be ignored when comparing images - tolerance (optional) `Number` – overrides config [browsers](#browsers).[tolerance](#tolerance) value - antialiasingTolerance (optional) `Number` – overrides config [browsers](#browsers).[antialiasingTolerance](#antialiasingTolerance) value - - allowViewportOverflow (optional) `Boolean` – by default Hermione throws an error if element is outside the viewport bounds. This option disables check that element is outside of the viewport left, top, right or bottom bounds. In this case only visible part of the element will be captured. But if set browser option [compositeImage](#compositeimage) with `true` value, then in the resulting screenshot will appear the whole element with not visible parts outside of the viewport. + - allowViewportOverflow (optional) `Boolean` – by default Hermione throws an error if element is outside the viewport bounds. This option disables check that element is outside of the viewport left, top, right or bottom bounds. And in this case if browser option [compositeImage](#compositeimage) set to `false`, then only visible part of the element will be captured. But if [compositeImage](#compositeimage) set to `true` (default), then in the resulting screenshot will appear the whole element with not visible parts outside of the bottom bounds of viewport. - captureElementFromTop (optional) `Boolean` - ability to set capture element from the top area or from current position. In the first case viewport will be scrolled to the top of the element. Default value is `true` - compositeImage (optional) `Boolean` - overrides config [browsers](#browsers).[compositeImage](#compositeImage) value - screenshotDelay (optional) `Number` - overrides config [browsers](#browsers).[screenshotDelay](#screenshotDelay) value @@ -723,18 +721,16 @@ Option name | Description `sessionEnvFlags` | Environment flags that determine which protocol will be used in created browser session. Default value is `{}`. `waitTimeout` | Timeout for web page event. Default value is `1000` ms. `waitInterval` | Interval for web page event. Default value is `250` ms. -`httpTimeout` | Timeout for any requests to Selenium server. Default value is `90000` ms. +`httpTimeout` | Timeout for any requests to Selenium server. Default value is `30000` ms. `urlHttpTimeout` | Timeout for `/url` request to Selenium server. Default value is `httpTimeout`. -`pageLoadTimeout` | Timeout for the page loading to complete. Default value is `300000` ms. +`pageLoadTimeout` | Timeout for the page loading to complete. Default value is `20000` ms. `sessionRequestTimeout` | Timeout for getting a browser session. Default value is `httpTimeout`. -`sessionQuitTimeout` | Timeout for quitting a session. Default value is `httpTimeout`. +`sessionQuitTimeout` | Timeout for quitting a session. Default value is `5000`. `testTimeout` | Timeout for test execution (in milliseconds). Default value is `null`, in this case will be used common timeout for all browsers from `system.mochaOpts.timeout`. `sessionsPerBrowser` | Number of sessions which are run simultaneously. Default value is `1`. `takeScreenshotOnFails` | Options for setting up taking a screenshot of a test fail. Default value is `{testFail: true, assertViewFail: false}`. -`takeScreenshotOnFailsMode` | Mode for taking a screenshot on test fail. Available options are `fullpage` and `viewport`. Default value is `viewport`. -`takeScreenshotOnFailsTimeout`| Timeout for taking screenshot on test fail. Default value is `httpTimeout`. -`screenshotOnReject` | Allows to attach a screenshot of a current page on test fail. Default value is `true`. :warning: Option is deprecated! Use `takeScreenshotOnFails` instead. -`screenshotOnRejectTimeout`| Timeout for taking screenshot on test fail. Default value is `httpTimeout`. :warning: Option is deprecated! Use `takeScreenshotOnFailsTimeout` instead. +`takeScreenshotOnFailsMode` | Mode for taking a screenshot on test fail. Available options are `fullpage` and `viewport`. Default value is `fullpage`. +`takeScreenshotOnFailsTimeout`| Timeout for taking screenshot on test fail. Default value is `5000`. `testsPerSession` | Maximum amount of tests (`it`s) to run in each web driver session. `retry` | How many times a test should be rerun. Default value is `0`. `shouldRetry` | Function that determines whether to make a retry. By default returns `true `if retry attempts are available otherwise returns `false`. @@ -746,15 +742,15 @@ Option name | Description `waitOrientationChange` | Allows to wait until screen orientation is changed. Default value is `true`. `resetCursor` | Allows to configure whether to move mouse cursor to `body` coordinates `(0, 0)` before each test run. `tolerance` | Maximum allowed [CIEDE2000](http://en.wikipedia.org/wiki/Color_difference#CIEDE2000) difference between colors. Default value is `2.3`. -`antialiasingTolerance` | Minimum difference in brightness between the darkest/lightest pixel (which is adjacent to the antiasing pixel) and theirs adjacent pixels. Default value is `0`. +`antialiasingTolerance` | Minimum difference in brightness between the darkest/lightest pixel (which is adjacent to the antiasing pixel) and theirs adjacent pixels. Default value is `4`. `compareOpts` | Options for comparing images. `buildDiffOpts` | Options for building diff image. `assertViewOpts` | Options for `assertView` command, used by default. `screenshotsDir` | Directory to save reference images for command `assertView`. Default dir is `hermione/screens` which is relative to `process.cwd()`. `strictTestsOrder` | `hermione` will guarantee tests order in [readTests](#readtests) results. `false` by default. -`compositeImage` | Allows testing of regions which bottom bounds are outside of a viewport height (default: false). In the resulting screenshot the area which fits the viewport bounds will be joined with the area which is outside of the viewport height. +`compositeImage` | Allows testing of regions which bottom bounds are outside of a viewport height. In the resulting screenshot the area which fits the viewport bounds will be joined with the area which is outside of the viewport height. `true` by default. `screenshotMode` | Image capture mode. -`saveHistory` | Allows to save history of all executed commands. `false` by default. +`saveHistory` | Allows to save history of all executed commands. `true` by default. `agent` | Allows to use a custom `http`/`https`/`http2` [agent](https://www.npmjs.com/package/got#agent) to make requests. Default value is `null`. `headers` | Allows to set custom [headers](https://github.com/sindresorhus/got/blob/main/documentation/2-options.md#headers) to pass into every webdriver request. These headers aren't passed into browser request. Read more about this option in [wdio](https://github.com/sindresorhus/got/blob/main/documentation/2-options.md#headers). Default value is `null`. `transformRequest` | Allows to intercept [HTTP request options](https://github.com/sindresorhus/got#options) before a WebDriver request is made. Default value is `null`. @@ -809,20 +805,20 @@ For example: ``` #### httpTimeout -Timeout for any requests to Selenium server. Default value is `90000` ms. +Timeout for any requests to Selenium server. Default value is `30000` ms. #### urlHttpTimeout Timeout for `/url` request to Selenium server. Default value is `httpTimeout`. It may be useful when opening url takes a long time (for example a lot of logic is executed in middlewares), and you don't want to increase timeout for other commands. #### pageLoadTimeout -Timeout for the page loading to complete. Default value is `300000` ms. +Timeout for the page loading to complete. Default value is `20000` ms. #### sessionRequestTimeout Timeout for getting a browser session. Default value is `httpTimeout`. #### sessionQuitTimeout -Timeout for quitting a session. Default value is `httpTimeout`. +Timeout for quitting a session. Default value is `5000`. #### testTimeout Timeout for test execution (in milliseconds). @@ -842,26 +838,16 @@ Number of sessions which are run simultaneously. Global value for all browsers. Options for setting up taking a screenshot of a test fail. Can be an object with `testFail` and `assertViewFail` keys. * `testFail` (default: `true`) – takes a screenshot when an error occurs in the test, except `assertView` fail. -* `assertViewFail` (default: `false`) – takes a screenshot if the test fails on the `assetView` command. +* `assertViewFail` (default: `true`) – takes a screenshot if the test fails on the `assetView` command. #### takeScreenshotOnFailsMode Mode for taking a screenshot on test fail. There are two available options: -* `fullpage` – Hermione will take a screenshot of the entire page from top. -* `viewport` – Default value. Hermione will take a screenshot of the current viewport. +* `fullpage` – Hermione will take a screenshot of the entire page from top. Default value. +* `viewport` – Hermione will take a screenshot of the current viewport. #### takeScreenshotOnFailsTimeout -Timeout for taking screenshot on test fail. Default value is `httpTimeout`. - -#### screenshotOnReject -Allows to attach a screenshot of a current page on test fail. Default value is `true`. - -:warning: This option is **deprecated**, use `takeScreenshotOnFails` instead. - -#### screenshotOnRejectTimeout -Timeout for taking screenshot on test fail. Default value is `httpTimeout`. - -:warning: This option is **deprecated**, use `takeScreenshotOnFailsTimeout` instead. +Timeout for taking screenshot on test fail. Default value is `5000`. #### testsPerSession Maximum amount of tests (`it`s) to run in each web driver session. After limit is reached, session will be closed and new one will be started. @@ -961,7 +947,7 @@ Directory to save reference images for command `assertView`. Default dir is `her #### compositeImage -Allows testing of regions which bottom bounds are outside of a viewport height (default: false). In the resulting screenshot the area which fits the viewport bounds will be joined with the area which is outside of the viewport height. +Allows testing of regions which bottom bounds are outside of a viewport height (default: true). In the resulting screenshot the area which fits the viewport bounds will be joined with the area which is outside of the viewport height. #### screenshotMode @@ -975,7 +961,7 @@ By default, `screenshotMode` on android browsers is set to `viewport` to work ar #### saveHistory -Allows to save history of all executed commands. `false` by default. +Allows to save history of all executed commands. `true` by default. Some plugins can rely on this history, for instance: - [hermione-profiler](https://github.com/gemini-testing/hermione-profiler) @@ -1351,10 +1337,10 @@ shows the following -V, --version output the version number -c, --config path to configuration file - -r, --reporter test reporters -b, --browser run tests only in specified browser -s, --set run tests only in the specified set - --require require a module before running hermione + -r, --require require a module before running hermione + --reporter test reporters --grep run only tests matching the pattern --update-refs update screenshot references or gather them if they do not exist ("assertView" command) --inspect [inspect] nodejs inspector on [=[host:]port] @@ -1371,7 +1357,7 @@ hermione --config ./config.js --reporter flat --browser firefox --grep name ### Reporters -You can choose `flat`, `plain` or `jsonl` reporter by option `-r, --reporter`. Default is `flat`. +You can choose `flat`, `plain` or `jsonl` reporter by option `--reporter`. Default is `flat`. Information about test results is displayed to the command line by default. But there is an ability to redirect the output to a file, for example: ``` hermione --reporter '{"type": "jsonl", "path": "./some-path/result.jsonl"}' @@ -1389,7 +1375,7 @@ Information about each report type: ### Require modules -Using `--require` option you can load external modules, which exists in your local machine, before running hermione. This is useful for: +Using `-r` or `--require` option you can load external modules, which exists in your local machine, before running hermione. This is useful for: - compilers such as TypeScript via [ts-node](https://www.npmjs.com/package/ts-node) (using `--require ts-node/register`) or Babel via [@babel/register](https://www.npmjs.com/package/@babel/register) (using `--require @babel/register`); - loaders such as ECMAScript modules via [esm](https://www.npmjs.com/package/esm). diff --git a/lib/cli/index.js b/lib/cli/index.js index da8f51d02..3081e8f71 100644 --- a/lib/cli/index.js +++ b/lib/cli/index.js @@ -32,8 +32,8 @@ exports.run = () => { .on('--help', () => logger.log(info.configOverriding)) .option('-b, --browser ', 'run tests only in specified browser', collect) .option('-s, --set ', 'run tests only in the specified set', collect) - .option('-r, --reporter ', 'test reporters', collect) - .option('--require ', 'require module', collect) + .option('-r, --require ', 'require module', collect) + .option('--reporter ', 'test reporters', collect) .option('--grep ', 'run only tests matching the pattern') .option('--update-refs', 'update screenshot references or gather them if they do not exist ("assertView" command)') .option('--inspect [inspect]', 'nodejs inspector on [=[host:]port]') diff --git a/lib/config/browser-options.js b/lib/config/browser-options.js index 46b912b1c..3510348fd 100644 --- a/lib/config/browser-options.js +++ b/lib/config/browser-options.js @@ -139,21 +139,7 @@ function buildBrowserOptions(defaultFactory, extra) { ...value }) }), - screenshotOnReject: options.boolean('screenshotOnReject', {isDeprecated: true}), - takeScreenshotOnFailsTimeout: option({ - defaultValue: defaultFactory('takeScreenshotOnFailsTimeout'), - parseEnv: Number, - parseCli: Number, - validate: (value) => _.isNull(value) || utils.assertNonNegativeInteger(value, 'takeScreenshotOnFailsTimeout'), - map: (value, config, currNode, meta) => { - if (meta.isSpecified) { - return value; - } - - return value || currNode.screenshotOnRejectTimeout; - } - }), - screenshotOnRejectTimeout: options.optionalNonNegativeInteger('screenshotOnRejectTimeout', {isDeprecated: true}), + takeScreenshotOnFailsTimeout: options.optionalNonNegativeInteger('takeScreenshotOnFailsTimeout'), takeScreenshotOnFailsMode: options.enumeration('takeScreenshotOnFailsMode', ['fullpage', 'viewport']), prepareBrowser: options.optionalFunction('prepareBrowser'), diff --git a/lib/config/defaults.js b/lib/config/defaults.js index 2599063af..21c5c243c 100644 --- a/lib/config/defaults.js +++ b/lib/config/defaults.js @@ -10,7 +10,7 @@ module.exports = { screenshotsDir: 'hermione/screens', diffColor: '#ff00ff', tolerance: 2.3, - antialiasingTolerance: 0, + antialiasingTolerance: 4, compareOpts: { shouldCluster: false, clustersSize: 10, @@ -28,24 +28,23 @@ module.exports = { calibrate: false, screenshotMode: 'auto', screenshotDelay: 0, - compositeImage: false, + compositeImage: true, prepareBrowser: null, prepareEnvironment: null, waitTimeout: 1000, waitInterval: 250, - httpTimeout: 90000, + httpTimeout: 30000, urlHttpTimeout: null, - pageLoadTimeout: null, + pageLoadTimeout: 20000, sessionRequestTimeout: null, - sessionQuitTimeout: null, + sessionQuitTimeout: 5000, testTimeout: null, takeScreenshotOnFails: { - assertViewFail: false + testFail: true, + assertViewFail: true }, - screenshotOnReject: true, - takeScreenshotOnFailsTimeout: null, - screenshotOnRejectTimeout: null, - takeScreenshotOnFailsMode: 'viewport', + takeScreenshotOnFailsTimeout: 5000, + takeScreenshotOnFailsMode: 'fullpage', reporters: ['flat'], debug: false, parallelLimit: Infinity, @@ -67,7 +66,7 @@ module.exports = { waitOrientationChange: true, resetCursor: true, strictTestsOrder: false, - saveHistory: false, + saveHistory: true, fileExtensions: ['.js'], outputDir: null, agent: null, diff --git a/lib/config/index.js b/lib/config/index.js index dd58c5f94..5fb45820a 100644 --- a/lib/config/index.js +++ b/lib/config/index.js @@ -40,23 +40,12 @@ module.exports = class Config { argv: process.argv })); - // TODO: remove this after deleting screenshotOnReject* options - this.takeScreenshotOnFails = { - testFail: this.screenshotOnReject, - ...this.takeScreenshotOnFails - }; - this.browsers = _.mapValues(this.browsers, (browser, id) => { const browserOptions = _.extend({}, browser, { id: id, - system: this.system, - // TODO: remove this after deleting screenshotOnReject* options - takeScreenshotOnFails: { - testFail: browser.screenshotOnReject, - ...browser.takeScreenshotOnFails - } + system: this.system } ); diff --git a/lib/worker/runner/test-runner/one-time-screenshooter.js b/lib/worker/runner/test-runner/one-time-screenshooter.js index bcb000645..211eff0b3 100644 --- a/lib/worker/runner/test-runner/one-time-screenshooter.js +++ b/lib/worker/runner/test-runner/one-time-screenshooter.js @@ -20,7 +20,7 @@ module.exports = class OneTimeScreenshooter { this._alreadyTryToScreenshot = false; this._screenshooter = new ScreenShooter(browser); - this._screenshotTimeout = this._config.screenshotOnRejectTimeout || this._config.httpTimeout; + this._screenshotTimeout = this._config.takeScreenshotOnFailsTimeout || this._config.httpTimeout; } async extendWithScreenshot(error) { diff --git a/test/lib/browser/utils.js b/test/lib/browser/utils.js index 39053cd32..e00971986 100644 --- a/test/lib/browser/utils.js +++ b/test/lib/browser/utils.js @@ -18,8 +18,6 @@ function createBrowserConfig_(opts = {}) { pageLoadTimeout: null, sessionRequestTimeout: null, sessionQuitTimeout: null, - screenshotOnReject: true, - screenshotOnRejectTimeout: 3000, screenshotDelay: 0, windowSize: null, getScreenshotPath: () => '/some/path', @@ -37,7 +35,7 @@ function createBrowserConfig_(opts = {}) { key: null, region: null, headless: null, - saveHistory: false + saveHistory: true }); return { diff --git a/test/lib/config/browser-options.js b/test/lib/config/browser-options.js index 421728941..c9a4ca405 100644 --- a/test/lib/config/browser-options.js +++ b/test/lib/config/browser-options.js @@ -719,56 +719,10 @@ describe('config browser-options', () => { } [ - 'sessionRequestTimeout', 'sessionQuitTimeout', - 'pageLoadTimeout', 'testTimeout', 'urlHttpTimeout' + 'sessionRequestTimeout', 'sessionQuitTimeout', 'pageLoadTimeout', + 'testTimeout', 'urlHttpTimeout', 'takeScreenshotOnFailsTimeout' ].forEach((option) => describe(option, () => testOptionalNonNegativeIntegerOption(option))); - describe('takeScreenshotOnFailsTimeout', () => { - testOptionalNonNegativeIntegerOption('takeScreenshotOnFailsTimeout'); - - describe('if value is not specified', () => { - it('should get a value from option "screenshotOnRejectTimeout"', () => { - const readConfig = { - browsers: { - b1: mkBrowser_({ - screenshotOnRejectTimeout: 100500 - }) - } - }; - - Config.read.returns(readConfig); - - const config = createConfig(); - - assert.equal(config.browsers.b1.takeScreenshotOnFailsTimeout, 100500); - }); - }); - - describe('if value is specified', () => { - it('should use its own value', () => { - const readConfig = { - browsers: { - b1: mkBrowser_({ - takeScreenshotOnFailsTimeout: 500100, - screenshotOnRejectTimeout: 100500 - }) - } - }; - - Config.read.returns(readConfig); - - const config = createConfig(); - - assert.equal(config.browsers.b1.takeScreenshotOnFailsTimeout, 500100); - }); - }); - }); - - describe('screenshotOnRejectTimeout', () => { - testOptionalNonNegativeIntegerOption('screenshotOnRejectTimeout'); - testDeprecatedOption('screenshotOnRejectTimeout'); - }); - describe('meta', () => { it('should throw error if "meta" is not a object', () => { const readConfig = { @@ -1157,21 +1111,6 @@ describe('config browser-options', () => { 'waitOrientationChange' ].forEach((option) => describe(option, () => testBooleanOption(option))); - function testDeprecatedOption(option) { - it(`should print a warning if option "${option}" is set by user`, () => { - Config.read.returns({[option]: defaults[option]}); - - createConfig(); - - assert.calledOnceWith(console.warn, `Using "${option}" option is deprecated`); - }); - } - - describe('screenshotOnReject', () => { - testBooleanOption('screenshotOnReject'); - testDeprecatedOption('screenshotOnReject'); - }); - describe('takeScreenshotOnFails', () => { it('should throw an error if value is not an object', () => { Config.read.returns({takeScreenshotOnFails: 'foo'}); @@ -1197,15 +1136,8 @@ describe('config browser-options', () => { const config = createConfig(); - assert.deepEqual(config.takeScreenshotOnFails, { - testFail: defaults.screenshotOnReject, - ...defaults.takeScreenshotOnFails - }); - - assert.deepEqual(config.browsers.b1.takeScreenshotOnFails, { - testFail: defaults.screenshotOnReject, - ...defaults.takeScreenshotOnFails - }); + assert.deepEqual(config.takeScreenshotOnFails, defaults.takeScreenshotOnFails); + assert.deepEqual(config.browsers.b1.takeScreenshotOnFails, defaults.takeScreenshotOnFails); }); it('should extend object value with missing fields', () => { @@ -1217,7 +1149,7 @@ describe('config browser-options', () => { assert.deepEqual(config.takeScreenshotOnFails, { testFail: true, - assertViewFail: false + assertViewFail: true }); }); @@ -1229,7 +1161,7 @@ describe('config browser-options', () => { browsers: { b1: mkBrowser_(), b2: mkBrowser_({takeScreenshotOnFails: { - assertViewFail: true + assertViewFail: false }}) } }; @@ -1240,11 +1172,11 @@ describe('config browser-options', () => { assert.deepEqual(config.browsers.b1.takeScreenshotOnFails, { testFail: false, - assertViewFail: false + assertViewFail: true }); assert.deepEqual(config.browsers.b2.takeScreenshotOnFails, { testFail: false, - assertViewFail: true + assertViewFail: false }); }); }); diff --git a/test/lib/config/index.js b/test/lib/config/index.js index 614bb9e7c..ab7643bbe 100644 --- a/test/lib/config/index.js +++ b/test/lib/config/index.js @@ -107,10 +107,7 @@ describe('config', () => { browsers: { bro: {foo: 'bar'} }, - configPath: 'foo/bar/baz', - takeScreenshotOnFails: { - testFail: undefined - } + configPath: 'foo/bar/baz' }); }); }); diff --git a/test/lib/worker/runner/test-runner/one-time-screenshooter.js b/test/lib/worker/runner/test-runner/one-time-screenshooter.js index f34e71fb1..d94bcc031 100644 --- a/test/lib/worker/runner/test-runner/one-time-screenshooter.js +++ b/test/lib/worker/runner/test-runner/one-time-screenshooter.js @@ -31,7 +31,7 @@ describe('worker/runner/test-runner/one-time-screenshooter', () => { testFail: true, assertViewFail: true }, - screenshotOnRejectTimeout: 100500 + takeScreenshotOnFailsTimeout: 100500 }); const browser = opts.browser || mkBrowser_(); @@ -157,7 +157,7 @@ describe('worker/runner/test-runner/one-time-screenshooter', () => { }); it('should set custom http timeout for screenshot', async () => { - const config = {screenshotOnRejectTimeout: 15}; + const config = {takeScreenshotOnFailsTimeout: 15}; const browser = mkBrowser_(); const screenshooter = mkScreenshooter_({config, browser}); @@ -187,7 +187,7 @@ describe('worker/runner/test-runner/one-time-screenshooter', () => { }); it('should fail with timeout error on long execution of "screenshot" command', async () => { - const config = {screenshotOnRejectTimeout: 10}; + const config = {takeScreenshotOnFailsTimeout: 10}; const browser = mkBrowser_(); browser.publicAPI.takeScreenshot.callsFake(() => Promise.delay(20)); diff --git a/typings/index.d.ts b/typings/index.d.ts index bb1a853c6..e7cfa53d7 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -393,9 +393,7 @@ declare namespace Hermione { testFail: boolean; assertViewFail: boolean; }; - screenshotOnReject: boolean; takeScreenshotOnFailsTimeout: number | null; - screenshotOnRejectTimeout: number | null; takeScreenshotOnFailsMode: 'fullpage' | 'viewport'; prepareBrowser(browser: WebdriverIO.Browser): void | null; screenshotPath: string | null; @@ -449,10 +447,10 @@ declare namespace Hermione { * Disables check that element is outside of the viewport left, top, right or bottom bounds. * * @remarks - * By default Hermione throws an error if element is outside the viewport bounds. This option disables this behaviour. - * If option set to `true` then only visible part of the element will be captured. - * But if set browser option {@link https://github.com/gemini-testing/hermione#compositeimage compositeImage} with `true` value, - * then in the resulting screenshot will appear the whole element with not visible parts outside of the viewport bottom bound. + * By default Hermione throws an error if element is outside the viewport bounds. + * This option disables check that element is outside of the viewport left, top, right or bottom bounds. + * And in this case if browser option {@link https://github.com/gemini-testing/hermione#compositeimage compositeImage} set to `false`, then only visible part of the element will be captured. + * But if {@link https://github.com/gemini-testing/hermione#compositeimage compositeImage} set to `true` (default), then in the resulting screenshot will appear the whole element with not visible parts outside of the bottom bounds of viewport. * * @defaultValue `false` */ @@ -479,7 +477,7 @@ declare namespace Hermione { * @remarks * Read more about this option in {@link https://github.com/gemini-testing/looks-same#comparing-images-with-ignoring-antialiasing looks-same} * - * @defaultValue `0` + * @defaultValue `4` */ antialiasingTolerance?: number; /** @@ -489,7 +487,7 @@ declare namespace Hermione { * @remarks * In the resulting screenshot the area which fits the viewport bounds will be joined with the area which is outside of the viewport height. * - * @defaultValue `false` + * @defaultValue `true` */ compositeImage?: boolean; /** @@ -508,7 +506,7 @@ declare namespace Hermione { * @remarks * Useful when you capture the modal (popup). In this case a duplicate of the modal appears on the screenshot. * That happens because we scroll the page using `window` selector, which scroll only the background of the modal, and the modal itself remains in place. - * Default value is `undefined` (it means scroll relative to `window`). Works only when `compositeImage` is `true`. + * Default value is `undefined` (it means scroll relative to `window`). Works only when `compositeImage` is `true` (default). * * @defaultValue `undefined` */