@progress/kendo-e2e 4.2.2 → 4.3.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/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/excel.d.ts +1 -0
- package/dist/utils/excel.js +31 -0
- package/dist/utils/excel.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -27,4 +27,5 @@ __exportStar(require("./selenium"), exports);
|
|
|
27
27
|
__exportStar(require("./settings"), exports);
|
|
28
28
|
__exportStar(require("./snapshot-markup"), exports);
|
|
29
29
|
__exportStar(require("./snapshot-image/snapshot-image"), exports);
|
|
30
|
+
__exportStar(require("./utils"), exports);
|
|
30
31
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAAiE;AAAxD,wGAAA,EAAE,OAAA;AAAE,yGAAA,GAAG,OAAA;AAAE,2GAAA,KAAK,OAAA;AAAE,gHAAA,UAAU,OAAA;AACnC,yCAAuB;AACvB,+CAA6B;AAC7B,8CAA4B;AAC5B,6CAA2B;AAC3B,6CAA2B;AAC3B,oDAAkC;AAClC,kEAAgD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAAiE;AAAxD,wGAAA,EAAE,OAAA;AAAE,yGAAA,GAAG,OAAA;AAAE,2GAAA,KAAK,OAAA;AAAE,gHAAA,UAAU,OAAA;AACnC,yCAAuB;AACvB,+CAA6B;AAC7B,8CAA4B;AAC5B,6CAA2B;AAC3B,6CAA2B;AAC3B,oDAAkC;AAClC,kEAAgD;AAChD,0CAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function matchXLSXFiles(file1: string, file2: string): boolean;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.matchXLSXFiles = void 0;
|
|
7
|
+
const adm_zip_1 = __importDefault(require("adm-zip"));
|
|
8
|
+
function stripMetadataAndReadContent(filePath) {
|
|
9
|
+
const zip = new adm_zip_1.default(filePath);
|
|
10
|
+
const coreXmlPath = "docProps/core.xml";
|
|
11
|
+
// Check if core.xml exists
|
|
12
|
+
const coreXmlEntry = zip.getEntry(coreXmlPath);
|
|
13
|
+
if (coreXmlEntry) {
|
|
14
|
+
let coreXml = coreXmlEntry.getData().toString("utf8");
|
|
15
|
+
// Remove dcterms:created and dcterms:modified
|
|
16
|
+
coreXml = coreXml.replace(/<dcterms:created[^>]*>.*?<\/dcterms:created>/g, "");
|
|
17
|
+
coreXml = coreXml.replace(/<dcterms:modified[^>]*>.*?<\/dcterms:modified>/g, "");
|
|
18
|
+
// Update the core.xml in the ZIP archive
|
|
19
|
+
zip.updateFile(coreXmlPath, Buffer.from(coreXml, "utf8"));
|
|
20
|
+
}
|
|
21
|
+
// Generate a buffer of the modified XLSX
|
|
22
|
+
const modifiedBuffer = zip.toBuffer();
|
|
23
|
+
return modifiedBuffer;
|
|
24
|
+
}
|
|
25
|
+
function matchXLSXFiles(file1, file2) {
|
|
26
|
+
const buffer1 = stripMetadataAndReadContent(file1);
|
|
27
|
+
const buffer2 = stripMetadataAndReadContent(file2);
|
|
28
|
+
return buffer1.equals(buffer2);
|
|
29
|
+
}
|
|
30
|
+
exports.matchXLSXFiles = matchXLSXFiles;
|
|
31
|
+
//# sourceMappingURL=excel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel.js","sourceRoot":"","sources":["../../src/utils/excel.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA6B;AAE7B,SAAS,2BAA2B,CAAC,QAAgB;IACjD,MAAM,GAAG,GAAG,IAAI,iBAAM,CAAC,QAAQ,CAAC,CAAC;IACjC,MAAM,WAAW,GAAG,mBAAmB,CAAC;IAExC,2BAA2B;IAC3B,MAAM,YAAY,GAAG,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAC/C,IAAI,YAAY,EAAE;QACd,IAAI,OAAO,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAEtD,8CAA8C;QAC9C,OAAO,GAAG,OAAO,CAAC,OAAO,CACrB,+CAA+C,EAC/C,EAAE,CACL,CAAC;QACF,OAAO,GAAG,OAAO,CAAC,OAAO,CACrB,iDAAiD,EACjD,EAAE,CACL,CAAC;QAEF,yCAAyC;QACzC,GAAG,CAAC,UAAU,CAAC,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;KAC7D;IAED,yCAAyC;IACzC,MAAM,cAAc,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC;IACtC,OAAO,cAAc,CAAC;AAC1B,CAAC;AAED,SAAgB,cAAc,CAAC,KAAa,EAAE,KAAa;IACvD,MAAM,OAAO,GAAG,2BAA2B,CAAC,KAAK,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,2BAA2B,CAAC,KAAK,CAAC,CAAC;IACnD,OAAO,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC;AAJD,wCAIC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { matchXLSXFiles } from './excel';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.matchXLSXFiles = void 0;
|
|
4
|
+
var excel_1 = require("./excel");
|
|
5
|
+
Object.defineProperty(exports, "matchXLSXFiles", { enumerable: true, get: function () { return excel_1.matchXLSXFiles; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA,iCAAyC;AAAhC,uGAAA,cAAc,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-e2e",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "Kendo UI end-to-end test utilities.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@axe-core/webdriverjs": "4.10.1",
|
|
60
60
|
"@types/selenium-webdriver": "4.1.27",
|
|
61
|
+
"adm-zip": "^0.5.16",
|
|
61
62
|
"commander": "^2.13.0",
|
|
62
63
|
"glob": "^7.1.6",
|
|
63
64
|
"http-server": "^14.1.1",
|