@testivai/witness 1.0.1 → 1.0.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/README.md +44 -13
- package/dist/baselines/index.d.ts +6 -0
- package/dist/baselines/index.d.ts.map +1 -0
- package/dist/baselines/index.js +9 -0
- package/dist/baselines/index.js.map +1 -0
- package/dist/baselines/store.d.ts +79 -0
- package/dist/baselines/store.d.ts.map +1 -0
- package/dist/baselines/store.js +234 -0
- package/dist/baselines/store.js.map +1 -0
- package/dist/bin/testivai.js +2 -0
- package/dist/bin/testivai.js.map +1 -1
- package/dist/browser/binding.d.ts.map +1 -1
- package/dist/browser/binding.js +173 -42
- package/dist/browser/binding.js.map +1 -1
- package/dist/browser/capture.d.ts.map +1 -1
- package/dist/browser/capture.js +7 -4
- package/dist/browser/capture.js.map +1 -1
- package/dist/commands/approve.d.ts +3 -0
- package/dist/commands/approve.d.ts.map +1 -0
- package/dist/commands/approve.js +94 -0
- package/dist/commands/approve.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +53 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +98 -0
- package/dist/commands/run.js.map +1 -1
- package/dist/config/index.d.ts +6 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +14 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/local-config.d.ts +54 -0
- package/dist/config/local-config.d.ts.map +1 -0
- package/dist/config/local-config.js +130 -0
- package/dist/config/local-config.js.map +1 -0
- package/dist/diff/diff.d.ts +27 -0
- package/dist/diff/diff.d.ts.map +1 -0
- package/dist/diff/diff.js +216 -0
- package/dist/diff/diff.js.map +1 -0
- package/dist/diff/ignore.d.ts +22 -0
- package/dist/diff/ignore.d.ts.map +1 -0
- package/dist/diff/ignore.js +43 -0
- package/dist/diff/ignore.js.map +1 -0
- package/dist/diff/index.d.ts +16 -0
- package/dist/diff/index.d.ts.map +1 -0
- package/dist/diff/index.js +23 -0
- package/dist/diff/index.js.map +1 -0
- package/dist/diff/minimap.d.ts +23 -0
- package/dist/diff/minimap.d.ts.map +1 -0
- package/dist/diff/minimap.js +43 -0
- package/dist/diff/minimap.js.map +1 -0
- package/dist/diff/regions.d.ts +23 -0
- package/dist/diff/regions.d.ts.map +1 -0
- package/dist/diff/regions.js +129 -0
- package/dist/diff/regions.js.map +1 -0
- package/dist/diff/resize.d.ts +27 -0
- package/dist/diff/resize.d.ts.map +1 -0
- package/dist/diff/resize.js +82 -0
- package/dist/diff/resize.js.map +1 -0
- package/dist/diff/types.d.ts +79 -0
- package/dist/diff/types.d.ts.map +1 -0
- package/dist/diff/types.js +10 -0
- package/dist/diff/types.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -2
- package/dist/index.js.map +1 -1
- package/dist/report/compare.d.ts +18 -0
- package/dist/report/compare.d.ts.map +1 -0
- package/dist/report/compare.js +163 -0
- package/dist/report/compare.js.map +1 -0
- package/dist/report/generator.d.ts +31 -0
- package/dist/report/generator.d.ts.map +1 -0
- package/dist/report/generator.js +123 -0
- package/dist/report/generator.js.map +1 -0
- package/dist/report/index.d.ts +10 -0
- package/dist/report/index.d.ts.map +1 -0
- package/dist/report/index.js +13 -0
- package/dist/report/index.js.map +1 -0
- package/dist/report/results.d.ts +35 -0
- package/dist/report/results.d.ts.map +1 -0
- package/dist/report/results.js +8 -0
- package/dist/report/results.js.map +1 -0
- package/dist/report/template.d.ts +14 -0
- package/dist/report/template.d.ts.map +1 -0
- package/dist/report/template.js +229 -0
- package/dist/report/template.js.map +1 -0
- package/package.json +58 -15
package/README.md
CHANGED
|
@@ -9,36 +9,54 @@ The TestivAI Witness SDK allows you to integrate visual regression testing into
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npm install -
|
|
12
|
+
npm install -D @testivai/witness
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
## Quick Start
|
|
15
|
+
## Quick Start (Local Mode — Free)
|
|
16
|
+
|
|
17
|
+
TestivAI works in **local mode** without any API key or cloud account:
|
|
16
18
|
|
|
17
19
|
1. **Initialize your project**
|
|
18
20
|
```bash
|
|
19
21
|
npx testivai init
|
|
22
|
+
# Select "Local Mode" when prompted
|
|
20
23
|
```
|
|
21
24
|
|
|
22
|
-
2. **
|
|
23
|
-
```bash
|
|
24
|
-
npx testivai auth <your-api-key>
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
3. **Add visual captures to your tests**
|
|
25
|
+
2. **Add visual captures to your tests**
|
|
28
26
|
```javascript
|
|
29
27
|
// In your test code
|
|
30
28
|
await window.testivaiWitness('my-snapshot');
|
|
31
29
|
```
|
|
32
30
|
|
|
33
|
-
|
|
31
|
+
3. **Run your tests**
|
|
34
32
|
```bash
|
|
35
33
|
# Make sure Chrome is running with remote debugging
|
|
36
34
|
chrome --remote-debugging-port=9222
|
|
37
35
|
|
|
38
36
|
# Run your tests with TestivAI
|
|
39
|
-
testivai run "npm test"
|
|
37
|
+
npx testivai run "npm test"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
4. **View the report**
|
|
41
|
+
Open `visual-report/index.html` in your browser to see results.
|
|
42
|
+
|
|
43
|
+
5. **Approve changes**
|
|
44
|
+
```bash
|
|
45
|
+
npx testivai approve --all
|
|
40
46
|
```
|
|
41
47
|
|
|
48
|
+
## Quick Start (Cloud Mode)
|
|
49
|
+
|
|
50
|
+
For team collaboration and hosted dashboards:
|
|
51
|
+
|
|
52
|
+
1. **Get an API key** at [testiv.ai](https://testiv.ai)
|
|
53
|
+
2. **Set your API key**
|
|
54
|
+
```bash
|
|
55
|
+
export TESTIVAI_API_KEY=your-api-key
|
|
56
|
+
```
|
|
57
|
+
3. Follow steps 1–3 from local mode above
|
|
58
|
+
4. Results will upload to the cloud dashboard automatically
|
|
59
|
+
|
|
42
60
|
## Framework Integration
|
|
43
61
|
|
|
44
62
|
### Cypress
|
|
@@ -214,6 +232,19 @@ Options:
|
|
|
214
232
|
- `-o, --output <path>` - Output directory (default: .testivai/captures)
|
|
215
233
|
- `-f, --format <format>` - Output format: json|png (default: json)
|
|
216
234
|
|
|
235
|
+
### `npx testivai approve [name]`
|
|
236
|
+
Approve snapshots in local mode. Use after reviewing visual changes.
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
npx testivai approve "my-snapshot" # Approve specific snapshot
|
|
240
|
+
npx testivai approve --all # Approve all changed snapshots
|
|
241
|
+
npx testivai approve --undo "name" # Undo an approval
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Options:
|
|
245
|
+
- `--all` - Approve all changed snapshots
|
|
246
|
+
- `--undo` - Undo approval for the specified snapshot
|
|
247
|
+
|
|
217
248
|
## Chrome Setup
|
|
218
249
|
|
|
219
250
|
### Manual Launch
|
|
@@ -400,6 +431,6 @@ MIT
|
|
|
400
431
|
|
|
401
432
|
## Support
|
|
402
433
|
|
|
403
|
-
- Documentation: https://
|
|
404
|
-
- Issues: https://github.com/
|
|
405
|
-
-
|
|
434
|
+
- Documentation: https://github.com/mcbuddy/testivai-oss/tree/main/packages/witness
|
|
435
|
+
- Issues: https://github.com/mcbuddy/testivai-oss/issues
|
|
436
|
+
- Website: https://testiv.ai
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/baselines/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* TestivAI Local Baseline Store
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BaselineStore = void 0;
|
|
7
|
+
var store_1 = require("./store");
|
|
8
|
+
Object.defineProperty(exports, "BaselineStore", { enumerable: true, get: function () { return store_1.BaselineStore; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/baselines/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,iCAAwC;AAA/B,sGAAA,aAAa,OAAA"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TestivAI Local Baseline Store
|
|
3
|
+
*
|
|
4
|
+
* Manages baseline screenshots on disk for local visual regression testing.
|
|
5
|
+
*
|
|
6
|
+
* Directory structure:
|
|
7
|
+
* .testivai/
|
|
8
|
+
* ├── baselines/{name}/screenshot.png, metadata.json, .previous/
|
|
9
|
+
* └── temp/{name}/screenshot.png (gitignored)
|
|
10
|
+
*/
|
|
11
|
+
export interface BaselineMetadata {
|
|
12
|
+
name: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
width?: number;
|
|
16
|
+
height?: number;
|
|
17
|
+
approvedBy?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare class BaselineStore {
|
|
20
|
+
private readonly projectRoot;
|
|
21
|
+
private readonly baselinesDir;
|
|
22
|
+
private readonly tempDir;
|
|
23
|
+
constructor(projectRoot: string);
|
|
24
|
+
/**
|
|
25
|
+
* Check if a baseline exists for the given snapshot name.
|
|
26
|
+
*/
|
|
27
|
+
exists(name: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Read a baseline screenshot as a Buffer.
|
|
30
|
+
* Returns null if the baseline does not exist.
|
|
31
|
+
*/
|
|
32
|
+
read(name: string): Buffer | null;
|
|
33
|
+
/**
|
|
34
|
+
* Read baseline metadata.
|
|
35
|
+
* Returns null if the baseline does not exist.
|
|
36
|
+
*/
|
|
37
|
+
readMetadata(name: string): BaselineMetadata | null;
|
|
38
|
+
/**
|
|
39
|
+
* Write a screenshot and metadata to the baseline directory.
|
|
40
|
+
* Creates the directory if it doesn't exist.
|
|
41
|
+
*/
|
|
42
|
+
write(name: string, screenshot: Buffer, metadata?: Partial<BaselineMetadata>): void;
|
|
43
|
+
/**
|
|
44
|
+
* Approve a temp screenshot as the new baseline.
|
|
45
|
+
* Backs up the previous baseline to `.previous/` if one exists.
|
|
46
|
+
*/
|
|
47
|
+
approve(name: string): void;
|
|
48
|
+
/**
|
|
49
|
+
* Undo the last approve by restoring the `.previous/` backup.
|
|
50
|
+
*/
|
|
51
|
+
undo(name: string): void;
|
|
52
|
+
/**
|
|
53
|
+
* List all baseline names.
|
|
54
|
+
*/
|
|
55
|
+
list(): string[];
|
|
56
|
+
/**
|
|
57
|
+
* Write a temp screenshot (captured during a test run).
|
|
58
|
+
*/
|
|
59
|
+
writeTemp(name: string, screenshot: Buffer): void;
|
|
60
|
+
/**
|
|
61
|
+
* Read a temp screenshot.
|
|
62
|
+
*/
|
|
63
|
+
readTemp(name: string): Buffer | null;
|
|
64
|
+
/**
|
|
65
|
+
* List all temp snapshot names.
|
|
66
|
+
*/
|
|
67
|
+
listTemp(): string[];
|
|
68
|
+
/**
|
|
69
|
+
* Clear all temp files.
|
|
70
|
+
*/
|
|
71
|
+
clearTemp(): void;
|
|
72
|
+
getBaselineDir(name: string): string;
|
|
73
|
+
getBaselineScreenshotPath(name: string): string;
|
|
74
|
+
getBaselineMetadataPath(name: string): string;
|
|
75
|
+
getTempScreenshotPath(name: string): string;
|
|
76
|
+
getBaselinesDir(): string;
|
|
77
|
+
getTempDir(): string;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/baselines/store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IACl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,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAI3C,eAAe,IAAI,MAAM;IAIzB,UAAU,IAAI,MAAM;CAGrB"}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* TestivAI Local Baseline Store
|
|
4
|
+
*
|
|
5
|
+
* Manages baseline screenshots on disk for local visual regression testing.
|
|
6
|
+
*
|
|
7
|
+
* Directory structure:
|
|
8
|
+
* .testivai/
|
|
9
|
+
* ├── baselines/{name}/screenshot.png, metadata.json, .previous/
|
|
10
|
+
* └── temp/{name}/screenshot.png (gitignored)
|
|
11
|
+
*/
|
|
12
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
15
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
16
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
17
|
+
}
|
|
18
|
+
Object.defineProperty(o, k2, desc);
|
|
19
|
+
}) : (function(o, m, k, k2) {
|
|
20
|
+
if (k2 === undefined) k2 = k;
|
|
21
|
+
o[k2] = m[k];
|
|
22
|
+
}));
|
|
23
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
24
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
25
|
+
}) : function(o, v) {
|
|
26
|
+
o["default"] = v;
|
|
27
|
+
});
|
|
28
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
29
|
+
var ownKeys = function(o) {
|
|
30
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
31
|
+
var ar = [];
|
|
32
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
33
|
+
return ar;
|
|
34
|
+
};
|
|
35
|
+
return ownKeys(o);
|
|
36
|
+
};
|
|
37
|
+
return function (mod) {
|
|
38
|
+
if (mod && mod.__esModule) return mod;
|
|
39
|
+
var result = {};
|
|
40
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
41
|
+
__setModuleDefault(result, mod);
|
|
42
|
+
return result;
|
|
43
|
+
};
|
|
44
|
+
})();
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.BaselineStore = void 0;
|
|
47
|
+
const fs = __importStar(require("fs"));
|
|
48
|
+
const path = __importStar(require("path"));
|
|
49
|
+
class BaselineStore {
|
|
50
|
+
constructor(projectRoot) {
|
|
51
|
+
this.projectRoot = projectRoot;
|
|
52
|
+
this.baselinesDir = path.join(projectRoot, '.testivai', 'baselines');
|
|
53
|
+
this.tempDir = path.join(projectRoot, '.testivai', 'temp');
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Check if a baseline exists for the given snapshot name.
|
|
57
|
+
*/
|
|
58
|
+
exists(name) {
|
|
59
|
+
const screenshotPath = this.getBaselineScreenshotPath(name);
|
|
60
|
+
return fs.existsSync(screenshotPath);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Read a baseline screenshot as a Buffer.
|
|
64
|
+
* Returns null if the baseline does not exist.
|
|
65
|
+
*/
|
|
66
|
+
read(name) {
|
|
67
|
+
const screenshotPath = this.getBaselineScreenshotPath(name);
|
|
68
|
+
if (!fs.existsSync(screenshotPath)) {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
return fs.readFileSync(screenshotPath);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Read baseline metadata.
|
|
75
|
+
* Returns null if the baseline does not exist.
|
|
76
|
+
*/
|
|
77
|
+
readMetadata(name) {
|
|
78
|
+
const metadataPath = this.getBaselineMetadataPath(name);
|
|
79
|
+
if (!fs.existsSync(metadataPath)) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
const raw = fs.readFileSync(metadataPath, 'utf-8');
|
|
83
|
+
return JSON.parse(raw);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Write a screenshot and metadata to the baseline directory.
|
|
87
|
+
* Creates the directory if it doesn't exist.
|
|
88
|
+
*/
|
|
89
|
+
write(name, screenshot, metadata) {
|
|
90
|
+
const baselineDir = this.getBaselineDir(name);
|
|
91
|
+
fs.mkdirSync(baselineDir, { recursive: true });
|
|
92
|
+
// Write screenshot
|
|
93
|
+
fs.writeFileSync(this.getBaselineScreenshotPath(name), screenshot);
|
|
94
|
+
// Write metadata
|
|
95
|
+
const now = new Date().toISOString();
|
|
96
|
+
const meta = {
|
|
97
|
+
name,
|
|
98
|
+
createdAt: now,
|
|
99
|
+
updatedAt: now,
|
|
100
|
+
...metadata,
|
|
101
|
+
};
|
|
102
|
+
fs.writeFileSync(this.getBaselineMetadataPath(name), JSON.stringify(meta, null, 2));
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Approve a temp screenshot as the new baseline.
|
|
106
|
+
* Backs up the previous baseline to `.previous/` if one exists.
|
|
107
|
+
*/
|
|
108
|
+
approve(name) {
|
|
109
|
+
const tempScreenshot = this.getTempScreenshotPath(name);
|
|
110
|
+
if (!fs.existsSync(tempScreenshot)) {
|
|
111
|
+
throw new Error(`No temp screenshot found for "${name}". Run your tests first to generate screenshots.`);
|
|
112
|
+
}
|
|
113
|
+
const baselineDir = this.getBaselineDir(name);
|
|
114
|
+
const previousDir = path.join(baselineDir, '.previous');
|
|
115
|
+
const currentScreenshot = this.getBaselineScreenshotPath(name);
|
|
116
|
+
const currentMetadata = this.getBaselineMetadataPath(name);
|
|
117
|
+
// Backup current baseline if it exists
|
|
118
|
+
if (fs.existsSync(currentScreenshot)) {
|
|
119
|
+
fs.mkdirSync(previousDir, { recursive: true });
|
|
120
|
+
fs.copyFileSync(currentScreenshot, path.join(previousDir, 'screenshot.png'));
|
|
121
|
+
if (fs.existsSync(currentMetadata)) {
|
|
122
|
+
fs.copyFileSync(currentMetadata, path.join(previousDir, 'metadata.json'));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// Copy temp to baseline
|
|
126
|
+
fs.mkdirSync(baselineDir, { recursive: true });
|
|
127
|
+
fs.copyFileSync(tempScreenshot, currentScreenshot);
|
|
128
|
+
// Update metadata
|
|
129
|
+
const now = new Date().toISOString();
|
|
130
|
+
const existingMeta = this.readMetadata(name);
|
|
131
|
+
const meta = {
|
|
132
|
+
name,
|
|
133
|
+
createdAt: existingMeta?.createdAt ?? now,
|
|
134
|
+
updatedAt: now,
|
|
135
|
+
approvedBy: 'local',
|
|
136
|
+
};
|
|
137
|
+
fs.writeFileSync(currentMetadata, JSON.stringify(meta, null, 2));
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Undo the last approve by restoring the `.previous/` backup.
|
|
141
|
+
*/
|
|
142
|
+
undo(name) {
|
|
143
|
+
const baselineDir = this.getBaselineDir(name);
|
|
144
|
+
const previousDir = path.join(baselineDir, '.previous');
|
|
145
|
+
if (!fs.existsSync(previousDir)) {
|
|
146
|
+
throw new Error(`No previous baseline found for "${name}". Cannot undo.`);
|
|
147
|
+
}
|
|
148
|
+
const previousScreenshot = path.join(previousDir, 'screenshot.png');
|
|
149
|
+
const previousMetadata = path.join(previousDir, 'metadata.json');
|
|
150
|
+
const currentScreenshot = this.getBaselineScreenshotPath(name);
|
|
151
|
+
const currentMetadata = this.getBaselineMetadataPath(name);
|
|
152
|
+
// Restore previous screenshot
|
|
153
|
+
if (fs.existsSync(previousScreenshot)) {
|
|
154
|
+
fs.copyFileSync(previousScreenshot, currentScreenshot);
|
|
155
|
+
}
|
|
156
|
+
// Restore previous metadata
|
|
157
|
+
if (fs.existsSync(previousMetadata)) {
|
|
158
|
+
fs.copyFileSync(previousMetadata, currentMetadata);
|
|
159
|
+
}
|
|
160
|
+
// Remove .previous directory
|
|
161
|
+
fs.rmSync(previousDir, { recursive: true, force: true });
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* List all baseline names.
|
|
165
|
+
*/
|
|
166
|
+
list() {
|
|
167
|
+
if (!fs.existsSync(this.baselinesDir)) {
|
|
168
|
+
return [];
|
|
169
|
+
}
|
|
170
|
+
return fs.readdirSync(this.baselinesDir).filter((entry) => {
|
|
171
|
+
const entryPath = path.join(this.baselinesDir, entry);
|
|
172
|
+
return fs.statSync(entryPath).isDirectory();
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Write a temp screenshot (captured during a test run).
|
|
177
|
+
*/
|
|
178
|
+
writeTemp(name, screenshot) {
|
|
179
|
+
const tempDir = path.join(this.tempDir, name);
|
|
180
|
+
fs.mkdirSync(tempDir, { recursive: true });
|
|
181
|
+
fs.writeFileSync(this.getTempScreenshotPath(name), screenshot);
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Read a temp screenshot.
|
|
185
|
+
*/
|
|
186
|
+
readTemp(name) {
|
|
187
|
+
const tempPath = this.getTempScreenshotPath(name);
|
|
188
|
+
if (!fs.existsSync(tempPath)) {
|
|
189
|
+
return null;
|
|
190
|
+
}
|
|
191
|
+
return fs.readFileSync(tempPath);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* List all temp snapshot names.
|
|
195
|
+
*/
|
|
196
|
+
listTemp() {
|
|
197
|
+
if (!fs.existsSync(this.tempDir)) {
|
|
198
|
+
return [];
|
|
199
|
+
}
|
|
200
|
+
return fs.readdirSync(this.tempDir).filter((entry) => {
|
|
201
|
+
const entryPath = path.join(this.tempDir, entry);
|
|
202
|
+
return fs.statSync(entryPath).isDirectory();
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Clear all temp files.
|
|
207
|
+
*/
|
|
208
|
+
clearTemp() {
|
|
209
|
+
if (fs.existsSync(this.tempDir)) {
|
|
210
|
+
fs.rmSync(this.tempDir, { recursive: true, force: true });
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
// ── Path helpers ──────────────────────────────────────────────────────────
|
|
214
|
+
getBaselineDir(name) {
|
|
215
|
+
return path.join(this.baselinesDir, name);
|
|
216
|
+
}
|
|
217
|
+
getBaselineScreenshotPath(name) {
|
|
218
|
+
return path.join(this.baselinesDir, name, 'screenshot.png');
|
|
219
|
+
}
|
|
220
|
+
getBaselineMetadataPath(name) {
|
|
221
|
+
return path.join(this.baselinesDir, name, 'metadata.json');
|
|
222
|
+
}
|
|
223
|
+
getTempScreenshotPath(name) {
|
|
224
|
+
return path.join(this.tempDir, name, 'screenshot.png');
|
|
225
|
+
}
|
|
226
|
+
getBaselinesDir() {
|
|
227
|
+
return this.baselinesDir;
|
|
228
|
+
}
|
|
229
|
+
getTempDir() {
|
|
230
|
+
return this.tempDir;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
exports.BaselineStore = BaselineStore;
|
|
234
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/baselines/store.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAW7B,MAAa,aAAa;IAIxB,YAA6B,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;QAC9C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;QACrE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAY;QACjB,MAAM,cAAc,GAAG,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;QAC5D,OAAO,EAAE,CAAC,UAAU,CAAC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EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;IACzD,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF;AA1ND,sCA0NC"}
|
package/dist/bin/testivai.js
CHANGED
|
@@ -10,6 +10,7 @@ const auth_1 = require("../commands/auth");
|
|
|
10
10
|
const init_1 = require("../commands/init");
|
|
11
11
|
const run_1 = require("../commands/run");
|
|
12
12
|
const capture_1 = require("../commands/capture");
|
|
13
|
+
const approve_1 = require("../commands/approve");
|
|
13
14
|
const packageJson = require('../../package.json');
|
|
14
15
|
const program = new commander_1.Command();
|
|
15
16
|
// Display banner
|
|
@@ -39,6 +40,7 @@ program.addCommand(auth_1.authCommand);
|
|
|
39
40
|
program.addCommand(init_1.initCommand);
|
|
40
41
|
program.addCommand(run_1.runCommand);
|
|
41
42
|
program.addCommand(capture_1.witnessCommand);
|
|
43
|
+
program.addCommand(approve_1.approveCommand);
|
|
42
44
|
// Parse arguments
|
|
43
45
|
program.parse();
|
|
44
46
|
// Show help if no command provided
|
package/dist/bin/testivai.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testivai.js","sourceRoot":"","sources":["../../src/bin/testivai.ts"],"names":[],"mappings":";;;;;;AAEA,yCAAoC;AACpC,kDAA0B;AAC1B,2CAA+C;AAC/C,2CAA+C;AAC/C,yCAA6C;AAC7C,iDAAqD;AAErD,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAElD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,iBAAiB;AACjB,MAAM,UAAU,GAAG,GAAG,EAAE;IACtB,OAAO,CAAC,GAAG,EAAE,CAAC;IACd,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAC3C,OAAO,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,CAAC,CAAC;AAChC,OAAO,CAAC,UAAU,CAAC,kBAAW,CAAC,CAAC;AAChC,OAAO,CAAC,UAAU,CAAC,gBAAU,CAAC,CAAC;AAC/B,OAAO,CAAC,UAAU,CAAC,wBAAc,CAAC,CAAC;AACnC,OAAO,CAAC,UAAU,CAAC,wBAAc,CAAC,CAAC;AAEnC,kBAAkB;AAClB,OAAO,CAAC,KAAK,EAAE,CAAC;AAEhB,mCAAmC;AACnC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binding.d.ts","sourceRoot":"","sources":["../../src/browser/binding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAoCzC;;GAEG;AACH,qBAAa,cAAc;IAOb,OAAO,CAAC,MAAM;IAN1B,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,mBAAmB,CAAS;IACpC,OAAO,CAAC,YAAY,CAAC,CAAiB;IACtC,OAAO,CAAC,MAAM,CAAM;gBAEA,MAAM,EAAE,aAAa,EAAE,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAO;IAO5E;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"binding.d.ts","sourceRoot":"","sources":["../../src/browser/binding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAoCzC;;GAEG;AACH,qBAAa,cAAc;IAOb,OAAO,CAAC,MAAM;IAN1B,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,mBAAmB,CAAS;IACpC,OAAO,CAAC,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