@wdio/visual-service 6.3.1 → 6.3.2
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
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @wdio/visual-service
|
|
2
2
|
|
|
3
|
+
## 6.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 09dbc2d: update deps
|
|
8
|
+
- 09dbc2d: don't check for runner
|
|
9
|
+
- Updated dependencies [09dbc2d]
|
|
10
|
+
- webdriver-image-comparison@7.3.2
|
|
11
|
+
|
|
12
|
+
### Committers: 2
|
|
13
|
+
|
|
14
|
+
- Christian Bromann ([@christian-bromann](https://github.com/christian-bromann))
|
|
15
|
+
- Wim Selles ([@wswebcreation](https://github.com/wswebcreation))
|
|
3
16
|
## 6.3.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../../src/storybook/launcher.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../../src/storybook/launcher.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAetD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAAS;;gBAGrC,OAAO,EAAE,YAAY;IAK3B,SAAS,CAAE,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,EAAE,YAAY,CAAC,sBAAsB;IAuExF,UAAU;CAuBnB"}
|
|
@@ -2,7 +2,7 @@ import { rmdirSync } from 'node:fs';
|
|
|
2
2
|
import logger from '@wdio/logger';
|
|
3
3
|
import { SevereServiceError } from 'webdriverio';
|
|
4
4
|
import { BaseClass } from 'webdriver-image-comparison';
|
|
5
|
-
import { createStorybookCapabilities, createTestFiles, getArgvValue, isCucumberFramework,
|
|
5
|
+
import { createStorybookCapabilities, createTestFiles, getArgvValue, isCucumberFramework, isStorybookMode, parseSkipStories, scanStorybook, } from './utils.js';
|
|
6
6
|
import { CLIP_SELECTOR, NUM_SHARDS, V6_CLIP_SELECTOR } from '../constants.js';
|
|
7
7
|
import generateVisualReport from '../reporter.js';
|
|
8
8
|
const log = logger('@wdio/visual-service');
|
|
@@ -15,13 +15,8 @@ export default class VisualLauncher extends BaseClass {
|
|
|
15
15
|
async onPrepare(config, capabilities) {
|
|
16
16
|
const isStorybook = isStorybookMode();
|
|
17
17
|
const framework = config.framework;
|
|
18
|
-
const runner = config.runner;
|
|
19
18
|
const isCucumber = isCucumberFramework(framework);
|
|
20
|
-
|
|
21
|
-
if (!isLocal) {
|
|
22
|
-
throw new SevereServiceError('\n\nRunning `@wdio/visual-service` is only supported in `local` mode.\n\n');
|
|
23
|
-
}
|
|
24
|
-
else if (isCucumber && isStorybook) {
|
|
19
|
+
if (isCucumber && isStorybook) {
|
|
25
20
|
throw new SevereServiceError('\n\nRunning Storybook in combination with the cucumber framework adapter is not supported.\nOnly Jasmine and Mocha are supported.\n\n');
|
|
26
21
|
}
|
|
27
22
|
else if (isStorybook) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Options } from '@wdio/types';
|
|
1
2
|
import type { ClassOptions } from 'webdriver-image-comparison';
|
|
2
3
|
import type { CategoryComponent, CreateItContent, CreateTestContent, CreateTestFileOptions, ScanStorybookReturnData, Stories, EmulatedDeviceType, CapabilityMap, WaitForStorybookComponentToBeLoaded } from './Types.js';
|
|
3
4
|
/**
|
|
@@ -7,19 +8,15 @@ export declare function isStorybookMode(): boolean;
|
|
|
7
8
|
/**
|
|
8
9
|
* Check if the framework is cucumber
|
|
9
10
|
*/
|
|
10
|
-
export declare function isCucumberFramework(framework:
|
|
11
|
+
export declare function isCucumberFramework(framework: Required<Options.Testrunner>['framework']): boolean;
|
|
11
12
|
/**
|
|
12
13
|
* Check if the framework is Jasmine
|
|
13
14
|
*/
|
|
14
|
-
export declare function isJasmineFramework(framework:
|
|
15
|
+
export declare function isJasmineFramework(framework: Required<Options.Testrunner>['framework']): boolean;
|
|
15
16
|
/**
|
|
16
17
|
* Check if the framework is Mocha
|
|
17
18
|
*/
|
|
18
|
-
export declare function isMochaFramework(framework:
|
|
19
|
-
/**
|
|
20
|
-
* Check if the framework is Mocha
|
|
21
|
-
*/
|
|
22
|
-
export declare function isLocalRunner(runner: string): boolean;
|
|
19
|
+
export declare function isMochaFramework(framework: Required<Options.Testrunner>['framework']): boolean;
|
|
23
20
|
/**
|
|
24
21
|
* Check if there is an instance of Storybook running
|
|
25
22
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/storybook/utils.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/storybook/utils.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAE9D,OAAO,KAAK,EACR,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EAErB,uBAAuB,EACvB,OAAO,EAGP,kBAAkB,EAClB,aAAa,EACb,mCAAmC,EACtC,MAAM,YAAY,CAAA;AAKnB;;GAEG;AACH,wBAAgB,eAAe,IAAI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BlC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,EAAE,CAmBlF"}
|
package/dist/storybook/utils.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { $, browser } from '@wdio/globals';
|
|
2
|
-
import logger from '@wdio/logger';
|
|
3
|
-
import fetch from 'node-fetch';
|
|
4
1
|
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
5
2
|
import { tmpdir } from 'node:os';
|
|
6
3
|
import { join, resolve } from 'node:path';
|
|
4
|
+
import { $, browser } from '@wdio/globals';
|
|
5
|
+
import logger from '@wdio/logger';
|
|
7
6
|
import { deviceDescriptors } from './deviceDescriptors.js';
|
|
8
7
|
const log = logger('@wdio/visual-service:storybook-utils');
|
|
9
8
|
/**
|
|
@@ -30,12 +29,6 @@ export function isJasmineFramework(framework) {
|
|
|
30
29
|
export function isMochaFramework(framework) {
|
|
31
30
|
return framework.toLowerCase() === 'mocha';
|
|
32
31
|
}
|
|
33
|
-
/**
|
|
34
|
-
* Check if the framework is Mocha
|
|
35
|
-
*/
|
|
36
|
-
export function isLocalRunner(runner) {
|
|
37
|
-
return runner.toLowerCase() === 'local';
|
|
38
|
-
}
|
|
39
32
|
/**
|
|
40
33
|
* Check if there is an instance of Storybook running
|
|
41
34
|
*/
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@wdio/visual-service",
|
|
3
3
|
"author": "Wim Selles - wswebcreation",
|
|
4
4
|
"description": "Image comparison / visual regression testing for WebdriverIO",
|
|
5
|
-
"version": "6.3.
|
|
5
|
+
"version": "6.3.2",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://webdriver.io/docs/visual-testing",
|
|
8
8
|
"repository": {
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"type": "module",
|
|
21
21
|
"types": "./dist/index.d.ts",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@wdio/globals": "^9.
|
|
23
|
+
"@wdio/globals": "^9.9.1",
|
|
24
24
|
"@wdio/logger": "^9.4.4",
|
|
25
|
-
"@wdio/types": "^9.
|
|
25
|
+
"@wdio/types": "^9.9.0",
|
|
26
26
|
"node-fetch": "^3.3.2",
|
|
27
|
-
"webdriver-image-comparison": "^7.3.
|
|
27
|
+
"webdriver-image-comparison": "^7.3.2"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {},
|
|
30
30
|
"scripts": {
|