@simpright/portal 0.3.0 → 0.4.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simpright/portal",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "A static dashboard for Playwright runs: run history, trends and known issues, plus Test Cases and Bugs pages, published into any folder (GitHub Pages, or anywhere else).",
5
5
  "keywords": [
6
6
  "simpright",
@@ -40,7 +40,7 @@
40
40
  "build": "tsc -p tsconfig.json"
41
41
  },
42
42
  "dependencies": {
43
- "simpright": "0.3.0",
43
+ "simpright": "0.4.0",
44
44
  "yaml": "^2.9.1"
45
45
  }
46
46
  }
@@ -753,9 +753,12 @@
753
753
  };
754
754
  }
755
755
 
756
+ // A chart animates its lines in, unless the reader's system asks for reduced motion. The screenshot tests ask for
757
+ // it too, so they compare the charts as drawn, not a frame of their animation.
756
758
  function createChart(canvasId, labels, datasets, options) {
757
759
  const ctx = document.getElementById(canvasId).getContext('2d');
758
- return new Chart(ctx, { type: 'line', data: { labels, datasets }, options });
760
+ const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
761
+ return new Chart(ctx, { type: 'line', data: { labels, datasets }, options: reducedMotion ? { ...options, animation: false } : options });
759
762
  }
760
763
 
761
764
  function createDurationChart(canvasId, series) {