@brightspace-ui/testing 1.16.2 → 1.17.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/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@brightspace-ui/testing",
|
|
3
3
|
"description": "Utilities for testing front-end components and applications",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.17.0",
|
|
6
6
|
"repository": "https://github.com/BrightspaceUI/testing.git",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"lint": "npm run lint:eslint && npm run lint:style",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@web/test-runner-playwright": "^0.11",
|
|
53
53
|
"command-line-args": "^6",
|
|
54
54
|
"command-line-usage": "^7",
|
|
55
|
-
"glob": "^
|
|
55
|
+
"glob": "^11",
|
|
56
56
|
"lit": "^2 || ^3",
|
|
57
57
|
"page": "^1",
|
|
58
58
|
"pixelmatch": "^6",
|
|
@@ -3,7 +3,7 @@ import { appendFile, mkdir, readFile, rename, rm } from 'node:fs/promises';
|
|
|
3
3
|
import { join, normalize, parse } from 'node:path';
|
|
4
4
|
import commandLineArgs from 'command-line-args';
|
|
5
5
|
import { glob } from 'glob';
|
|
6
|
-
import { PATHS } from '../../
|
|
6
|
+
import { PATHS } from '../../paths.js';
|
|
7
7
|
import { stdout } from 'node:process';
|
|
8
8
|
|
|
9
9
|
async function start(argv = [], local = false) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { env } from 'node:process';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
|
|
4
|
+
const isCI = !!env['CI'];
|
|
5
|
+
const METADATA_NAME = '.vdiff.json';
|
|
6
|
+
const ROOT_NAME = '.vdiff';
|
|
7
|
+
|
|
8
|
+
export const PATHS = {
|
|
9
|
+
FAIL: 'fail',
|
|
10
|
+
GOLDEN: 'golden',
|
|
11
|
+
PASS: 'pass',
|
|
12
|
+
METADATA: isCI ? METADATA_NAME : join(ROOT_NAME, METADATA_NAME),
|
|
13
|
+
REPORT_ROOT: '.report',
|
|
14
|
+
VDIFF_ROOT: ROOT_NAME
|
|
15
|
+
};
|
|
@@ -2,7 +2,7 @@ import { cwd } from 'node:process';
|
|
|
2
2
|
import { rollupPluginHTML as html } from '@web/rollup-plugin-html';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
|
5
|
-
import { PATHS } from './
|
|
5
|
+
import { PATHS } from './paths.js';
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
8
|
input: join(cwd(), PATHS.VDIFF_ROOT, PATHS.REPORT_ROOT, './temp/index.html'),
|
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
import { access, constants, mkdir, readdir, readFile, rename, rm, stat, writeFile } from 'node:fs/promises';
|
|
2
2
|
import { basename, dirname, join } from 'node:path';
|
|
3
3
|
import { env } from 'node:process';
|
|
4
|
+
import { PATHS } from './paths.js';
|
|
4
5
|
import pixelmatch from 'pixelmatch';
|
|
5
6
|
import { PNG } from 'pngjs';
|
|
6
7
|
|
|
7
8
|
const isCI = !!env['CI'];
|
|
8
9
|
const DEFAULT_TOLERANCE = 0; // TODO: Support tolerance override?
|
|
9
|
-
const METADATA_NAME = '.vdiff.json';
|
|
10
|
-
const ROOT_NAME = '.vdiff';
|
|
11
|
-
export const PATHS = {
|
|
12
|
-
FAIL: 'fail',
|
|
13
|
-
GOLDEN: 'golden',
|
|
14
|
-
PASS: 'pass',
|
|
15
|
-
METADATA: isCI ? METADATA_NAME : join(ROOT_NAME, METADATA_NAME),
|
|
16
|
-
REPORT_ROOT: '.report',
|
|
17
|
-
VDIFF_ROOT: ROOT_NAME
|
|
18
|
-
};
|
|
19
10
|
|
|
20
11
|
async function checkFileExists(fileName) {
|
|
21
12
|
try {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { cpSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import { dirname, join } from 'node:path';
|
|
3
|
-
import { getTestInfo, PATHS } from './visual-diff-plugin.js';
|
|
4
3
|
import { env } from 'node:process';
|
|
5
4
|
import { execSync } from 'node:child_process';
|
|
6
5
|
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import { getTestInfo } from './visual-diff-plugin.js';
|
|
7
|
+
import { PATHS } from './paths.js';
|
|
7
8
|
|
|
8
9
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
10
|
const isCI = !!env['CI'];
|