@progress/kendo-e2e 1.4.3 → 1.4.5

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.
@@ -1,8 +1,8 @@
1
- type CompereOptions = {
1
+ export type CompereOptions = {
2
2
  allowMissing?: string[];
3
3
  allowExtra?: string[];
4
4
  };
5
- type Result = {
5
+ export type Result = {
6
6
  passed: string[];
7
7
  missing: string[];
8
8
  extra: string[];
@@ -19,4 +19,13 @@ type Result = {
19
19
  * @param expectedHtml An html object.
20
20
  */
21
21
  export declare function compareHtml(actualHtml: string, expectedHtml: string, options?: CompereOptions): Result;
22
- export {};
22
+ /**
23
+ * Get partial html of bigger html block.
24
+ *
25
+ * @example
26
+ * await getPartialHtml("<div><ul class="k-list"><ul></div>", ".k-list");
27
+ *
28
+ * @param originalHtml An html object.
29
+ * @param selector Css selector.
30
+ */
31
+ export declare function getPartialHtml(originalHtml: string, selector: string): string;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.compareHtml = void 0;
6
+ exports.getPartialHtml = exports.compareHtml = void 0;
7
7
  /* eslint-disable prefer-const */
8
8
  const sanitize_html_1 = __importDefault(require("sanitize-html"));
9
9
  const jsdom_1 = __importDefault(require("jsdom"));
@@ -34,62 +34,102 @@ function compareHtml(actualHtml, expectedHtml, options) {
34
34
  parseDom(actualDom, actualSelectors, parent);
35
35
  parent = "";
36
36
  parseDom(expectedDom, expectedSelectors);
37
- let actualWithoutExtra = [];
38
- if ((options === null || options === void 0 ? void 0 : options.allowExtra) !== undefined) {
39
- for (const selector of actualSelectors) {
40
- let replacedSelector = selector;
41
- for (const extraItem of options === null || options === void 0 ? void 0 : options.allowExtra) {
42
- replacedSelector = replacedSelector.replace(new RegExp(extraItem, 'g'), '').replace(new RegExp(' ', 'g'), ' ').trim();
43
- }
44
- actualWithoutExtra.push(replacedSelector);
45
- }
46
- actualWithoutExtra = [...new Set(actualWithoutExtra)];
47
- }
48
- else {
49
- actualWithoutExtra = actualSelectors;
50
- }
37
+ result.actualSelectors = actualSelectors;
38
+ result.expectedSelectors = expectedSelectors;
39
+ // Delete all allowed missing from expected selectors
51
40
  let expectedSelectorsWithoutMissing = [];
52
41
  if ((options === null || options === void 0 ? void 0 : options.allowMissing) !== undefined) {
53
42
  for (const selector of expectedSelectors) {
54
43
  let replacedSelector = selector;
55
44
  for (const missingItem of options === null || options === void 0 ? void 0 : options.allowMissing) {
56
- replacedSelector = replacedSelector.replace(new RegExp(missingItem, 'g'), '').replace(new RegExp(' ', 'g'), ' ').trim();
45
+ replacedSelector = removeDuplicatedSpaces(replacedSelector.replace(new RegExp(missingItem, 'g'), ''));
46
+ }
47
+ if (replacedSelector !== '') {
48
+ expectedSelectorsWithoutMissing.push(replacedSelector);
57
49
  }
58
- expectedSelectorsWithoutMissing.push(replacedSelector);
59
50
  }
60
51
  expectedSelectorsWithoutMissing = [...new Set(expectedSelectorsWithoutMissing)];
61
52
  }
62
53
  else {
63
54
  expectedSelectorsWithoutMissing = expectedSelectors;
64
55
  }
65
- result.passed = actualWithoutExtra.filter((element) => expectedSelectors.includes(element));
66
- result.extra = actualSelectors.filter((element) => !expectedSelectorsWithoutMissing.includes(element));
67
- result.missing = expectedSelectors.filter((element) => !actualWithoutExtra.includes(element));
68
- result.actualSelectors = actualSelectors;
69
- result.expectedSelectors = expectedSelectors;
70
- if ((options === null || options === void 0 ? void 0 : options.allowMissing) !== undefined) {
71
- for (const missingItem of options === null || options === void 0 ? void 0 : options.allowMissing) {
72
- result.missing = result.missing.filter((item) => !item.includes(missingItem));
56
+ // Delete all allowed extra from actual selectors
57
+ let actualWithoutExtra = [];
58
+ if ((options === null || options === void 0 ? void 0 : options.allowExtra) !== undefined) {
59
+ for (const selector of actualSelectors) {
60
+ let replacedSelector = selector;
61
+ for (const extraItem of options === null || options === void 0 ? void 0 : options.allowExtra) {
62
+ replacedSelector = removeDuplicatedSpaces(replacedSelector.replace(new RegExp(extraItem, 'g'), ''));
63
+ }
64
+ if (replacedSelector !== '') {
65
+ actualWithoutExtra.push(replacedSelector);
66
+ }
73
67
  }
68
+ actualWithoutExtra = [...new Set(actualWithoutExtra)];
74
69
  }
75
- if ((options === null || options === void 0 ? void 0 : options.allowExtra) !== undefined) {
76
- for (const extraItem of options === null || options === void 0 ? void 0 : options.allowExtra) {
77
- result.extra = result.extra.filter((item) => !item.includes(extraItem));
70
+ else {
71
+ actualWithoutExtra = actualSelectors;
72
+ }
73
+ result.missing = expectedSelectorsWithoutMissing.filter((element) => !actualWithoutExtra.includes(element));
74
+ // Detect extra elements
75
+ result.extra = [];
76
+ result.passed = [];
77
+ if (actualWithoutExtra.length > 0) {
78
+ for (const selector of actualWithoutExtra) {
79
+ const dom = new jsdom_1.default.JSDOM((0, sanitize_html_1.default)(expectedHtml, config));
80
+ const element = dom.window.document.querySelector(selector);
81
+ if (element === null) {
82
+ result.extra.push(selector);
83
+ }
84
+ else {
85
+ result.passed.push(selector);
86
+ }
78
87
  }
88
+ result.extra = [...new Set(result.extra)];
89
+ result.passed = [...new Set(result.passed)];
79
90
  }
80
91
  return result;
81
92
  }
82
93
  exports.compareHtml = compareHtml;
94
+ /**
95
+ * Get partial html of bigger html block.
96
+ *
97
+ * @example
98
+ * await getPartialHtml("<div><ul class="k-list"><ul></div>", ".k-list");
99
+ *
100
+ * @param originalHtml An html object.
101
+ * @param selector Css selector.
102
+ */
103
+ function getPartialHtml(originalHtml, selector) {
104
+ const config = {
105
+ allowedTags: false,
106
+ allowVulnerableTags: true,
107
+ allowedAttributes: { "*": ["class"] },
108
+ };
109
+ const dom = new jsdom_1.default.JSDOM((0, sanitize_html_1.default)(originalHtml, config));
110
+ const element = dom.window.document.querySelector(selector);
111
+ if (element !== null) {
112
+ return element.outerHTML;
113
+ }
114
+ else {
115
+ return '';
116
+ }
117
+ }
118
+ exports.getPartialHtml = getPartialHtml;
83
119
  function parseDom(node, attributes, parent = "") {
84
120
  if (node === null) {
85
121
  return;
86
122
  }
87
123
  let newParent = parent;
88
124
  if (node.attributes[0] !== undefined) {
89
- attributes.push(`${parent}.${node.attributes[0].value.split(" ").sort().join(".")}`);
90
- newParent = `${parent}.${node.attributes[0].value.split(" ").sort().join(".")} `;
125
+ const value = removeDuplicatedSpaces(node.attributes[0].value);
126
+ attributes.push(`${parent}.${value.split(" ").sort().join(".")}`);
127
+ newParent = `${parent}.${value.split(" ").sort().join(".")} `;
91
128
  }
92
129
  parseDom(node.firstElementChild, attributes, newParent);
93
130
  parseDom(node.nextElementSibling, attributes, parent);
94
131
  }
132
+ function removeDuplicatedSpaces(text) {
133
+ return text.replace(new RegExp(/ +/g, 'g'), ' ').trim();
134
+ }
95
135
  //# sourceMappingURL=html-comparer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"html-comparer.js","sourceRoot":"","sources":["../../src/rendering/html-comparer.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAiC;AACjC,kEAAyC;AACzC,kDAA0B;AAe1B;;;;;;;;GAQG;AACH,SAAgB,WAAW,CAAC,UAAkB,EAAE,YAAoB,EAAE,OAAwB;IAC1F,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,eAAe,GAAa,EAAE,CAAC;IACnC,IAAI,iBAAiB,GAAa,EAAE,CAAC;IACrC,MAAM,MAAM,GAAW,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,CAAC;IAEtF,MAAM,MAAM,GAAG;QACX,WAAW,EAAE,KAAK;QAClB,mBAAmB,EAAE,IAAI;QACzB,iBAAiB,EAAE,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE;KACxC,CAAC;IAEF,MAAM,SAAS,GAAG,IAAI,eAAK,CAAC,KAA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AS,sBAAsB,CAAC,IAAY;IACxC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAC7D,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const specToHtml: (specFile: any, options?: {}) => any;
2
- export { compareHtml } from "./html-comparer";
1
+ export declare const specToHtml: (specFile: any, options?: {}) => string;
2
+ export { CompereOptions, Result, compareHtml, getPartialHtml } from "./html-comparer";
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.compareHtml = exports.specToHtml = void 0;
6
+ exports.getPartialHtml = exports.compareHtml = exports.specToHtml = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const server_1 = __importDefault(require("react-dom/server"));
9
9
  const specToHtml = (specFile, options = {}) => {
@@ -12,4 +12,5 @@ const specToHtml = (specFile, options = {}) => {
12
12
  exports.specToHtml = specToHtml;
13
13
  var html_comparer_1 = require("./html-comparer");
14
14
  Object.defineProperty(exports, "compareHtml", { enumerable: true, get: function () { return html_comparer_1.compareHtml; } });
15
+ Object.defineProperty(exports, "getPartialHtml", { enumerable: true, get: function () { return html_comparer_1.getPartialHtml; } });
15
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rendering/index.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8DAAwC;AAEjC,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE;IACjD,OAAO,gBAAQ,CAAC,oBAAoB,CAChC,eAAK,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CACzC,CAAC;AACN,CAAC,CAAC;AAJW,QAAA,UAAU,cAIrB;AAEF,iDAA8C;AAArC,4GAAA,WAAW,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rendering/index.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8DAAwC;AAEjC,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,OAAO,GAAG,EAAE,EAAU,EAAE;IACzD,OAAO,gBAAQ,CAAC,oBAAoB,CAChC,eAAK,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CACzC,CAAC;AACN,CAAC,CAAC;AAJW,QAAA,UAAU,cAIrB;AAEF,iDAAsF;AAArD,4GAAA,WAAW,OAAA;AAAE,+GAAA,cAAc,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-e2e",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "description": "Kendo UI end-to-end test utilities.",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",