@brightspace-ui/testing 0.29.0 → 0.29.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/package.json +3 -3
- package/src/server/report/app.js +6 -1
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": "0.29.
|
|
5
|
+
"version": "0.29.2",
|
|
6
6
|
"repository": "https://github.com/BrightspaceUI/testing.git",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"lint": "eslint . --ext .js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"test:bin": "mocha './test/bin/**/*.test.js'",
|
|
12
12
|
"test:browser": "npx d2l-test-runner --files './test/browser/**/*.test.js'",
|
|
13
13
|
"test:server": "mocha './test/server/**/*.test.js'",
|
|
14
|
-
"test:vdiff": "npx d2l-test-runner --config ./test/browser/vdiff.config.js
|
|
14
|
+
"test:vdiff": "npx d2l-test-runner vdiff --config ./test/browser/vdiff.config.js"
|
|
15
15
|
},
|
|
16
16
|
"bin": {
|
|
17
17
|
"d2l-test-runner": "./bin/d2l-test-runner.js",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"author": "D2L Corporation",
|
|
21
21
|
"license": "Apache-2.0",
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@web/dev-server": "^0.2",
|
|
24
23
|
"chai": "^4",
|
|
25
24
|
"eslint": "^8",
|
|
26
25
|
"eslint-config-brightspace": "^0.23",
|
|
@@ -40,6 +39,7 @@
|
|
|
40
39
|
"@rollup/plugin-node-resolve": "^15",
|
|
41
40
|
"@open-wc/testing": "^3",
|
|
42
41
|
"@web/config-loader": "^0.2",
|
|
42
|
+
"@web/dev-server": "^0.2",
|
|
43
43
|
"@web/rollup-plugin-html": "^2",
|
|
44
44
|
"@web/test-runner": "^0.16",
|
|
45
45
|
"@web/test-runner-commands": "^0.7",
|
package/src/server/report/app.js
CHANGED
|
@@ -182,12 +182,14 @@ class App extends LitElement {
|
|
|
182
182
|
}
|
|
183
183
|
_handleNextClick() {
|
|
184
184
|
this._updateSearchParams(this._next);
|
|
185
|
+
this._scrollToTop();
|
|
185
186
|
}
|
|
186
187
|
_handleOverlayChange(e) {
|
|
187
188
|
this._overlay = e.target.checked;
|
|
188
189
|
}
|
|
189
190
|
_handlePrevClick() {
|
|
190
191
|
this._updateSearchParams(this._prev);
|
|
192
|
+
this._scrollToTop();
|
|
191
193
|
}
|
|
192
194
|
_renderError(message, source) {
|
|
193
195
|
return html`<div class="padding"><p>${message}: <b>${source}</b>.</p></div>`;
|
|
@@ -325,7 +327,7 @@ class App extends LitElement {
|
|
|
325
327
|
if (tabs.length < 2) return nothing;
|
|
326
328
|
return renderTabButtons('browser results', tabs, index => {
|
|
327
329
|
this._selectedBrowserIndex = index;
|
|
328
|
-
this.
|
|
330
|
+
this._scrollToTop();
|
|
329
331
|
this.requestUpdate();
|
|
330
332
|
});
|
|
331
333
|
}
|
|
@@ -410,6 +412,9 @@ class App extends LitElement {
|
|
|
410
412
|
`;
|
|
411
413
|
|
|
412
414
|
}
|
|
415
|
+
_scrollToTop() {
|
|
416
|
+
this.shadowRoot.querySelector('.tab-panels').scrollTo(0, 0);
|
|
417
|
+
}
|
|
413
418
|
_updateFiles() {
|
|
414
419
|
|
|
415
420
|
const files = [];
|