@iqual/playwright-vrt 0.1.5 → 0.1.6

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,10 +1,15 @@
1
1
  // This config is shipped with playwright-vrt package
2
2
  // User's config is loaded via environment variables
3
3
 
4
+ import { join } from 'path';
5
+
4
6
  const vrtConfig = process.env.VRT_CONFIG
5
7
  ? JSON.parse(process.env.VRT_CONFIG)
6
8
  : { viewports: [{ name: 'desktop', width: 1920, height: 1080 }] };
7
9
 
10
+ // Use absolute paths based on user's working directory
11
+ const workingDir = process.cwd();
12
+
8
13
  export default {
9
14
  testDir: './tests',
10
15
  testMatch: '**/*.spec.js', // JavaScript test files
@@ -14,21 +19,21 @@ export default {
14
19
  timeout: 60000,
15
20
 
16
21
  // Store snapshots in playwright-snapshots/ for easy caching
17
- snapshotDir: './playwright-snapshots',
22
+ snapshotDir: join(workingDir, 'playwright-snapshots'),
18
23
 
19
24
  // Store temporary test artifacts in playwright-tmp/
20
- outputDir: './playwright-tmp',
25
+ outputDir: join(workingDir, 'playwright-tmp'),
21
26
 
22
27
  reporter: [
23
28
  ['html', {
24
- outputFolder: process.env.OUTPUT_DIR || 'playwright-report',
29
+ outputFolder: process.env.OUTPUT_DIR || join(workingDir, 'playwright-report'),
25
30
  open: 'never',
26
31
  noSnippets: true,
27
32
  }],
28
33
  ['json', {
29
34
  outputFile: process.env.OUTPUT_DIR
30
35
  ? `${process.env.OUTPUT_DIR}/results.json`
31
- : 'playwright-report/results.json'
36
+ : join(workingDir, 'playwright-report', 'results.json')
32
37
  }],
33
38
  ['list'],
34
39
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iqual/playwright-vrt",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Standalone Visual Regression Testing CLI tool using Playwright",
5
5
  "type": "module",
6
6
  "bin": {