pagean 8.0.3 → 8.0.4
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/lib/link-utils.js +6 -1
- package/package.json +13 -12
package/lib/link-utils.js
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
const https = require('https');
|
|
10
10
|
const axios = require('axios');
|
|
11
11
|
const normalizeUrl = require('normalize-url');
|
|
12
|
+
const cssesc = require('cssesc');
|
|
12
13
|
|
|
13
14
|
const msPerSec = 1000;
|
|
14
15
|
const timeoutSeconds = 120;
|
|
@@ -94,7 +95,11 @@ const checkSamePageLink = async (page, link) => {
|
|
|
94
95
|
return httpResponse.ok;
|
|
95
96
|
}
|
|
96
97
|
|
|
97
|
-
const
|
|
98
|
+
const escapedSelector = `#${cssesc(selector.slice(1), {
|
|
99
|
+
isIdentifier: true
|
|
100
|
+
})}`;
|
|
101
|
+
const element = await page.$(escapedSelector);
|
|
102
|
+
// const element = await page.$(selector);
|
|
98
103
|
return element ? httpResponse.ok : `${selector} Not Found`;
|
|
99
104
|
};
|
|
100
105
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pagean",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.4",
|
|
4
4
|
"description": "Pagean is a web page analysis tool designed to automate tests requiring web pages to be loaded in a browser window (e.g. horizontal scrollbar, console errors)",
|
|
5
5
|
"bin": {
|
|
6
6
|
"pagean": "./bin/pagean.js",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"prettier-fix": "prettier --write .",
|
|
19
19
|
"start": "node ./bin/pagean.js",
|
|
20
20
|
"start-lint": "node ./bin/pageanrc-lint.js",
|
|
21
|
-
"start-lint-all": "npm run start-lint && npm run start-lint
|
|
21
|
+
"start-lint-all": "npm run start-lint && npm run start-lint static-server.pageanrc.json && npm run start-lint ./lib/default-config.json",
|
|
22
22
|
"test": "jest --ci --config jest.config.json"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
26
|
-
"url": "
|
|
26
|
+
"url": "https://gitlab.com/gitlab-ci-utils/pagean.git"
|
|
27
27
|
},
|
|
28
28
|
"keywords": [
|
|
29
29
|
"analysis",
|
|
@@ -52,27 +52,28 @@
|
|
|
52
52
|
"homepage": "https://gitlab.com/gitlab-ci-utils/pagean",
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@aarongoldenthal/eslint-config-standard": "^20.0.0",
|
|
55
|
-
"@aarongoldenthal/stylelint-config-standard": "^
|
|
56
|
-
"bin-tester": "^3.0.
|
|
57
|
-
"eslint": "^8.
|
|
58
|
-
"jest": "^29.4.
|
|
55
|
+
"@aarongoldenthal/stylelint-config-standard": "^13.0.1",
|
|
56
|
+
"bin-tester": "^3.0.1",
|
|
57
|
+
"eslint": "^8.34.0",
|
|
58
|
+
"jest": "^29.4.3",
|
|
59
59
|
"jest-junit": "^15.0.0",
|
|
60
60
|
"markdownlint-cli": "^0.33.0",
|
|
61
|
-
"prettier": "^2.8.
|
|
61
|
+
"prettier": "^2.8.4",
|
|
62
62
|
"strip-ansi": "^6.0.1",
|
|
63
|
-
"stylelint": "^
|
|
63
|
+
"stylelint": "^15.2.0"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"ajv": "^8.12.0",
|
|
67
67
|
"ajv-errors": "^3.0.0",
|
|
68
|
-
"axios": "^1.3.
|
|
69
|
-
"ci-logger": "^5.1.
|
|
68
|
+
"axios": "^1.3.3",
|
|
69
|
+
"ci-logger": "^5.1.1",
|
|
70
70
|
"commander": "^10.0.0",
|
|
71
|
+
"cssesc": "^3.0.0",
|
|
71
72
|
"handlebars": "^4.7.7",
|
|
72
73
|
"htmlhint": "^1.1.4",
|
|
73
74
|
"kleur": "^4.1.5",
|
|
74
75
|
"normalize-url": "^6.1.0",
|
|
75
76
|
"protocolify": "^3.0.0",
|
|
76
|
-
"puppeteer": "^19.
|
|
77
|
+
"puppeteer": "^19.7.1"
|
|
77
78
|
}
|
|
78
79
|
}
|