@brightspace-ui/testing 0.28.0 → 0.28.1

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": "0.28.0",
5
+ "version": "0.28.1",
6
6
  "repository": "https://github.com/BrightspaceUI/testing.git",
7
7
  "scripts": {
8
8
  "lint": "eslint . --ext .js",
@@ -195,11 +195,14 @@ export function renderBrowserResults(browser, tests, options) {
195
195
  return acc;
196
196
  }
197
197
 
198
- let status = STATUS_TYPE.WARNING;
199
- if (resultData.duration > resultData.info.slowDuration) {
200
- status = STATUS_TYPE.ERROR;
201
- } else if (resultData.duration < (resultData.info.slowDuration / 2)) {
202
- status = STATUS_TYPE.NORMAL;
198
+ let status = STATUS_TYPE.NORMAL;
199
+ if (resultData.info) {
200
+ status = STATUS_TYPE.WARNING;
201
+ if (resultData.duration > resultData.info.slowDuration) {
202
+ status = STATUS_TYPE.ERROR;
203
+ } else if (resultData.duration < (resultData.info.slowDuration / 2)) {
204
+ status = STATUS_TYPE.NORMAL;
205
+ }
203
206
  }
204
207
 
205
208
  return acc.push(html`
@@ -70,6 +70,11 @@ function flattenResults(session, browserData, fileData) {
70
70
  tests.forEach(t => {
71
71
  const testName = `${prefix}${t.name}`;
72
72
  const testKey = testName.replaceAll(' > ', ' ');
73
+ const info = getTestInfo(session, testKey);
74
+
75
+ // tests missing info but with no error were skipped via grep, so exclude them
76
+ if (!info && !t.error) return;
77
+
73
78
  if (!fileData.tests.has(testName)) {
74
79
  fileData.tests.set(testName, {
75
80
  name: testName,
@@ -87,7 +92,7 @@ function flattenResults(session, browserData, fileData) {
87
92
  duration: t.duration,
88
93
  error: t.error?.message,
89
94
  passed: t.passed,
90
- info: getTestInfo(session, testKey)
95
+ info: info
91
96
  });
92
97
  });
93
98
  }