@brightspace-ui/testing 1.12.1 → 1.12.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 +1 -1
- package/package.json +1 -1
- package/src/server/wtr-config.js +6 -4
package/README.md
CHANGED
|
@@ -279,7 +279,7 @@ it('should wait', async() => {
|
|
|
279
279
|
|
|
280
280
|
`fixture()` will automatically wait for all nested Lit components to fulfill their `updateComplete` Promise. To control when a component's `updateComplete` fulfills, implement the [`getUpdateComplete()` lifecycle callback](https://lit.dev/docs/components/lifecycle/#getUpdateComplete).
|
|
281
281
|
|
|
282
|
-
In other scenarios, a component may have an initial loading state (e.g. loading spinner or skeleton) where `updateComplete` has already resolved in addition to another fully loaded state. To signal that `fixture()` should wait for this final state, implement `getLoadingComplete()`. It works the same way as `getUpdateComplete()` by fulfilling its Promise when the component has fully loaded.
|
|
282
|
+
In other scenarios, a component may have an initial loading state (e.g. loading spinner or skeleton) where `updateComplete` has already resolved in addition to another fully loaded state. To signal that `fixture()` should wait for this final state, implement `getLoadingComplete()`. It works the same way as `getUpdateComplete()` by fulfilling its Promise when the component has fully loaded. `fixture()` will also wait recursively for all nested Lit elements to fulfill their `getLoadingComplete()` promise when present.
|
|
283
283
|
|
|
284
284
|
```javascript
|
|
285
285
|
class SlowElem extends LitElement {
|
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.12.
|
|
5
|
+
"version": "1.12.2",
|
|
6
6
|
"repository": "https://github.com/BrightspaceUI/testing.git",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"lint": "eslint . --ext .js",
|
package/src/server/wtr-config.js
CHANGED
|
@@ -15,6 +15,7 @@ const BROWSER_MAP = {
|
|
|
15
15
|
webkit: 'webkit'
|
|
16
16
|
};
|
|
17
17
|
const TIMEZONE = '{"name":"Canada - Toronto","identifier":"America/Toronto"}';
|
|
18
|
+
const FONT_ASSETS = 'https://s.brightspace.com/lib/fonts/0.6.0/assets/';
|
|
18
19
|
const SUPPRESS_RESIZE_OBSERVER_ERRORS = `
|
|
19
20
|
<script>
|
|
20
21
|
window.addEventListener('error', (err) => {
|
|
@@ -75,8 +76,8 @@ export class WTRConfig {
|
|
|
75
76
|
`<!DOCTYPE html>
|
|
76
77
|
<html lang="en" data-timezone='${TIMEZONE}'>
|
|
77
78
|
<head>
|
|
78
|
-
<link rel="preload" href="
|
|
79
|
-
<link rel="preload" href="
|
|
79
|
+
<link rel="preload" href="${FONT_ASSETS}Lato-400.woff2" as="font" type="font/woff2" crossorigin>
|
|
80
|
+
<link rel="preload" href="${FONT_ASSETS}Lato-700.woff2" as="font" type="font/woff2" crossorigin>
|
|
80
81
|
<style>
|
|
81
82
|
|
|
82
83
|
* {
|
|
@@ -91,14 +92,15 @@ export class WTRConfig {
|
|
|
91
92
|
font-family: 'Lato';
|
|
92
93
|
font-style: normal;
|
|
93
94
|
font-weight: 400;
|
|
94
|
-
src: url(
|
|
95
|
+
src: url(${FONT_ASSETS}Lato-400.woff2) format('woff2');
|
|
95
96
|
}
|
|
96
97
|
@font-face {
|
|
97
98
|
font-family: 'Lato';
|
|
98
99
|
font-style: normal;
|
|
99
100
|
font-weight: 700;
|
|
100
|
-
src: url(
|
|
101
|
+
src: url(${FONT_ASSETS}Lato-700.woff2) format('woff2');
|
|
101
102
|
}
|
|
103
|
+
|
|
102
104
|
html {
|
|
103
105
|
font-size: 20px;
|
|
104
106
|
}
|