@brightspace-ui/testing 1.28.2 → 1.30.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.30.0",
|
|
6
6
|
"repository": "https://github.com/BrightspaceUI/testing.git",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"lint": "npm run lint:eslint && npm run lint:style",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"eslint": "^9",
|
|
29
29
|
"eslint-config-brightspace": "^2.0.0",
|
|
30
30
|
"mocha": "^11",
|
|
31
|
-
"sinon": "^
|
|
31
|
+
"sinon": "^20",
|
|
32
32
|
"globals": "^16"
|
|
33
33
|
},
|
|
34
34
|
"exports": {
|
|
@@ -59,11 +59,12 @@ export const RESULT_STYLE = css`
|
|
|
59
59
|
}
|
|
60
60
|
.result-overlay {
|
|
61
61
|
background: hsla(0, 0%, 100%, 0.8);
|
|
62
|
+
cursor: zoom-in;
|
|
62
63
|
left: 0;
|
|
63
64
|
position: absolute;
|
|
64
65
|
top: 0;
|
|
65
66
|
}
|
|
66
|
-
.result-overlay img
|
|
67
|
+
.result-overlay img + img {
|
|
67
68
|
filter:
|
|
68
69
|
drop-shadow(0 0 0.5px red)
|
|
69
70
|
drop-shadow(0 0 0.5px red)
|
|
@@ -74,6 +75,12 @@ export const RESULT_STYLE = css`
|
|
|
74
75
|
drop-shadow(0 0 0.5px red)
|
|
75
76
|
drop-shadow(0 0 0.5px red)
|
|
76
77
|
drop-shadow(0 0 0.5px red);
|
|
78
|
+
inset: 0;
|
|
79
|
+
opacity: 0.003;
|
|
80
|
+
position: absolute;
|
|
81
|
+
}
|
|
82
|
+
.result-overlay img + img:active {
|
|
83
|
+
opacity: 1;
|
|
77
84
|
}
|
|
78
85
|
.result-part-info {
|
|
79
86
|
align-items: center;
|
|
@@ -180,7 +187,11 @@ function renderResult(resultData, options) {
|
|
|
180
187
|
const goldenExists = (resultData.info.golden !== undefined);
|
|
181
188
|
|
|
182
189
|
const overlay = (goldenExists && options.showOverlay && !resultData.passed && resultData.info.diff) ?
|
|
183
|
-
html
|
|
190
|
+
html`
|
|
191
|
+
<div class="result-overlay">
|
|
192
|
+
<img src="../${resultData.info.diff}" loading="lazy" alt="">
|
|
193
|
+
<img src="../${resultData.info.diff}" loading="lazy" alt="">
|
|
194
|
+
</div>` : nothing;
|
|
184
195
|
|
|
185
196
|
const goldenPart = !goldenExists ?
|
|
186
197
|
html`<div class="result-graphic padding">${ICON_NO_GOLDEN}<p>No golden exists for this test... yet.</p></div>` :
|
package/src/server/wtr-config.js
CHANGED