@penskemediacorp/backstopjs-config 1.66.4 → 1.69.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/index.js +4 -0
- package/lib/getConfig.js +1 -0
- package/lib/getScenarios.js +1 -0
- package/lib/utils.js +4 -3
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -31,6 +31,7 @@ const paths = backstopUtils.prepareTestPaths(
|
|
|
31
31
|
|
|
32
32
|
// Exit if no paths in config.
|
|
33
33
|
if ( 0 === paths.length ) {
|
|
34
|
+
// eslint-disable-next-line no-console
|
|
34
35
|
console.error(
|
|
35
36
|
chalk.red.bold(
|
|
36
37
|
'\nPlease specify paths to test in larva.config.js in the structure `backstop.testPaths`, or add modules in `backstop.larvaModules`\n'
|
|
@@ -40,7 +41,9 @@ if ( 0 === paths.length ) {
|
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
// Exit if no URL from config or CLI.
|
|
44
|
+
// eslint-disable-next-line no-undef
|
|
43
45
|
if ( undefined === appConfiguration.testBaseUrl && false === urlFromCli ) {
|
|
46
|
+
// eslint-disable-next-line no-console
|
|
44
47
|
console.error(
|
|
45
48
|
chalk.red.bold(
|
|
46
49
|
'\nPlease specify a QA URL in pmc.config.js in `backstop.testBaseUrl`, or pass in a full URL with the comman e.g. `npm run backstop -- test --url=https://example.com`\n'
|
|
@@ -56,6 +59,7 @@ const scenarios = getScenarios(
|
|
|
56
59
|
appConfiguration.testScenario
|
|
57
60
|
);
|
|
58
61
|
|
|
62
|
+
// eslint-disable-next-line no-console
|
|
59
63
|
console.log( chalk.blue( 'Testing paths: \n' + paths ) );
|
|
60
64
|
|
|
61
65
|
module.exports = merge(
|
package/lib/getConfig.js
CHANGED
package/lib/getScenarios.js
CHANGED
package/lib/utils.js
CHANGED
|
@@ -10,8 +10,8 @@ module.exports = {
|
|
|
10
10
|
/**
|
|
11
11
|
* Prepare Test Paths
|
|
12
12
|
*
|
|
13
|
-
* @param modules
|
|
14
|
-
* @param pmcPaths array of test paths e.g. [ '/', '/blog ]
|
|
13
|
+
* @param {Array} modules array of module names e.g. [ 'footer', 'header', 'author' ]
|
|
14
|
+
* @param {Array} pmcPaths array of test paths e.g. [ '/', '/blog ]
|
|
15
15
|
*/
|
|
16
16
|
prepareTestPaths: ( modules, pmcPaths ) => {
|
|
17
17
|
if ( modules && modules.length > 0 ) {
|
|
@@ -25,6 +25,7 @@ module.exports = {
|
|
|
25
25
|
// We are not testing patterns. Return array of paths from config.
|
|
26
26
|
|
|
27
27
|
throw new Error(
|
|
28
|
+
// eslint-disable-next-line no-undef
|
|
28
29
|
chalk.red.bold(
|
|
29
30
|
"Couldn't find configuration for larvaModukes or testPaths. Make sure those entries exist in the `backstop` object in larva.config.js"
|
|
30
31
|
)
|
|
@@ -36,7 +37,7 @@ module.exports = {
|
|
|
36
37
|
*
|
|
37
38
|
* Make a class selector out of each module from CLI, or return document.
|
|
38
39
|
*
|
|
39
|
-
* @param array of modules
|
|
40
|
+
* @param {Array} array of modules
|
|
40
41
|
*/
|
|
41
42
|
prepareTestSelectors: ( array ) => {
|
|
42
43
|
// Test the whole document if there are no modules in the CLI
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@penskemediacorp/backstopjs-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.69.0",
|
|
4
4
|
"description": "Visual regression testing with Backstop JS.",
|
|
5
5
|
"author": "laras126 <laras126@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/penske-media-corp/pmc-larva#readme",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"chalk": "^4",
|
|
28
28
|
"webpack-merge": "^5"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "9655cabc42a4d705c189ea9b65e6d34788a809e9"
|
|
31
31
|
}
|