@deck.gl/test-utils 9.0.40 → 9.1.0-beta.3

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.
Files changed (47) hide show
  1. package/dist/generate-layer-tests.d.ts.map +1 -1
  2. package/dist/generate-layer-tests.js +4 -19
  3. package/dist/generate-layer-tests.js.map +1 -0
  4. package/dist/index.cjs +47 -8
  5. package/dist/index.cjs.map +4 -4
  6. package/dist/index.d.ts +1 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +5 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/interaction-test-runner.d.ts.map +1 -1
  11. package/dist/interaction-test-runner.js +4 -19
  12. package/dist/interaction-test-runner.js.map +1 -0
  13. package/dist/lifecycle-test.d.ts.map +1 -1
  14. package/dist/lifecycle-test.js +4 -19
  15. package/dist/lifecycle-test.js.map +1 -0
  16. package/dist/snapshot-test-runner.d.ts +1 -0
  17. package/dist/snapshot-test-runner.d.ts.map +1 -1
  18. package/dist/snapshot-test-runner.js +12 -20
  19. package/dist/snapshot-test-runner.js.map +1 -0
  20. package/dist/test-runner.d.ts.map +1 -1
  21. package/dist/test-runner.js +4 -19
  22. package/dist/test-runner.js.map +1 -0
  23. package/dist/utils/dom.d.ts.map +1 -1
  24. package/dist/utils/dom.js +4 -0
  25. package/dist/utils/dom.js.map +1 -0
  26. package/dist/utils/layer.d.ts +7 -0
  27. package/dist/utils/layer.d.ts.map +1 -0
  28. package/dist/utils/layer.js +18 -0
  29. package/dist/utils/layer.js.map +1 -0
  30. package/dist/utils/precision.d.ts.map +1 -1
  31. package/dist/utils/precision.js +4 -0
  32. package/dist/utils/precision.js.map +1 -0
  33. package/dist/utils/setup-gl.d.ts +1 -2
  34. package/dist/utils/setup-gl.d.ts.map +1 -1
  35. package/dist/utils/setup-gl.js +6 -12
  36. package/dist/utils/setup-gl.js.map +1 -0
  37. package/package.json +7 -7
  38. package/src/generate-layer-tests.ts +4 -19
  39. package/src/index.ts +5 -0
  40. package/src/interaction-test-runner.ts +3 -19
  41. package/src/lifecycle-test.ts +3 -19
  42. package/src/snapshot-test-runner.ts +17 -20
  43. package/src/test-runner.ts +3 -19
  44. package/src/utils/dom.ts +4 -0
  45. package/src/utils/layer.ts +22 -0
  46. package/src/utils/precision.ts +4 -0
  47. package/src/utils/setup-gl.ts +6 -13
@@ -1 +1 @@
1
- {"version":3,"file":"generate-layer-tests.d.ts","sourceRoot":"","sources":["../src/generate-layer-tests.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAkB,KAAK,EAAC,MAAM,eAAe,CAAC;AAGrD,OAAO,KAAK,EAAC,aAAa,EAAE,UAAU,EAAC,4BAAyB;AAYhE,wBAAgB,kBAAkB,CAAC,MAAM,SAAS,KAAK,EAAE,EACvD,KAAK,EACL,WAAgB,EAChB,MAAsB,EACtB,cAAqB,EACrB,aAAoB,EACpB,iBAAwB,EACzB,EAAE;IACD,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACvC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,cAAc,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACzD,aAAa,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC;IAEvD;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,GAAG,aAAa,CAAC,MAAM,CAAC,EAAE,CA6E1B"}
1
+ {"version":3,"file":"generate-layer-tests.d.ts","sourceRoot":"","sources":["../src/generate-layer-tests.ts"],"names":[],"mappings":"AAIA,OAAO,EAAkB,KAAK,EAAC,MAAM,eAAe,CAAC;AAGrD,OAAO,KAAK,EAAC,aAAa,EAAE,UAAU,EAAC,4BAAyB;AAYhE,wBAAgB,kBAAkB,CAAC,MAAM,SAAS,KAAK,EAAE,EACvD,KAAK,EACL,WAAgB,EAChB,MAAsB,EACtB,cAAqB,EACrB,aAAoB,EACpB,iBAAwB,EACzB,EAAE;IACD,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACvC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,cAAc,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACzD,aAAa,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC;IAEvD;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,GAAG,aAAa,CAAC,MAAM,CAAC,EAAE,CA6E1B"}
@@ -1,22 +1,6 @@
1
- // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
20
4
  import { _count as count } from '@deck.gl/core';
21
5
  // eslint-disable-next-line @typescript-eslint/no-empty-function
22
6
  function noop() { }
@@ -207,3 +191,4 @@ function makeAltDataTestCases(props, propTypes) {
207
191
  }
208
192
  ];
209
193
  }
194
+ //# sourceMappingURL=generate-layer-tests.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-layer-tests.js","sourceRoot":"","sources":["../src/generate-layer-tests.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EAAC,MAAM,IAAI,KAAK,EAAQ,MAAM,eAAe,CAAC;AAKrD,gEAAgE;AAChE,SAAS,IAAI,KAAI,CAAC;AAElB,SAAS,aAAa,CAAC,SAAc,EAAE,OAAe;IACpD,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC;AAED,8CAA8C;AAC9C,MAAM,UAAU,kBAAkB,CAAuB,EACvD,KAAK,EACL,WAAW,GAAG,EAAE,EAChB,MAAM,GAAG,aAAa,EACtB,cAAc,GAAG,IAAI,EACrB,aAAa,GAAG,IAAI,EACpB,iBAAiB,GAAG,IAAI,EAkBzB;IACC,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,gCAAgC,CAAC,CAAC;IAE1D,SAAS,iBAAiB,CAAC,KAAa;QACtC,OAAO,GAAG,KAAK,CAAC,SAAS,IAAI,KAAK,EAAE,CAAC;IACvC,CAAC;IAED,MAAM,SAAS,GAA4B;QACzC;YACE,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,EAAE;SACV;QACD;YACE,KAAK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AAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;QAC5F,CAAC;IACH,CAAC;IAED,OAAO;QACL;YACE,KAAK,EAAE,gBAAgB;YACvB,WAAW,EAAE,kBAAkB;SAChC;QACD;YACE,KAAK,EAAE,uBAAuB;YAC9B,WAAW,EAAE,gBAAgB;SAC9B;QACD;YACE,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EAAE,gBAAgB;SAC9B;KACF,CAAC;AACJ,CAAC"}
package/dist/index.cjs CHANGED
@@ -25,6 +25,7 @@ __export(dist_exports, {
25
25
  TestRunner: () => TestRunner,
26
26
  device: () => device,
27
27
  generateLayerTests: () => generateLayerTests,
28
+ getLayerUniforms: () => getLayerUniforms,
28
29
  gl: () => gl,
29
30
  testInitializeLayer: () => testInitializeLayer,
30
31
  testInitializeLayerAsync: () => testInitializeLayerAsync,
@@ -34,6 +35,17 @@ __export(dist_exports, {
34
35
  });
35
36
  module.exports = __toCommonJS(dist_exports);
36
37
 
38
+ // dist/utils/layer.js
39
+ function getLayerUniforms(layer, blockName) {
40
+ const uniforms = {};
41
+ const uniformStore = layer.getModels()[0]._uniformStore;
42
+ const uniformBlocks = blockName ? [uniformStore.uniformBlocks.get(blockName)] : uniformStore.uniformBlocks.values();
43
+ for (const block of uniformBlocks) {
44
+ Object.assign(uniforms, block.uniforms);
45
+ }
46
+ return uniforms;
47
+ }
48
+
37
49
  // dist/utils/precision.js
38
50
  function toLowPrecision(input, precision = 11) {
39
51
  if (typeof input === "number") {
@@ -53,11 +65,8 @@ function toLowPrecision(input, precision = 11) {
53
65
  // dist/utils/setup-gl.js
54
66
  var import_test_utils = require("@luma.gl/test-utils");
55
67
  var device = import_test_utils.webglDevice || new import_test_utils.NullDevice({});
56
- var gl = (0, import_test_utils.createTestContext)({
57
- width: 1,
58
- height: 1,
59
- debug: true
60
- });
68
+ var _a;
69
+ var gl = ((_a = import_test_utils.webglDevice) == null ? void 0 : _a.gl) || 1;
61
70
  globalThis.glContext = globalThis.glContext || gl;
62
71
 
63
72
  // dist/lifecycle-test.js
@@ -269,6 +278,7 @@ function generateLayerTests({ Layer, sampleProps = {}, assert = defaultAssert, o
269
278
  },
270
279
  {
271
280
  title: "Null data",
281
+ // @ts-expect-error null may not be an expected data type
272
282
  updateProps: { data: null }
273
283
  },
274
284
  {
@@ -432,12 +442,18 @@ var DEFAULT_DECK_PROPS = {
432
442
  debug: true
433
443
  };
434
444
  var DEFAULT_TEST_OPTIONS = {
445
+ // test lifecycle callback
435
446
  onTestStart: (testCase) => console.log(`# ${testCase.name}`),
436
447
  onTestPass: (testCase) => console.log(`ok ${testCase.name} passed`),
437
448
  onTestFail: (testCase) => console.log(`not ok ${testCase.name} failed`),
449
+ // milliseconds to wait for each test case before aborting
438
450
  timeout: 2e3
439
451
  };
440
452
  var TestRunner = class {
453
+ /**
454
+ * props
455
+ * Deck props
456
+ */
441
457
  constructor(props = {}, options) {
442
458
  this.deck = null;
443
459
  this.isRunning = false;
@@ -451,6 +467,9 @@ var TestRunner = class {
451
467
  get defaultTestCase() {
452
468
  throw new Error("Not implemented");
453
469
  }
470
+ /**
471
+ * Add testCase(s)
472
+ */
454
473
  add(testCases) {
455
474
  if (!Array.isArray(testCases)) {
456
475
  testCases = [testCases];
@@ -460,6 +479,9 @@ var TestRunner = class {
460
479
  }
461
480
  return this;
462
481
  }
482
+ /**
483
+ * Returns a promise that resolves when all the test cases are done
484
+ */
463
485
  run(options = {}) {
464
486
  Object.assign(this.testOptions, options);
465
487
  return new Promise((resolve, reject) => {
@@ -483,6 +505,7 @@ var TestRunner = class {
483
505
  this.deck = null;
484
506
  });
485
507
  }
508
+ /* Lifecycle methods for subclassing */
486
509
  initTestCase(testCase) {
487
510
  for (const key in this.defaultTestCase) {
488
511
  if (!(key in testCase)) {
@@ -491,12 +514,14 @@ var TestRunner = class {
491
514
  }
492
515
  this.testOptions.onTestStart(testCase);
493
516
  }
517
+ /* Utilities */
494
518
  pass(result) {
495
519
  this.testOptions.onTestPass(this._currentTestCase, result);
496
520
  }
497
521
  fail(result) {
498
522
  this.testOptions.onTestFail(this._currentTestCase, result);
499
523
  }
524
+ /* Private Methods */
500
525
  _onDeviceInitialized(device2) {
501
526
  this.gpuVendor = device2.info.vendor;
502
527
  }
@@ -542,8 +567,11 @@ var DEFAULT_TEST_CASE = {
542
567
  onBeforeRender: ({ deck, layers }) => {
543
568
  },
544
569
  onAfterRender: ({ deck, layers, done }) => {
545
- var _a;
546
- if (!((_a = deck.layerManager) == null ? void 0 : _a.needsUpdate()) && layers.every((layer) => layer.isLoaded)) {
570
+ var _a2;
571
+ if (
572
+ // @ts-expect-error accessing private
573
+ !((_a2 = deck.layerManager) == null ? void 0 : _a2.needsUpdate()) && layers.every((layer) => layer.isLoaded)
574
+ ) {
547
575
  done();
548
576
  }
549
577
  },
@@ -573,12 +601,14 @@ var SnapshotTestRunner = class extends TestRunner {
573
601
  onBeforeRender: () => {
574
602
  testCase.onBeforeRender({
575
603
  deck,
604
+ // @ts-expect-error Accessing protected layerManager
576
605
  layers: this.deck.layerManager.getLayers()
577
606
  });
578
607
  },
579
608
  onAfterRender: () => {
580
609
  testCase.onAfterRender({
581
610
  deck,
611
+ // @ts-expect-error Accessing protected layerManager
582
612
  layers: this.deck.layerManager.getLayers(),
583
613
  done: resolve
584
614
  });
@@ -587,6 +617,7 @@ var SnapshotTestRunner = class extends TestRunner {
587
617
  });
588
618
  }
589
619
  async assert(testCase) {
620
+ var _a2, _b;
590
621
  if (this._isDiffing) {
591
622
  return;
592
623
  }
@@ -598,7 +629,13 @@ var SnapshotTestRunner = class extends TestRunner {
598
629
  region: getBoundingBoxInPage(this.deck.getCanvas())
599
630
  };
600
631
  const result = await window.browserTestDriver_captureAndDiffScreen(diffOptions);
601
- if (result.success) {
632
+ let resultOverride;
633
+ const platform = (_b = (_a2 = this.testOptions.imageDiffOptions) == null ? void 0 : _a2.platform) == null ? void 0 : _b.toLowerCase();
634
+ if (!result.success) {
635
+ diffOptions.goldenImage = diffOptions.goldenImage.replace("golden-images/", `golden-images/platform-overrides/${platform}/`);
636
+ resultOverride = await window.browserTestDriver_captureAndDiffScreen(diffOptions);
637
+ }
638
+ if (result.success || resultOverride.success) {
602
639
  this.pass(result);
603
640
  } else {
604
641
  this.fail(result);
@@ -623,6 +660,7 @@ var InteractionTestRunner = class extends TestRunner {
623
660
  get defaultTestCase() {
624
661
  return DEFAULT_TEST_CASE2;
625
662
  }
663
+ // chain events
626
664
  async runTestCase(testCase) {
627
665
  testCase.context = testCase.onBeforeEvents({
628
666
  deck: this.deck
@@ -638,6 +676,7 @@ var InteractionTestRunner = class extends TestRunner {
638
676
  async assert(testCase) {
639
677
  testCase.onAfterEvents({
640
678
  deck: this.deck,
679
+ // @ts-expect-error Accessing protected layerManager
641
680
  layers: this.deck.layerManager.getLayers(),
642
681
  context: testCase.context
643
682
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["index.js", "utils/precision.js", "utils/setup-gl.js", "lifecycle-test.js", "generate-layer-tests.js", "test-runner.js", "utils/dom.js", "snapshot-test-runner.js", "interaction-test-runner.js"],
4
- "sourcesContent": ["export { toLowPrecision } from \"./utils/precision.js\";\nexport { gl, device } from \"./utils/setup-gl.js\";\n// Utilities for update tests (lifecycle tests)\nexport { testLayer, testLayerAsync, testInitializeLayer, testInitializeLayerAsync } from \"./lifecycle-test.js\";\nexport { generateLayerTests } from \"./generate-layer-tests.js\";\n// Basic utility for rendering multiple scenes (could go into \"deck.gl/core\")\nexport { TestRunner } from \"./test-runner.js\";\n// A utility that renders a list of scenes and compares against golden images\nexport { SnapshotTestRunner } from \"./snapshot-test-runner.js\";\n// A utility that emulates input events\nexport { InteractionTestRunner } from \"./interaction-test-runner.js\";\n", "/**\n * Covert all numbers in a deep structure to a given precision, allowing\n * reliable float comparisons. Converts data in-place.\n */\nexport function toLowPrecision(input, precision = 11) {\n /* eslint-disable guard-for-in */\n if (typeof input === 'number') {\n return Number(input.toPrecision(precision));\n }\n if (Array.isArray(input)) {\n return input.map(item => toLowPrecision(item, precision));\n }\n if (typeof input === 'object') {\n for (const key in input) {\n input[key] = toLowPrecision(input[key], precision);\n }\n }\n return input;\n}\n", "import { createTestContext, webglDevice, NullDevice } from '@luma.gl/test-utils';\n/** Test device */\nexport const device = webglDevice || new NullDevice({});\n/** Test context */\nexport const gl = createTestContext({\n width: 1,\n height: 1,\n debug: true\n // throwOnFailure: false,\n // throwOnError: false\n});\n// // TODO - Seems to be an issue in luma.gl\n// (createContext && createContext(100, 100, {}));\n// // console.log('Context', globalThis.glContext);\nglobalThis.glContext = globalThis.glContext || gl;\n", "// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport { LayerManager, MapView, DeckRenderer } from '@deck.gl/core';\nimport { makeSpy } from '@probe.gl/test-utils';\nimport { device } from \"./utils/setup-gl.js\";\nconst testViewport = new MapView({}).makeViewport({\n width: 100,\n height: 100,\n viewState: { longitude: 0, latitude: 0, zoom: 1 }\n});\nfunction defaultOnError(error, title) {\n if (error) {\n throw error;\n }\n}\nfunction initializeLayerManager({ layer, viewport = testViewport, onError = defaultOnError }) {\n const layerManager = new LayerManager(device, { viewport });\n layerManager.setProps({\n onError: error => onError(error, `initializing ${layer.id}`)\n });\n layerManager.setLayers([layer]);\n return layerManager;\n}\nexport function testInitializeLayer(opts) {\n const layerManager = initializeLayerManager(opts);\n if (opts.finalize === false) {\n return {\n finalize: () => layerManager.finalize()\n };\n }\n layerManager.finalize();\n return null;\n}\nexport async function testInitializeLayerAsync(opts) {\n const layerManager = initializeLayerManager(opts);\n const deckRenderer = new DeckRenderer(device);\n while (!opts.layer.isLoaded) {\n await update({ layerManager, deckRenderer, oldResourceCounts: {} });\n }\n if (opts.finalize === false) {\n return {\n finalize: () => layerManager.finalize()\n };\n }\n layerManager.finalize();\n return null;\n}\n/**\n * Initialize and updates a layer over a sequence of scenarios (test cases).\n * Use `testLayerAsync` if the layer's update flow contains async operations.\n */\nexport function testLayer(opts) {\n const { Layer, testCases = [], spies = [], onError = defaultOnError } = opts;\n const resources = setupLayerTests(`testing ${Layer.layerName}`, opts);\n let layer = new Layer();\n // Run successive update tests\n for (const testCase of testCases) {\n // Save old state before update\n const oldState = { ...layer.state };\n const { layer: newLayer, spyMap } = runLayerTestUpdate(testCase, resources, layer, spies);\n runLayerTestPostUpdateCheck(testCase, newLayer, oldState, spyMap);\n // Remove spies\n Object.keys(spyMap).forEach(k => spyMap[k].reset());\n layer = newLayer;\n }\n const error = cleanupAfterLayerTests(resources);\n if (error) {\n onError(error, `${Layer.layerName} should delete all resources`);\n }\n}\n/**\n * Initialize and updates a layer over a sequence of scenarios (test cases).\n * Each test case is awaited until the layer's isLoaded flag is true.\n */\nexport async function testLayerAsync(opts) {\n const { Layer, testCases = [], spies = [], onError = defaultOnError } = opts;\n const resources = setupLayerTests(`testing ${Layer.layerName}`, opts);\n let layer = new Layer();\n // Run successive update tests\n for (const testCase of testCases) {\n // Save old state before update\n const oldState = { ...layer.state };\n const { layer: newLayer, spyMap } = runLayerTestUpdate(testCase, resources, layer, spies);\n runLayerTestPostUpdateCheck(testCase, newLayer, oldState, spyMap);\n while (!newLayer.isLoaded) {\n await update(resources);\n runLayerTestPostUpdateCheck(testCase, newLayer, oldState, spyMap);\n }\n // Remove spies\n Object.keys(spyMap).forEach(k => spyMap[k].reset());\n layer = newLayer;\n }\n const error = cleanupAfterLayerTests(resources);\n if (error) {\n onError(error, `${Layer.layerName} should delete all resources`);\n }\n}\nfunction setupLayerTests(testTitle, { viewport = testViewport, timeline, onError = defaultOnError }) {\n const oldResourceCounts = getResourceCounts();\n const layerManager = new LayerManager(device, { viewport, timeline });\n const deckRenderer = new DeckRenderer(device);\n const props = {\n layerFilter: null,\n drawPickingColors: false,\n onError: error => onError(error, testTitle)\n };\n layerManager.setProps(props);\n deckRenderer.setProps(props);\n return { layerManager, deckRenderer, oldResourceCounts };\n}\nfunction cleanupAfterLayerTests({ layerManager, deckRenderer, oldResourceCounts }) {\n layerManager.setLayers([]);\n layerManager.finalize();\n deckRenderer.finalize();\n const resourceCounts = getResourceCounts();\n for (const resourceName in resourceCounts) {\n if (resourceCounts[resourceName] !== oldResourceCounts[resourceName]) {\n return new Error(`${resourceCounts[resourceName] - oldResourceCounts[resourceName]} ${resourceName}s`);\n }\n }\n return null;\n}\nfunction getResourceCounts() {\n /* global luma */\n const resourceStats = luma.stats.get('Resource Counts');\n return {\n Texture2D: resourceStats.get('Texture2Ds Active').count,\n Buffer: resourceStats.get('Buffers Active').count\n };\n}\nfunction injectSpies(layer, spies) {\n const spyMap = {};\n if (spies) {\n for (const functionName of spies) {\n spyMap[functionName] = makeSpy(Object.getPrototypeOf(layer), functionName);\n }\n }\n return spyMap;\n}\nfunction runLayerTestPostUpdateCheck(testCase, newLayer, oldState, spyMap) {\n // assert on updated layer\n if (testCase.onAfterUpdate) {\n // layer manager should handle match subLayer and tranfer state and props\n // here we assume subLayer matches copy over the new props from a new subLayer\n const subLayers = newLayer.isComposite\n ? newLayer.getSubLayers()\n : [];\n const subLayer = subLayers.length ? subLayers[0] : null;\n testCase.onAfterUpdate({\n testCase,\n layer: newLayer,\n oldState,\n subLayers,\n subLayer,\n spies: spyMap\n });\n }\n}\nfunction runLayerTestUpdate(testCase, { layerManager, deckRenderer }, layer, spies) {\n const { props, updateProps, onBeforeUpdate, viewport = layerManager.context.viewport } = testCase;\n if (onBeforeUpdate) {\n onBeforeUpdate({ layer, testCase });\n }\n if (props) {\n // Test case can reset the props on every iteration\n layer = new layer.constructor(props);\n }\n else if (updateProps) {\n // Test case can override with new props on every iteration\n layer = layer.clone(updateProps);\n }\n // Create a map of spies that the test case can inspect\n spies = testCase.spies || spies;\n const spyMap = injectSpies(layer, spies);\n const drawLayers = () => {\n deckRenderer.renderLayers({\n pass: 'test',\n views: {},\n effects: [],\n viewports: [viewport],\n layers: layerManager.getLayers(),\n onViewportActive: layerManager.activateViewport\n });\n };\n layerManager.setLayers([layer]);\n drawLayers();\n // clear update flags set by viewport change, if any\n if (layerManager.needsUpdate()) {\n layerManager.updateLayers();\n drawLayers();\n }\n return { layer, spyMap };\n}\n/* global setTimeout */\nfunction update({ layerManager, deckRenderer }) {\n return new Promise(resolve => {\n const onAnimationFrame = () => {\n if (layerManager.needsUpdate()) {\n layerManager.updateLayers();\n deckRenderer.renderLayers({\n pass: 'test',\n views: {},\n effects: [],\n viewports: [layerManager.context.viewport],\n layers: layerManager.getLayers(),\n onViewportActive: layerManager.activateViewport\n });\n resolve();\n return;\n }\n setTimeout(onAnimationFrame, 50);\n };\n onAnimationFrame();\n });\n}\n", "// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport { _count as count } from '@deck.gl/core';\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nfunction noop() { }\nfunction defaultAssert(condition, comment) {\n if (!condition) {\n throw new Error(comment);\n }\n}\n// Automatically generate testLayer test cases\nexport function generateLayerTests({ Layer, sampleProps = {}, assert = defaultAssert, onBeforeUpdate = noop, onAfterUpdate = noop, runDefaultAsserts = true }) {\n assert(Layer.layerName, 'Layer should have display name');\n function wrapTestCaseTitle(title) {\n return `${Layer.layerName}#${title}`;\n }\n const testCases = [\n {\n title: 'Empty props',\n props: {}\n },\n {\n title: 'Null data',\n // @ts-expect-error null may not be an expected data type\n updateProps: { data: null }\n },\n {\n title: 'Sample data',\n updateProps: sampleProps\n }\n ];\n try {\n // Calling constructor for the first time resolves default props\n // eslint-disable-next-line\n new Layer({});\n }\n catch (error) {\n assert(false, `Construct ${Layer.layerName} throws: ${error.message}`);\n }\n // @ts-expect-error Access hidden properties\n const { _propTypes: propTypes, _mergedDefaultProps: defaultProps } = Layer;\n // Test alternative data formats\n testCases.push(...makeAltDataTestCases(sampleProps, propTypes));\n for (const propName in Layer.defaultProps) {\n if (!(propName in sampleProps)) {\n // Do not override user provided props - they may be layer-specific\n const newTestCase = makeAltPropTestCase({ propName, propTypes, defaultProps, sampleProps, assert }) || [];\n testCases.push(...newTestCase);\n }\n }\n testCases.forEach(testCase => {\n testCase.title = wrapTestCaseTitle(testCase.title);\n const beforeFunc = testCase.onBeforeUpdate || noop;\n const afterFunc = testCase.onAfterUpdate || noop;\n testCase.onBeforeUpdate = params => {\n // Generated callback\n beforeFunc(params);\n // User callback\n onBeforeUpdate(params);\n };\n testCase.onAfterUpdate = params => {\n // Generated callback\n afterFunc(params);\n // User callback\n onAfterUpdate(params);\n // Default assert\n if (runDefaultAsserts) {\n if (params.layer.isComposite) {\n const { data } = params.layer.props;\n if (data && typeof data === 'object' && count(data)) {\n assert(params.subLayers.length, 'Layer should have sublayers');\n }\n }\n else {\n assert(params.layer.getModels().length, 'Layer should have models');\n }\n }\n };\n });\n return testCases;\n}\nfunction makeAltPropTestCase({ propName, propTypes, defaultProps, sampleProps, assert }) {\n const newProps = { ...sampleProps };\n const propDef = propTypes[propName];\n if (!propDef) {\n return null;\n }\n switch (propDef.type) {\n case 'boolean':\n newProps[propName] = !defaultProps[propName];\n return [\n {\n title: `${propName}: ${String(newProps[propName])}`,\n props: newProps\n }\n ];\n case 'number':\n if ('max' in propDef) {\n newProps[propName] = propDef.max;\n }\n else if ('min' in propDef) {\n newProps[propName] = propDef.min;\n }\n else {\n newProps[propName] = defaultProps[propName] + 1;\n }\n return [\n {\n title: `${propName}: ${String(newProps[propName])}`,\n props: newProps\n }\n ];\n case 'accessor': {\n if (typeof defaultProps[propName] === 'function') {\n return null;\n }\n let callCount = 0;\n newProps[propName] = () => {\n callCount++;\n return defaultProps[propName];\n };\n newProps.updateTriggers = {\n [propName]: 'function'\n };\n const onBeforeUpdate = () => (callCount = 0);\n const onAfterUpdate = () => assert(callCount > 0, 'accessor function is called');\n return [\n {\n title: `${propName}: () => ${defaultProps[propName]}`,\n props: newProps,\n onBeforeUpdate,\n onAfterUpdate\n },\n {\n title: `${propName}: updateTrigger`,\n updateProps: {\n updateTriggers: {\n [propName]: 'function+trigger'\n }\n },\n onBeforeUpdate,\n onAfterUpdate\n }\n ];\n }\n default:\n return null;\n }\n}\nfunction makeAltDataTestCases(props, propTypes) {\n const originalData = props.data;\n if (!Array.isArray(originalData)) {\n return [];\n }\n // partial update\n const partialUpdateProps = {\n data: originalData.slice(),\n _dataDiff: () => [{ startRow: 0, endRow: 2 }]\n };\n // data should support any iterable\n const genIterableProps = {\n data: new Set(originalData),\n _dataDiff: null\n };\n // data in non-iterable form\n const nonIterableProps = {\n data: {\n length: originalData.length\n }\n };\n for (const propName in props) {\n // @ts-ignore propName cannot be used as index\n if (propTypes[propName].type === 'accessor') {\n // @ts-ignore propName cannot be used as index\n nonIterableProps[propName] = (_, info) => props[propName](originalData[info.index], info);\n }\n }\n return [\n {\n title: 'Partial update',\n updateProps: partialUpdateProps\n },\n {\n title: 'Generic iterable data',\n updateProps: genIterableProps\n },\n {\n title: 'non-iterable data',\n updateProps: nonIterableProps\n }\n ];\n}\n", "// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n/* global window, console, setTimeout */\n/* eslint-disable no-console */\nimport { Deck, MapView } from '@deck.gl/core';\nconst DEFAULT_DECK_PROPS = {\n ...Deck.defaultProps,\n id: 'deckgl-render-test',\n width: 800,\n height: 450,\n style: { position: 'absolute', left: '0px', top: '0px' },\n views: [new MapView({})],\n useDevicePixels: false,\n debug: true\n};\nconst DEFAULT_TEST_OPTIONS = {\n // test lifecycle callback\n onTestStart: testCase => console.log(`# ${testCase.name}`),\n onTestPass: testCase => console.log(`ok ${testCase.name} passed`),\n onTestFail: testCase => console.log(`not ok ${testCase.name} failed`),\n // milliseconds to wait for each test case before aborting\n timeout: 2000\n};\nexport class TestRunner {\n /**\n * props\n * Deck props\n */\n constructor(props = {}, options) {\n this.deck = null;\n this.isRunning = false;\n this._testCases = [];\n this._currentTestCase = null;\n this._testCaseData = null;\n this.props = { ...DEFAULT_DECK_PROPS, ...props };\n // @ts-ignore browserTestDriver_isHeadless is injected by @probe.gl/test-utils if running in headless browser\n this.isHeadless = Boolean(window.browserTestDriver_isHeadless);\n this.testOptions = { ...DEFAULT_TEST_OPTIONS, ...options };\n }\n get defaultTestCase() {\n throw new Error('Not implemented');\n }\n /**\n * Add testCase(s)\n */\n add(testCases) {\n if (!Array.isArray(testCases)) {\n testCases = [testCases];\n }\n for (const testCase of testCases) {\n this._testCases.push(testCase);\n }\n return this;\n }\n /**\n * Returns a promise that resolves when all the test cases are done\n */\n run(options = {}) {\n Object.assign(this.testOptions, options);\n return new Promise((resolve, reject) => {\n this.deck = new Deck({\n ...this.props,\n onDeviceInitialized: this._onDeviceInitialized.bind(this),\n onLoad: resolve\n });\n this.isRunning = true;\n this._currentTestCase = null;\n })\n .then(() => {\n let promise = Promise.resolve();\n // chain test case promises\n this._testCases.forEach(testCase => {\n promise = promise.then(() => this._runTest(testCase));\n });\n return promise;\n })\n .catch((error) => {\n this.fail({ error: error.message });\n })\n .finally(() => {\n this.deck.finalize();\n this.deck = null;\n });\n }\n /* Lifecycle methods for subclassing */\n initTestCase(testCase) {\n for (const key in this.defaultTestCase) {\n if (!(key in testCase)) {\n testCase[key] = this.defaultTestCase[key];\n }\n }\n this.testOptions.onTestStart(testCase);\n }\n /* Utilities */\n pass(result) {\n this.testOptions.onTestPass(this._currentTestCase, result);\n }\n fail(result) {\n this.testOptions.onTestFail(this._currentTestCase, result);\n }\n /* Private Methods */\n _onDeviceInitialized(device) {\n this.gpuVendor = device.info.vendor;\n }\n async _runTest(testCase) {\n this._currentTestCase = testCase;\n // normalize test case\n this.initTestCase(testCase);\n const timeout = testCase.timeout || this.testOptions.timeout;\n const task = this.runTestCase(testCase);\n const timeoutTask = new Promise((_, reject) => {\n setTimeout(() => {\n reject('Timeout');\n }, timeout);\n });\n try {\n await Promise.race([task, timeoutTask]);\n await this.assert(testCase);\n }\n catch (err) {\n if (err === 'Timeout') {\n this.fail({ error: 'Timeout' });\n }\n }\n }\n}\n", "/* global window */\n// Get the bounding box of a DOMElement relative to the page\nexport function getBoundingBoxInPage(domElement) {\n const bbox = domElement.getBoundingClientRect();\n return {\n x: window.scrollX + bbox.x,\n y: window.scrollY + bbox.y,\n width: bbox.width,\n height: bbox.height\n };\n}\n", "// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n/* global window */\nimport { TestRunner } from \"./test-runner.js\";\nimport { getBoundingBoxInPage } from \"./utils/dom.js\";\nconst DEFAULT_TEST_OPTIONS = {\n imageDiffOptions: {}\n};\nconst DEFAULT_TEST_CASE = {\n name: 'Unnamed snapshot test',\n props: {},\n onBeforeRender: ({ deck, layers }) => {\n // eslint-disable-line\n },\n onAfterRender: ({ deck, layers, done }) => {\n if (\n // @ts-expect-error accessing private\n !deck.layerManager?.needsUpdate() &&\n layers.every(layer => layer.isLoaded)) {\n done(); // eslint-disable-line\n }\n },\n goldenImage: ''\n};\nexport class SnapshotTestRunner extends TestRunner {\n constructor(props) {\n super(props, DEFAULT_TEST_OPTIONS);\n this._isDiffing = false;\n this._isDiffing = false;\n }\n get defaultTestCase() {\n return DEFAULT_TEST_CASE;\n }\n initTestCase(testCase) {\n super.initTestCase(testCase);\n if (!testCase.goldenImage) {\n throw new Error(`Test case ${testCase.name} does not have golden image`);\n }\n }\n runTestCase(testCase) {\n const deck = this.deck;\n return new Promise(resolve => {\n deck.setProps({\n ...this.props,\n ...testCase,\n onBeforeRender: () => {\n testCase.onBeforeRender({\n deck,\n // @ts-expect-error Accessing protected layerManager\n layers: this.deck.layerManager.getLayers()\n });\n },\n onAfterRender: () => {\n testCase.onAfterRender({\n deck,\n // @ts-expect-error Accessing protected layerManager\n layers: this.deck.layerManager.getLayers(),\n done: resolve\n });\n }\n });\n });\n }\n async assert(testCase) {\n if (this._isDiffing) {\n // already performing diffing\n return;\n }\n this._isDiffing = true;\n const diffOptions = {\n ...this.testOptions.imageDiffOptions,\n ...testCase.imageDiffOptions,\n goldenImage: testCase.goldenImage,\n region: getBoundingBoxInPage(this.deck.getCanvas())\n };\n // Take screenshot and compare\n const result = await window.browserTestDriver_captureAndDiffScreen(diffOptions);\n // invoke user callback\n if (result.success) {\n this.pass(result);\n }\n else {\n this.fail(result);\n }\n this._isDiffing = false;\n }\n}\n", "// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n/* global window */\nimport { TestRunner } from \"./test-runner.js\";\nconst DEFAULT_TEST_CASE = {\n name: 'Unnamed interaction test',\n events: [],\n onBeforeEvents: ({ deck }) => { },\n onAfterEvents: ({ deck, layers, context }) => { }\n};\nfunction sleep(timeout) {\n return new Promise(resolve => window.setTimeout(resolve, timeout));\n}\nexport class InteractionTestRunner extends TestRunner {\n get defaultTestCase() {\n return DEFAULT_TEST_CASE;\n }\n // chain events\n async runTestCase(testCase) {\n testCase.context = testCase.onBeforeEvents({\n deck: this.deck\n });\n for (const event of testCase.events) {\n if (event.wait) {\n await sleep(event.wait);\n }\n else {\n await window.browserTestDriver_emulateInput(event);\n }\n }\n }\n async assert(testCase) {\n testCase.onAfterEvents({\n deck: this.deck,\n // @ts-expect-error Accessing protected layerManager\n layers: this.deck.layerManager.getLayers(),\n context: testCase.context\n });\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACIO,SAAS,eAAe,OAAO,YAAY,IAAI;AAElD,MAAI,OAAO,UAAU,UAAU;AAC3B,WAAO,OAAO,MAAM,YAAY,SAAS,CAAC;AAAA,EAC9C;AACA,MAAI,MAAM,QAAQ,KAAK,GAAG;AACtB,WAAO,MAAM,IAAI,UAAQ,eAAe,MAAM,SAAS,CAAC;AAAA,EAC5D;AACA,MAAI,OAAO,UAAU,UAAU;AAC3B,eAAW,OAAO,OAAO;AACrB,YAAM,OAAO,eAAe,MAAM,MAAM,SAAS;AAAA,IACrD;AAAA,EACJ;AACA,SAAO;AACX;;;AClBA,wBAA2D;AAEpD,IAAM,SAAS,iCAAe,IAAI,6BAAW,CAAC,CAAC;AAE/C,IAAM,SAAK,qCAAkB;AAAA,EAChC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAGX,CAAC;AAID,WAAW,YAAY,WAAW,aAAa;;;ACK/C,kBAAoD;AACpD,IAAAA,qBAAwB;AAExB,IAAM,eAAe,IAAI,oBAAQ,CAAC,CAAC,EAAE,aAAa;AAAA,EAC9C,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,WAAW,EAAE,WAAW,GAAG,UAAU,GAAG,MAAM,EAAE;AACpD,CAAC;AACD,SAAS,eAAe,OAAO,OAAO;AAClC,MAAI,OAAO;AACP,UAAM;AAAA,EACV;AACJ;AACA,SAAS,uBAAuB,EAAE,OAAO,WAAW,cAAc,UAAU,eAAe,GAAG;AAC1F,QAAM,eAAe,IAAI,yBAAa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AAK,aAAa,UAAU;AAAA,MACzC,SAAS,SAAS;AAAA,IACtB,CAAC;AAAA,EACL;AACJ;",
6
- "names": ["import_test_utils", "import_core", "count", "import_core", "device", "DEFAULT_TEST_OPTIONS", "DEFAULT_TEST_CASE"]
3
+ "sources": ["../src/index.ts", "../src/utils/layer.ts", "../src/utils/precision.ts", "../src/utils/setup-gl.ts", "../src/lifecycle-test.ts", "../src/generate-layer-tests.ts", "../src/test-runner.ts", "../src/utils/dom.ts", "../src/snapshot-test-runner.ts", "../src/interaction-test-runner.ts"],
4
+ "sourcesContent": ["// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nexport {getLayerUniforms} from './utils/layer';\nexport {toLowPrecision} from './utils/precision';\nexport {gl, device} from './utils/setup-gl';\n\n// Utilities for update tests (lifecycle tests)\nexport {\n testLayer,\n testLayerAsync,\n testInitializeLayer,\n testInitializeLayerAsync\n} from './lifecycle-test';\nexport {generateLayerTests} from './generate-layer-tests';\n\n// Basic utility for rendering multiple scenes (could go into \"deck.gl/core\")\nexport {TestRunner} from './test-runner';\n\n// A utility that renders a list of scenes and compares against golden images\nexport {SnapshotTestRunner} from './snapshot-test-runner';\n// A utility that emulates input events\nexport {InteractionTestRunner} from './interaction-test-runner';\n\nexport type {LayerTestCase} from './lifecycle-test';\nexport type {SnapshotTestCase} from './snapshot-test-runner';\nexport type {InteractionTestCase} from './interaction-test-runner';\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {UniformValue} from '@luma.gl/core';\nimport {Layer} from '@deck.gl/core';\n\n/**\n * Extract uniform values set for a Layer in the underlying UniformBlock store\n */\nexport function getLayerUniforms(layer: Layer, blockName?: string): Record<string, UniformValue> {\n const uniforms = {};\n const uniformStore = layer.getModels()[0]._uniformStore;\n const uniformBlocks = blockName\n ? [uniformStore.uniformBlocks.get(blockName)]\n : uniformStore.uniformBlocks.values();\n for (const block of uniformBlocks) {\n Object.assign(uniforms, block!.uniforms);\n }\n\n return uniforms;\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nexport function toLowPrecision(input: number, precision?: number): number;\nexport function toLowPrecision(input: number[], precision?: number): number[];\nexport function toLowPrecision(\n input: Record<string, number>,\n precision?: number\n): Record<string, number>;\n\n/**\n * Covert all numbers in a deep structure to a given precision, allowing\n * reliable float comparisons. Converts data in-place.\n */\nexport function toLowPrecision(\n input: number | number[] | Record<string, number>,\n precision: number = 11\n): number | number[] | Record<string, number> {\n /* eslint-disable guard-for-in */\n if (typeof input === 'number') {\n return Number(input.toPrecision(precision));\n }\n if (Array.isArray(input)) {\n return input.map(item => toLowPrecision(item, precision));\n }\n if (typeof input === 'object') {\n for (const key in input) {\n input[key] = toLowPrecision(input[key], precision);\n }\n }\n return input;\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {webglDevice, NullDevice} from '@luma.gl/test-utils';\n\n/** Test device */\nexport const device = webglDevice || new NullDevice({});\n\nexport const gl = webglDevice?.gl || 1;\n\nglobalThis.glContext = globalThis.glContext || gl;\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {LayerManager, MapView, DeckRenderer} from '@deck.gl/core';\n\nimport {makeSpy} from '@probe.gl/test-utils';\nimport {device} from './utils/setup-gl';\n\nimport type {Layer, CompositeLayer, Viewport} from '@deck.gl/core';\nimport type {Timeline} from '@luma.gl/engine';\nimport type {StatsManager} from '@luma.gl/core';\n\nconst testViewport = new MapView({}).makeViewport({\n width: 100,\n height: 100,\n viewState: {longitude: 0, latitude: 0, zoom: 1}\n}) as Viewport;\n\nfunction defaultOnError(error: unknown, title: string): void {\n if (error) {\n throw error;\n }\n}\n\ntype InitializeLayerTestOptions = {\n /** The layer instance to test */\n layer: Layer;\n /** The initial viewport\n * @default WebMercatorViewport\n */\n viewport?: Viewport;\n /** Callback if any error is thrown */\n onError?: (error: unknown, title: string) => void;\n};\n\nfunction initializeLayerManager({\n layer,\n viewport = testViewport,\n onError = defaultOnError\n}: InitializeLayerTestOptions): LayerManager {\n const layerManager = new LayerManager(device, {viewport});\n layerManager.setProps({\n onError: error => onError(error, `initializing ${layer.id}`)\n });\n\n layerManager.setLayers([layer]);\n return layerManager;\n}\n\n/** Test that initializing a layer does not throw.\n * Use `testInitializeLayerAsync` if the layer's initialization flow contains async operations.\n */\nexport function testInitializeLayer(\n opts: InitializeLayerTestOptions & {\n /** Automatically finalize the layer and release all resources after the test */\n finalize?: true;\n }\n): null;\nexport function testInitializeLayer(\n opts: InitializeLayerTestOptions & {\n /** Automatically finalize the layer and release all resources after the test */\n finalize: false;\n }\n): {\n /** Finalize the layer and release all resources */\n finalize: () => void;\n};\n\nexport function testInitializeLayer(\n opts: InitializeLayerTestOptions & {\n /** Automatically finalize the layer and release all resources after the test */\n finalize?: boolean;\n }\n): {\n /** Finalize the layer and release all resources */\n finalize: () => void;\n} | null {\n const layerManager = initializeLayerManager(opts);\n if (opts.finalize === false) {\n return {\n finalize: () => layerManager.finalize()\n };\n }\n layerManager.finalize();\n return null;\n}\n\n/** Test that initializing a layer does not throw.\n * Resolves when the layer's isLoaded flag becomes true.\n */\nexport function testInitializeLayerAsync(\n opts: InitializeLayerTestOptions & {\n /** Automatically finalize the layer and release all resources after the test */\n finalize?: true;\n }\n): Promise<null>;\nexport function testInitializeLayerAsync(\n opts: InitializeLayerTestOptions & {\n /** Automatically finalize the layer and release all resources after the test */\n finalize: false;\n }\n): Promise<{\n /** Finalize the layer and release all resources */\n finalize: () => void;\n}>;\n\nexport async function testInitializeLayerAsync(\n opts: InitializeLayerTestOptions & {\n /** Automatically finalize the layer and release all resources after the test */\n finalize?: boolean;\n }\n): Promise<{\n /** Finalize the layer and release all resources */\n finalize: () => void;\n} | null> {\n const layerManager = initializeLayerManager(opts);\n const deckRenderer = new DeckRenderer(device);\n while (!opts.layer.isLoaded) {\n await update({layerManager, deckRenderer, oldResourceCounts: {}});\n }\n if (opts.finalize === false) {\n return {\n finalize: () => layerManager.finalize()\n };\n }\n layerManager.finalize();\n return null;\n}\n\n// TODO - export from probe.gl\ntype Spy = ReturnType<typeof makeSpy>;\n\nexport type LayerClass<LayerT extends Layer> = {\n new (...args): LayerT;\n layerName: string;\n defaultProps: any;\n};\n\nexport type LayerTestCase<LayerT extends Layer> = {\n title: string;\n viewport?: Viewport;\n /** Reset the props of the test layer instance */\n props?: Partial<LayerT['props']>;\n /** Update the given props of the test layer instance */\n updateProps?: Partial<LayerT['props']>;\n /** List of layer method names to watch */\n spies?: string[];\n\n /** Called before layer updates */\n onBeforeUpdate?: (params: {layer: Layer; testCase: LayerTestCase<LayerT>}) => void;\n\n /** Called after layer is updated */\n onAfterUpdate?: (params: {\n testCase: LayerTestCase<LayerT>;\n layer: LayerT;\n oldState: any;\n subLayers: Layer[];\n subLayer: Layer | null;\n spies: Record<string, Spy>;\n }) => void;\n};\n\ntype TestResources = {\n layerManager: LayerManager;\n deckRenderer: DeckRenderer;\n oldResourceCounts: Record<string, number>;\n};\n\n/**\n * Initialize and updates a layer over a sequence of scenarios (test cases).\n * Use `testLayerAsync` if the layer's update flow contains async operations.\n */\nexport function testLayer<LayerT extends Layer>(opts: {\n /** The layer class to test against */\n Layer: LayerClass<LayerT>;\n /** The initial viewport\n * @default WebMercatorViewport\n */\n viewport?: Viewport;\n /**\n * If provided, used to controls time progression. Useful for testing transitions and animations.\n */\n timeline?: Timeline;\n testCases?: LayerTestCase<LayerT>[];\n /**\n * List of layer method names to watch\n */\n spies?: string[];\n /** Callback if any error is thrown */\n onError?: (error: Error, title: string) => void;\n}): void {\n const {Layer, testCases = [], spies = [], onError = defaultOnError} = opts;\n\n const resources = setupLayerTests(`testing ${Layer.layerName}`, opts);\n\n let layer = new Layer();\n // Run successive update tests\n for (const testCase of testCases) {\n // Save old state before update\n const oldState = {...layer.state};\n\n const {layer: newLayer, spyMap} = runLayerTestUpdate(testCase, resources, layer, spies);\n\n runLayerTestPostUpdateCheck(testCase, newLayer, oldState, spyMap);\n\n // Remove spies\n Object.keys(spyMap).forEach(k => spyMap[k].reset());\n layer = newLayer;\n }\n\n const error = cleanupAfterLayerTests(resources);\n if (error) {\n onError(error, `${Layer.layerName} should delete all resources`);\n }\n}\n\n/**\n * Initialize and updates a layer over a sequence of scenarios (test cases).\n * Each test case is awaited until the layer's isLoaded flag is true.\n */\nexport async function testLayerAsync<LayerT extends Layer>(opts: {\n /** The layer class to test against */\n Layer: LayerClass<LayerT>;\n /** The initial viewport\n * @default WebMercatorViewport\n */\n viewport?: Viewport;\n /**\n * If provided, used to controls time progression. Useful for testing transitions and animations.\n */\n timeline?: Timeline;\n testCases?: LayerTestCase<LayerT>[];\n /**\n * List of layer method names to watch\n */\n spies?: string[];\n /** Callback if any error is thrown */\n onError?: (error: Error, title: string) => void;\n}): Promise<void> {\n const {Layer, testCases = [], spies = [], onError = defaultOnError} = opts;\n\n const resources = setupLayerTests(`testing ${Layer.layerName}`, opts);\n\n let layer = new Layer();\n // Run successive update tests\n for (const testCase of testCases) {\n // Save old state before update\n const oldState = {...layer.state};\n\n const {layer: newLayer, spyMap} = runLayerTestUpdate(testCase, resources, layer, spies);\n\n runLayerTestPostUpdateCheck(testCase, newLayer, oldState, spyMap);\n\n while (!newLayer.isLoaded) {\n await update(resources);\n runLayerTestPostUpdateCheck(testCase, newLayer, oldState, spyMap);\n }\n\n // Remove spies\n Object.keys(spyMap).forEach(k => spyMap[k].reset());\n layer = newLayer;\n }\n\n const error = cleanupAfterLayerTests(resources);\n if (error) {\n onError(error, `${Layer.layerName} should delete all resources`);\n }\n}\n\nfunction setupLayerTests(\n testTitle: string,\n {\n viewport = testViewport,\n timeline,\n onError = defaultOnError\n }: {\n viewport?: Viewport;\n timeline?: Timeline;\n onError?: (error: Error, title: string) => void;\n }\n): TestResources {\n const oldResourceCounts = getResourceCounts();\n\n const layerManager = new LayerManager(device, {viewport, timeline});\n const deckRenderer = new DeckRenderer(device);\n\n const props = {\n layerFilter: null,\n drawPickingColors: false,\n onError: error => onError(error, testTitle)\n };\n layerManager.setProps(props);\n deckRenderer.setProps(props);\n\n return {layerManager, deckRenderer, oldResourceCounts};\n}\n\nfunction cleanupAfterLayerTests({\n layerManager,\n deckRenderer,\n oldResourceCounts\n}: TestResources): Error | null {\n layerManager.setLayers([]);\n layerManager.finalize();\n deckRenderer.finalize();\n\n const resourceCounts = getResourceCounts();\n\n for (const resourceName in resourceCounts) {\n if (resourceCounts[resourceName] !== oldResourceCounts[resourceName]) {\n return new Error(\n `${resourceCounts[resourceName] - oldResourceCounts[resourceName]} ${resourceName}s`\n );\n }\n }\n return null;\n}\n\nfunction getResourceCounts(): Record<string, number> {\n /* global luma */\n const resourceStats = (luma.stats as StatsManager).get('Resource Counts');\n return {\n Texture2D: resourceStats.get('Texture2Ds Active').count,\n Buffer: resourceStats.get('Buffers Active').count\n };\n}\n\nfunction injectSpies(layer: Layer, spies: string[]): Record<string, Spy> {\n const spyMap: Record<string, Spy> = {};\n if (spies) {\n for (const functionName of spies) {\n spyMap[functionName] = makeSpy(Object.getPrototypeOf(layer), functionName);\n }\n }\n return spyMap;\n}\n\nfunction runLayerTestPostUpdateCheck<LayerT extends Layer>(\n testCase: LayerTestCase<LayerT>,\n newLayer: LayerT,\n oldState: any,\n spyMap: Record<string, Spy>\n) {\n // assert on updated layer\n if (testCase.onAfterUpdate) {\n // layer manager should handle match subLayer and tranfer state and props\n // here we assume subLayer matches copy over the new props from a new subLayer\n const subLayers = newLayer.isComposite\n ? (newLayer as Layer as CompositeLayer).getSubLayers()\n : [];\n const subLayer = subLayers.length ? subLayers[0] : null;\n\n testCase.onAfterUpdate({\n testCase,\n layer: newLayer,\n oldState,\n subLayers,\n subLayer,\n spies: spyMap\n });\n }\n}\n\nfunction runLayerTestUpdate<LayerT extends Layer>(\n testCase: LayerTestCase<LayerT>,\n {layerManager, deckRenderer}: TestResources,\n layer: LayerT,\n spies: string[]\n): {\n layer: LayerT;\n spyMap: Record<string, Spy>;\n} {\n const {props, updateProps, onBeforeUpdate, viewport = layerManager.context.viewport} = testCase;\n\n if (onBeforeUpdate) {\n onBeforeUpdate({layer, testCase});\n }\n\n if (props) {\n // Test case can reset the props on every iteration\n layer = new (layer.constructor as LayerClass<LayerT>)(props);\n } else if (updateProps) {\n // Test case can override with new props on every iteration\n layer = layer.clone(updateProps);\n }\n\n // Create a map of spies that the test case can inspect\n spies = testCase.spies || spies;\n const spyMap = injectSpies(layer, spies);\n const drawLayers = () => {\n deckRenderer.renderLayers({\n pass: 'test',\n views: {},\n effects: [],\n viewports: [viewport],\n layers: layerManager.getLayers(),\n onViewportActive: layerManager.activateViewport\n });\n };\n\n layerManager.setLayers([layer]);\n drawLayers();\n\n // clear update flags set by viewport change, if any\n if (layerManager.needsUpdate()) {\n layerManager.updateLayers();\n drawLayers();\n }\n\n return {layer, spyMap};\n}\n\n/* global setTimeout */\nfunction update({layerManager, deckRenderer}: TestResources): Promise<void> {\n return new Promise(resolve => {\n const onAnimationFrame = () => {\n if (layerManager.needsUpdate()) {\n layerManager.updateLayers();\n\n deckRenderer.renderLayers({\n pass: 'test',\n views: {},\n effects: [],\n viewports: [layerManager.context.viewport],\n layers: layerManager.getLayers(),\n onViewportActive: layerManager.activateViewport\n });\n resolve();\n return;\n }\n\n setTimeout(onAnimationFrame, 50);\n };\n\n onAnimationFrame();\n });\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {_count as count, Layer} from '@deck.gl/core';\n\nimport type {DefaultProps} from '@deck.gl/core';\nimport type {LayerTestCase, LayerClass} from './lifecycle-test';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nfunction noop() {}\n\nfunction defaultAssert(condition: any, comment: string): void {\n if (!condition) {\n throw new Error(comment);\n }\n}\n\n// Automatically generate testLayer test cases\nexport function generateLayerTests<LayerT extends Layer>({\n Layer,\n sampleProps = {},\n assert = defaultAssert,\n onBeforeUpdate = noop,\n onAfterUpdate = noop,\n runDefaultAsserts = true\n}: {\n Layer: LayerClass<LayerT>;\n /**\n * Override default props during the test\n */\n sampleProps?: Partial<LayerT['props']>;\n assert?: (condition: any, comment: string) => void;\n onBeforeUpdate?: LayerTestCase<LayerT>['onBeforeUpdate'];\n onAfterUpdate?: LayerTestCase<LayerT>['onAfterUpdate'];\n\n /**\n * Test some typical assumptions after layer updates\n * For primitive layers, assert that layer has model(s).\n * For composite layers, assert that layer has sublayer(s).\n * @default true\n */\n runDefaultAsserts?: boolean;\n}): LayerTestCase<LayerT>[] {\n assert(Layer.layerName, 'Layer should have display name');\n\n function wrapTestCaseTitle(title: string): string {\n return `${Layer.layerName}#${title}`;\n }\n\n const testCases: LayerTestCase<LayerT>[] = [\n {\n title: 'Empty props',\n props: {}\n },\n {\n title: 'Null data',\n // @ts-expect-error null may not be an expected data type\n updateProps: {data: null}\n },\n {\n title: 'Sample data',\n updateProps: sampleProps\n }\n ];\n\n try {\n // Calling constructor for the first time resolves default props\n // eslint-disable-next-line\n new Layer({});\n } catch (error: unknown) {\n assert(false, `Construct ${Layer.layerName} throws: ${(error as Error).message}`);\n }\n\n // @ts-expect-error Access hidden properties\n const {_propTypes: propTypes, _mergedDefaultProps: defaultProps} = Layer;\n\n // Test alternative data formats\n testCases.push(...makeAltDataTestCases<LayerT>(sampleProps, propTypes));\n\n for (const propName in Layer.defaultProps) {\n if (!(propName in sampleProps)) {\n // Do not override user provided props - they may be layer-specific\n const newTestCase =\n makeAltPropTestCase({propName, propTypes, defaultProps, sampleProps, assert}) || [];\n testCases.push(...newTestCase);\n }\n }\n\n testCases.forEach(testCase => {\n testCase.title = wrapTestCaseTitle(testCase.title);\n const beforeFunc = testCase.onBeforeUpdate || noop;\n const afterFunc = testCase.onAfterUpdate || noop;\n testCase.onBeforeUpdate = params => {\n // Generated callback\n beforeFunc(params);\n // User callback\n onBeforeUpdate(params);\n };\n testCase.onAfterUpdate = params => {\n // Generated callback\n afterFunc(params);\n // User callback\n onAfterUpdate(params);\n\n // Default assert\n if (runDefaultAsserts) {\n if (params.layer.isComposite) {\n const {data} = params.layer.props;\n if (data && typeof data === 'object' && count(data)) {\n assert(params.subLayers.length, 'Layer should have sublayers');\n }\n } else {\n assert(params.layer.getModels().length, 'Layer should have models');\n }\n }\n };\n });\n\n return testCases;\n}\n\nfunction makeAltPropTestCase<LayerT extends Layer>({\n propName,\n propTypes,\n defaultProps,\n sampleProps,\n assert\n}: {\n propName: string;\n propTypes: DefaultProps<LayerT['props']>;\n defaultProps: LayerT['props'];\n sampleProps: Partial<LayerT['props']>;\n assert: (condition: any, comment: string) => void;\n}): LayerTestCase<LayerT>[] | null {\n const newProps = {...sampleProps};\n const propDef = propTypes[propName];\n\n if (!propDef) {\n return null;\n }\n\n switch (propDef.type) {\n case 'boolean':\n newProps[propName] = !defaultProps[propName];\n return [\n {\n title: `${propName}: ${String(newProps[propName])}`,\n props: newProps\n }\n ];\n\n case 'number':\n if ('max' in propDef) {\n newProps[propName] = propDef.max;\n } else if ('min' in propDef) {\n newProps[propName] = propDef.min;\n } else {\n newProps[propName] = defaultProps[propName] + 1;\n }\n return [\n {\n title: `${propName}: ${String(newProps[propName])}`,\n props: newProps\n }\n ];\n\n case 'accessor': {\n if (typeof defaultProps[propName] === 'function') {\n return null;\n }\n let callCount = 0;\n newProps[propName] = () => {\n callCount++;\n return defaultProps[propName];\n };\n newProps.updateTriggers = {\n [propName]: 'function'\n };\n const onBeforeUpdate = () => (callCount = 0);\n const onAfterUpdate = () => assert(callCount > 0, 'accessor function is called');\n\n return [\n {\n title: `${propName}: () => ${defaultProps[propName]}`,\n props: newProps,\n onBeforeUpdate,\n onAfterUpdate\n },\n {\n title: `${propName}: updateTrigger`,\n updateProps: {\n updateTriggers: {\n [propName]: 'function+trigger'\n }\n } as Partial<Layer['props']>,\n onBeforeUpdate,\n onAfterUpdate\n }\n ];\n }\n\n default:\n return null;\n }\n}\n\nfunction makeAltDataTestCases<LayerT extends Layer>(\n props: Partial<LayerT['props']>,\n propTypes: DefaultProps<LayerT['props']>\n): LayerTestCase<LayerT>[] {\n const originalData = props.data;\n if (!Array.isArray(originalData)) {\n return [];\n }\n // partial update\n const partialUpdateProps: Partial<Layer['props']> = {\n data: originalData.slice(),\n _dataDiff: () => [{startRow: 0, endRow: 2}]\n };\n // data should support any iterable\n const genIterableProps: Partial<Layer['props']> = {\n data: new Set(originalData),\n _dataDiff: null\n };\n // data in non-iterable form\n const nonIterableProps: Partial<Layer['props']> = {\n data: {\n length: originalData.length\n }\n };\n for (const propName in props) {\n // @ts-ignore propName cannot be used as index\n if (propTypes[propName].type === 'accessor') {\n // @ts-ignore propName cannot be used as index\n nonIterableProps[propName] = (_, info) => props[propName](originalData[info.index], info);\n }\n }\n\n return [\n {\n title: 'Partial update',\n updateProps: partialUpdateProps\n },\n {\n title: 'Generic iterable data',\n updateProps: genIterableProps\n },\n {\n title: 'non-iterable data',\n updateProps: nonIterableProps\n }\n ];\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n/* global window, console, setTimeout */\n/* eslint-disable no-console */\nimport {Deck, DeckProps, MapView} from '@deck.gl/core';\nimport type {Device} from '@luma.gl/core';\n\nconst DEFAULT_DECK_PROPS: DeckProps<any> = {\n ...Deck.defaultProps,\n id: 'deckgl-render-test',\n width: 800,\n height: 450,\n style: {position: 'absolute', left: '0px', top: '0px'},\n views: [new MapView({})],\n useDevicePixels: false,\n debug: true\n};\n\nexport type TestCase = {\n name: string;\n /** milliseconds to wait before aborting */\n timeout?: number;\n};\n\ntype TestOptions<TestCaseT extends TestCase, ResultT> = {\n /** Called when a test case starts */\n onTestStart: (testCase: TestCaseT) => void;\n /** Called when a test case passes */\n onTestPass: (testCase: TestCaseT, result: ResultT) => void;\n /** Called when a test case fails */\n onTestFail: (testCase: TestCaseT, result: ResultT | {error: string}) => void;\n\n /** milliseconds to wait for each test case before aborting */\n timeout: number;\n};\n\nconst DEFAULT_TEST_OPTIONS: TestOptions<TestCase, unknown> = {\n // test lifecycle callback\n onTestStart: testCase => console.log(`# ${testCase.name}`),\n onTestPass: testCase => console.log(`ok ${testCase.name} passed`),\n onTestFail: testCase => console.log(`not ok ${testCase.name} failed`),\n\n // milliseconds to wait for each test case before aborting\n timeout: 2000\n};\n\nexport abstract class TestRunner<TestCaseT extends TestCase, ResultT, ExtraOptions = {}> {\n deck: Deck<any> | null = null;\n props: DeckProps<any>;\n isHeadless: boolean;\n isRunning: boolean = false;\n testOptions: TestOptions<TestCaseT, ResultT> & ExtraOptions;\n gpuVendor?: string;\n\n private _testCases: TestCaseT[] = [];\n private _currentTestCase: TestCaseT | null = null;\n private _testCaseData: unknown = null;\n\n /**\n * props\n * Deck props\n */\n constructor(props: DeckProps = {}, options: ExtraOptions) {\n this.props = {...DEFAULT_DECK_PROPS, ...props};\n\n // @ts-ignore browserTestDriver_isHeadless is injected by @probe.gl/test-utils if running in headless browser\n this.isHeadless = Boolean(window.browserTestDriver_isHeadless);\n\n this.testOptions = {...DEFAULT_TEST_OPTIONS, ...options};\n }\n\n get defaultTestCase(): TestCaseT {\n throw new Error('Not implemented');\n }\n\n /**\n * Add testCase(s)\n */\n add(testCases: TestCaseT[]): this {\n if (!Array.isArray(testCases)) {\n testCases = [testCases];\n }\n for (const testCase of testCases) {\n this._testCases.push(testCase);\n }\n return this;\n }\n\n /**\n * Returns a promise that resolves when all the test cases are done\n */\n run(options: Partial<TestOptions<TestCaseT, ResultT> & ExtraOptions> = {}): Promise<void> {\n Object.assign(this.testOptions, options);\n\n return new Promise<void>((resolve, reject) => {\n this.deck = new Deck({\n ...this.props,\n onDeviceInitialized: this._onDeviceInitialized.bind(this),\n onLoad: resolve\n });\n\n this.isRunning = true;\n this._currentTestCase = null;\n })\n .then(() => {\n let promise = Promise.resolve();\n // chain test case promises\n this._testCases.forEach(testCase => {\n promise = promise.then(() => this._runTest(testCase));\n });\n return promise;\n })\n .catch((error: unknown) => {\n this.fail({error: (error as Error).message});\n })\n .finally(() => {\n this.deck!.finalize();\n this.deck = null;\n });\n }\n\n /* Lifecycle methods for subclassing */\n\n initTestCase(testCase: TestCaseT) {\n for (const key in this.defaultTestCase) {\n if (!(key in testCase)) {\n testCase[key] = this.defaultTestCase[key];\n }\n }\n this.testOptions.onTestStart(testCase);\n }\n\n /** Execute the test case. Fails if takes longer than options.timeout */\n abstract runTestCase(testCase: TestCaseT): Promise<void>;\n /** Check the result of the test case. Calls pass() or fail() */\n abstract assert(testCase: TestCaseT): Promise<void>;\n\n /* Utilities */\n\n protected pass(result: ResultT) {\n this.testOptions.onTestPass(this._currentTestCase!, result);\n }\n\n protected fail(result: ResultT | {error: string}) {\n this.testOptions.onTestFail(this._currentTestCase!, result);\n }\n\n /* Private Methods */\n\n private _onDeviceInitialized(device: Device) {\n this.gpuVendor = device.info.vendor;\n }\n\n private async _runTest(testCase: TestCaseT) {\n this._currentTestCase = testCase;\n\n // normalize test case\n this.initTestCase(testCase);\n\n const timeout = testCase.timeout || this.testOptions.timeout;\n const task = this.runTestCase(testCase);\n const timeoutTask = new Promise((_, reject) => {\n setTimeout(() => {\n reject('Timeout');\n }, timeout);\n });\n\n try {\n await Promise.race([task, timeoutTask]);\n await this.assert(testCase);\n } catch (err: unknown) {\n if (err === 'Timeout') {\n this.fail({error: 'Timeout'});\n }\n }\n }\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n/* global window */\n// Get the bounding box of a DOMElement relative to the page\nexport function getBoundingBoxInPage(domElement: HTMLElement): {\n x: number;\n y: number;\n width: number;\n height: number;\n} {\n const bbox = domElement.getBoundingClientRect();\n return {\n x: window.scrollX + bbox.x,\n y: window.scrollY + bbox.y,\n width: bbox.width,\n height: bbox.height\n };\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n/* global window */\nimport {TestRunner} from './test-runner';\nimport {getBoundingBoxInPage} from './utils/dom';\n\nimport type {DeckProps, Deck, Layer} from '@deck.gl/core';\n\n// TODO - export from probe.gl\ntype ImageDiffOptions = {\n saveOnFail?: boolean;\n saveAs?: string;\n threshold?: number; // 0.99,\n createDiffImage?: boolean; // false,\n tolerance?: number; // 0.1,\n includeAA?: boolean; // false,\n includeEmpty?: boolean; // true\n platform?: string;\n};\n\ntype DiffImageResult = {\n headless: boolean;\n match: string | number;\n matchPercentage: string;\n success: boolean;\n error: Error | string | null;\n};\n\nexport type SnapshotTestCase = {\n name: string;\n props: DeckProps;\n goldenImage: string;\n onBeforeRender?: (params: {deck: Deck; layers: Layer[]}) => void;\n onAfterRender?: (params: {deck: Deck; layers: Layer[]; done: () => void}) => void;\n timeout?: number;\n imageDiffOptions?: ImageDiffOptions;\n};\n\nconst DEFAULT_TEST_OPTIONS = {\n imageDiffOptions: {}\n};\n\nconst DEFAULT_TEST_CASE: SnapshotTestCase = {\n name: 'Unnamed snapshot test',\n props: {},\n onBeforeRender: ({deck, layers}) => {\n // eslint-disable-line\n },\n onAfterRender: ({deck, layers, done}) => {\n if (\n // @ts-expect-error accessing private\n !deck.layerManager?.needsUpdate() &&\n layers.every(layer => layer.isLoaded)\n ) {\n done(); // eslint-disable-line\n }\n },\n goldenImage: ''\n};\n\nexport class SnapshotTestRunner extends TestRunner<\n SnapshotTestCase,\n DiffImageResult,\n {imageDiffOptions: ImageDiffOptions}\n> {\n private _isDiffing: boolean = false;\n\n constructor(props) {\n super(props, DEFAULT_TEST_OPTIONS);\n\n this._isDiffing = false;\n }\n\n get defaultTestCase() {\n return DEFAULT_TEST_CASE;\n }\n\n initTestCase(testCase: SnapshotTestCase) {\n super.initTestCase(testCase);\n if (!testCase.goldenImage) {\n throw new Error(`Test case ${testCase.name} does not have golden image`);\n }\n }\n\n runTestCase(testCase: SnapshotTestCase) {\n const deck = this.deck!;\n\n return new Promise<void>(resolve => {\n deck.setProps({\n ...this.props,\n ...testCase,\n onBeforeRender: () => {\n testCase.onBeforeRender!({\n deck,\n // @ts-expect-error Accessing protected layerManager\n layers: this.deck.layerManager.getLayers()\n });\n },\n onAfterRender: () => {\n testCase.onAfterRender!({\n deck,\n // @ts-expect-error Accessing protected layerManager\n layers: this.deck.layerManager.getLayers(),\n done: resolve\n });\n }\n });\n });\n }\n\n async assert(testCase: SnapshotTestCase) {\n if (this._isDiffing) {\n // already performing diffing\n return;\n }\n this._isDiffing = true;\n\n const diffOptions = {\n ...this.testOptions.imageDiffOptions,\n ...testCase.imageDiffOptions,\n goldenImage: testCase.goldenImage,\n region: getBoundingBoxInPage(this.deck!.getCanvas()!)\n };\n // Take screenshot and compare\n const result = await window.browserTestDriver_captureAndDiffScreen(diffOptions);\n\n // If failed, try if we have a platform specific golden image\n let resultOverride;\n const platform = this.testOptions.imageDiffOptions?.platform?.toLowerCase();\n if (!result.success) {\n diffOptions.goldenImage = diffOptions.goldenImage.replace(\n 'golden-images/',\n `golden-images/platform-overrides/${platform}/`\n );\n resultOverride = await window.browserTestDriver_captureAndDiffScreen(diffOptions);\n }\n\n // invoke user callback\n if (result.success || resultOverride.success) {\n this.pass(result);\n } else {\n this.fail(result);\n }\n\n this._isDiffing = false;\n }\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n/* global window */\nimport {TestRunner} from './test-runner';\nimport type {Deck, Layer} from '@deck.gl/core';\n\ntype InteractionEvent =\n | {\n type: string;\n [key: string]: any;\n }\n | {\n wait: number;\n };\n\nexport type InteractionTestCase = {\n name: string;\n events: InteractionEvent[];\n timeout?: number;\n context?: any;\n onBeforeEvents: (params: {deck: Deck}) => any;\n onAfterEvents: (params: {deck: Deck; layers: Layer[]; context: any}) => void;\n};\n\nconst DEFAULT_TEST_CASE: InteractionTestCase = {\n name: 'Unnamed interaction test',\n events: [],\n onBeforeEvents: ({deck}) => {},\n onAfterEvents: ({deck, layers, context}) => {}\n};\n\nfunction sleep(timeout: number): Promise<void> {\n return new Promise(resolve => window.setTimeout(resolve, timeout));\n}\n\nexport class InteractionTestRunner extends TestRunner<InteractionTestCase, {}> {\n get defaultTestCase() {\n return DEFAULT_TEST_CASE;\n }\n\n // chain events\n async runTestCase(testCase: InteractionTestCase) {\n testCase.context = testCase.onBeforeEvents({\n deck: this.deck!\n });\n\n for (const event of testCase.events) {\n if (event.wait) {\n await sleep(event.wait);\n } else {\n await window.browserTestDriver_emulateInput(event);\n }\n }\n }\n\n async assert(testCase) {\n testCase.onAfterEvents({\n deck: this.deck,\n // @ts-expect-error Accessing protected layerManager\n layers: this.deck.layerManager.getLayers(),\n context: testCase.context\n });\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;ACUM,SAAU,iBAAiB,OAAc,WAAkB;AAC/D,QAAM,WAAW,CAAA;AACjB,QAAM,eAAe,MAAM,UAAS,EAAG,CAAC,EAAE;AAC1C,QAAM,gBAAgB,YAClB,CAAC,aAAa,cAAc,IAAI,SAAS,CAAC,IAC1C,aAAa,cAAc,OAAM;AACrC,aAAW,SAAS,eAAe;AACjC,WAAO,OAAO,UAAU,MAAO,QAAQ;EACzC;AAEA,SAAO;AACT;;;ACNM,SAAU,eACd,OACA,YAAoB,IAAE;AAGtB,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO,OAAO,MAAM,YAAY,SAAS,CAAC;EAC5C;AACA,MAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,WAAO,MAAM,IAAI,UAAQ,eAAe,MAAM,SAAS,CAAC;EAC1D;AACA,MAAI,OAAO,UAAU,UAAU;AAC7B,eAAW,OAAO,OAAO;AACvB,YAAM,GAAG,IAAI,eAAe,MAAM,GAAG,GAAG,SAAS;IACnD;EACF;AACA,SAAO;AACT;;;AC5BA,wBAAsC;AAG/B,IAAM,SAAS,iCAAe,IAAI,6BAAW,CAAA,CAAE;AAPtD;AASO,IAAM,OAAK,0DAAa,OAAM;AAErC,WAAW,YAAY,WAAW,aAAa;;;ACP/C,kBAAkD;AAElD,IAAAA,qBAAsB;AAOtB,IAAM,eAAe,IA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T;;EAGA,MAAM,YAAY,UAA6B;AAC7C,aAAS,UAAU,SAAS,eAAe;MACzC,MAAM,KAAK;KACZ;AAED,eAAW,SAAS,SAAS,QAAQ;AACnC,UAAI,MAAM,MAAM;AACd,cAAM,MAAM,MAAM,IAAI;MACxB,OAAO;AACL,cAAM,OAAO,+BAA+B,KAAK;MACnD;IACF;EACF;EAEA,MAAM,OAAO,UAAQ;AACnB,aAAS,cAAc;MACrB,MAAM,KAAK;;MAEX,QAAQ,KAAK,KAAK,aAAa,UAAS;MACxC,SAAS,SAAS;KACnB;EACH;;",
6
+ "names": ["import_test_utils", "import_core", "count", "import_core", "device", "DEFAULT_TEST_OPTIONS", "_a", "DEFAULT_TEST_CASE"]
7
7
  }
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export { getLayerUniforms } from "./utils/layer.js";
1
2
  export { toLowPrecision } from "./utils/precision.js";
2
3
  export { gl, device } from "./utils/setup-gl.js";
3
4
  export { testLayer, testLayerAsync, testInitializeLayer, testInitializeLayerAsync } from "./lifecycle-test.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,6BAA0B;AACjD,OAAO,EAAC,EAAE,EAAE,MAAM,EAAC,4BAAyB;AAG5C,OAAO,EACL,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,wBAAwB,EACzB,4BAAyB;AAC1B,OAAO,EAAC,kBAAkB,EAAC,kCAA+B;AAG1D,OAAO,EAAC,UAAU,EAAC,yBAAsB;AAGzC,OAAO,EAAC,kBAAkB,EAAC,kCAA+B;AAE1D,OAAO,EAAC,qBAAqB,EAAC,qCAAkC;AAEhE,YAAY,EAAC,aAAa,EAAC,4BAAyB;AACpD,YAAY,EAAC,gBAAgB,EAAC,kCAA+B;AAC7D,YAAY,EAAC,mBAAmB,EAAC,qCAAkC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,gBAAgB,EAAC,yBAAsB;AAC/C,OAAO,EAAC,cAAc,EAAC,6BAA0B;AACjD,OAAO,EAAC,EAAE,EAAE,MAAM,EAAC,4BAAyB;AAG5C,OAAO,EACL,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,wBAAwB,EACzB,4BAAyB;AAC1B,OAAO,EAAC,kBAAkB,EAAC,kCAA+B;AAG1D,OAAO,EAAC,UAAU,EAAC,yBAAsB;AAGzC,OAAO,EAAC,kBAAkB,EAAC,kCAA+B;AAE1D,OAAO,EAAC,qBAAqB,EAAC,qCAAkC;AAEhE,YAAY,EAAC,aAAa,EAAC,4BAAyB;AACpD,YAAY,EAAC,gBAAgB,EAAC,kCAA+B;AAC7D,YAAY,EAAC,mBAAmB,EAAC,qCAAkC"}
package/dist/index.js CHANGED
@@ -1,3 +1,7 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+ export { getLayerUniforms } from "./utils/layer.js";
1
5
  export { toLowPrecision } from "./utils/precision.js";
2
6
  export { gl, device } from "./utils/setup-gl.js";
3
7
  // Utilities for update tests (lifecycle tests)
@@ -9,3 +13,4 @@ export { TestRunner } from "./test-runner.js";
9
13
  export { SnapshotTestRunner } from "./snapshot-test-runner.js";
10
14
  // A utility that emulates input events
11
15
  export { InteractionTestRunner } from "./interaction-test-runner.js";
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EAAC,gBAAgB,EAAC,yBAAsB;AAC/C,OAAO,EAAC,cAAc,EAAC,6BAA0B;AACjD,OAAO,EAAC,EAAE,EAAE,MAAM,EAAC,4BAAyB;AAE5C,+CAA+C;AAC/C,OAAO,EACL,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,wBAAwB,EACzB,4BAAyB;AAC1B,OAAO,EAAC,kBAAkB,EAAC,kCAA+B;AAE1D,6EAA6E;AAC7E,OAAO,EAAC,UAAU,EAAC,yBAAsB;AAEzC,6EAA6E;AAC7E,OAAO,EAAC,kBAAkB,EAAC,kCAA+B;AAC1D,uCAAuC;AACvC,OAAO,EAAC,qBAAqB,EAAC,qCAAkC"}
@@ -1 +1 @@
1
- {"version":3,"file":"interaction-test-runner.d.ts","sourceRoot":"","sources":["../src/interaction-test-runner.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAC,UAAU,EAAC,yBAAsB;AACzC,OAAO,KAAK,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,eAAe,CAAC;AAE/C,KAAK,gBAAgB,GACjB;IACE,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GACD;IACE,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEN,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,cAAc,EAAE,CAAC,MAAM,EAAE;QAAC,IAAI,EAAE,IAAI,CAAA;KAAC,KAAK,GAAG,CAAC;IAC9C,aAAa,EAAE,CAAC,MAAM,EAAE;QAAC,IAAI,EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,KAAK,EAAE,CAAC;QAAC,OAAO,EAAE,GAAG,CAAA;KAAC,KAAK,IAAI,CAAC;CAC9E,CAAC;AAaF,qBAAa,qBAAsB,SAAQ,UAAU,CAAC,mBAAmB,EAAE,EAAE,CAAC;IAC5E,IAAI,eAAe,wBAElB;IAGK,WAAW,CAAC,QAAQ,EAAE,mBAAmB;IAczC,MAAM,CAAC,QAAQ,KAAA;CAQtB"}
1
+ {"version":3,"file":"interaction-test-runner.d.ts","sourceRoot":"","sources":["../src/interaction-test-runner.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,UAAU,EAAC,yBAAsB;AACzC,OAAO,KAAK,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,eAAe,CAAC;AAE/C,KAAK,gBAAgB,GACjB;IACE,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GACD;IACE,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEN,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,cAAc,EAAE,CAAC,MAAM,EAAE;QAAC,IAAI,EAAE,IAAI,CAAA;KAAC,KAAK,GAAG,CAAC;IAC9C,aAAa,EAAE,CAAC,MAAM,EAAE;QAAC,IAAI,EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,KAAK,EAAE,CAAC;QAAC,OAAO,EAAE,GAAG,CAAA;KAAC,KAAK,IAAI,CAAC;CAC9E,CAAC;AAaF,qBAAa,qBAAsB,SAAQ,UAAU,CAAC,mBAAmB,EAAE,EAAE,CAAC;IAC5E,IAAI,eAAe,wBAElB;IAGK,WAAW,CAAC,QAAQ,EAAE,mBAAmB;IAczC,MAAM,CAAC,QAAQ,KAAA;CAQtB"}
@@ -1,22 +1,6 @@
1
- // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
20
4
  /* global window */
21
5
  import { TestRunner } from "./test-runner.js";
22
6
  const DEFAULT_TEST_CASE = {
@@ -55,3 +39,4 @@ export class InteractionTestRunner extends TestRunner {
55
39
  });
56
40
  }
57
41
  }
42
+ //# sourceMappingURL=interaction-test-runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interaction-test-runner.js","sourceRoot":"","sources":["../src/interaction-test-runner.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,mBAAmB;AACnB,OAAO,EAAC,UAAU,EAAC,yBAAsB;AAqBzC,MAAM,iBAAiB,GAAwB;IAC7C,IAAI,EAAE,0BAA0B;IAChC,MAAM,EAAE,EAAE;IACV,cAAc,EAAE,CAAC,EAAC,IAAI,EAAC,EAAE,EAAE,GAAE,CAAC;IAC9B,aAAa,EAAE,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAC,EAAE,EAAE,GAAE,CAAC;CAC/C,CAAC;AAEF,SAAS,KAAK,CAAC,OAAe;IAC5B,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC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
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
20
4
  import { LayerManager, MapView, DeckRenderer } from '@deck.gl/core';
21
5
  import { makeSpy } from '@probe.gl/test-utils';
22
6
  import { device } from "./utils/setup-gl.js";
@@ -230,3 +214,4 @@ function update({ layerManager, deckRenderer }) {
230
214
  onAnimationFrame();
231
215
  });
232
216
  }
217
+ //# sourceMappingURL=lifecycle-test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycle-test.js","sourceRoot":"","sources":["../src/lifecycle-test.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EAAC,YAAY,EAAE,OAAO,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AAElE,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAC,M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UAAU,EAAE,CAAC;IAEb,oDAAoD;IACpD,IAAI,YAAY,CAAC,WAAW,EAAE,EAAE,CAAC;QAC/B,YAAY,CAAC,YAAY,EAAE,CAAC;QAC5B,UAAU,EAAE,CAAC;IACf,CAAC;IAED,OAAO,EAAC,KAAK,EAAE,MAAM,EAAC,CAAC;AACzB,CAAC;AAED,uBAAuB;AACvB,SAAS,MAAM,CAAC,EAAC,YAAY,EAAE,YAAY,EAAgB;IACzD,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,MAAM,gBAAgB,GAAG,GAAG,EAAE;YAC5B,IAAI,YAAY,CAAC,WAAW,EAAE,EAAE,CAAC;gBAC/B,YAAY,CAAC,YAAY,EAAE,CAAC;gBAE5B,YAAY,CAAC,YAAY,CAAC;oBACxB,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,EAAE;oBACT,OAAO,EAAE,EAAE;oBACX,SAAS,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC;oBAC1C,MAAM,EAAE,YAAY,CAAC,SAAS,EAAE;oBAChC,gBAAgB,EAAE,YAAY,CAAC,gBAAgB;iBAChD,CAAC,CAAC;gBACH,OAAO,EAAE,CAAC;gBACV,OAAO;YACT,CAAC;YAED,UAAU,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;QACnC,CAAC,CAAC;QAEF,gBAAgB,EAAE,CAAC;IACrB,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -8,6 +8,7 @@ type ImageDiffOptions = {
8
8
  tolerance?: number;
9
9
  includeAA?: boolean;
10
10
  includeEmpty?: boolean;
11
+ platform?: string;
11
12
  };
12
13
  type DiffImageResult = {
13
14
  headless: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"snapshot-test-runner.d.ts","sourceRoot":"","sources":["../src/snapshot-test-runner.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAC,UAAU,EAAC,yBAAsB;AAGzC,OAAO,KAAK,EAAC,SAAS,EAAE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EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,KAAK,EAAE,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAA;KAAC,KAAK,IAAI,CAAC;IAClF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,CAAC;AAwBF,qBAAa,kBAAmB,SAAQ,UAAU,CAChD,gBAAgB,EAChB,eAAe,EACf;IAAC,gBAAgB,EAAE,gBAAgB,CAAA;CAAC,CACrC;IACC,OAAO,CAAC,UAAU,CAAkB;gBAExB,KAAK,KAAA;IAMjB,IAAI,eAAe,qBAElB;IAED,YAAY,CAAC,QAAQ,EAAE,gBAAgB;IAOvC,WAAW,CAAC,QAAQ,EAAE,gBAAgB;IA0BhC,MAAM,CAAC,QAAQ,EAAE,gBAAgB;CAoCxC"}
@@ -1,22 +1,6 @@
1
- // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
20
4
  /* global window */
21
5
  import { TestRunner } from "./test-runner.js";
22
6
  import { getBoundingBoxInPage } from "./utils/dom.js";
@@ -92,8 +76,15 @@ export class SnapshotTestRunner extends TestRunner {
92
76
  };
93
77
  // Take screenshot and compare
94
78
  const result = await window.browserTestDriver_captureAndDiffScreen(diffOptions);
79
+ // If failed, try if we have a platform specific golden image
80
+ let resultOverride;
81
+ const platform = this.testOptions.imageDiffOptions?.platform?.toLowerCase();
82
+ if (!result.success) {
83
+ diffOptions.goldenImage = diffOptions.goldenImage.replace('golden-images/', `golden-images/platform-overrides/${platform}/`);
84
+ resultOverride = await window.browserTestDriver_captureAndDiffScreen(diffOptions);
85
+ }
95
86
  // invoke user callback
96
- if (result.success) {
87
+ if (result.success || resultOverride.success) {
97
88
  this.pass(result);
98
89
  }
99
90
  else {
@@ -102,3 +93,4 @@ export class SnapshotTestRunner extends TestRunner {
102
93
  this._isDiffing = false;
103
94
  }
104
95
  }
96
+ //# sourceMappingURL=snapshot-test-runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot-test-runner.js","sourceRoot":"","sources":["../src/snapshot-test-runner.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,mBAAmB;AACnB,OAAO,EAAC,UAAU,EAAC,yBAAsB;AACzC,OAAO,EAAC,oBAAoB,EAAC,uBAAoB;AAkCjD,MAAM,oBAAoB,GAAG;IAC3B,gBAAgB,EAAE,EAAE;CACrB,CAAC;AAEF,MAAM,iBAAiB,GAAqB;IAC1C,IAAI,EAAE,uBAAuB;IAC7B,KAAK,EAAE,EAAE;IACT,cAAc,EAAE,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,EAAE,EAAE;QACjC,sBAAsB;IACxB,CAAC;IACD,aAAa,EAAE,CAAC,EAAC,IAAI,EAAE,MAAM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C,IAAI,CAAC,MAAM,EAAE,OAAO;IAI9B,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC;IAMhD,OAAO,CAAC,oBAAoB;YAId,QAAQ;CAuBvB"}
@@ -1,22 +1,6 @@
1
- // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
20
4
  /* global window, console, setTimeout */
21
5
  /* eslint-disable no-console */
22
6
  import { Deck, MapView } from '@deck.gl/core';
@@ -141,3 +125,4 @@ export class TestRunner {
141
125
  }
142
126
  }
143
127
  }
128
+ //# sourceMappingURL=test-runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-runner.js","sourceRoot":"","sources":["../src/test-runner.ts"],"names":[],"mappings":"AAAA,UAAU;AACV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AAC;QAEjC,sBAAsB;QACtB,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAE5B,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;QAC7D,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QACxC,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE;YAC5C,UAAU,CAAC,GAAG,EAAE;gBACd,MAAM,CAAC,SAAS,CAAC,CAAC;YACpB,CAAC,EAAE,OAAO,CAAC,CAAC;QACd,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC;YACH,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC;YACxC,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC9B,CAAC;QAAC,OAAO,GAAY,EAAE,CAAC;YACtB,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;gBACtB,IAAI,CAAC,IAAI,CAAC,EAAC,KAAK,EAAE,SAAS,EAAC,CAAC,CAAC;YAChC,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/utils/dom.ts"],"names":[],"mappings":"AAEA,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,WAAW,GAAG;IAC7D,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAQA"}
1
+ {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/utils/dom.ts"],"names":[],"mappings":"AAMA,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,WAAW,GAAG;IAC7D,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAQA"}
package/dist/utils/dom.js CHANGED
@@ -1,3 +1,6 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
1
4
  /* global window */
2
5
  // Get the bounding box of a DOMElement relative to the page
3
6
  export function getBoundingBoxInPage(domElement) {
@@ -9,3 +12,4 @@ export function getBoundingBoxInPage(domElement) {
9
12
  height: bbox.height
10
13
  };
11
14
  }
15
+ //# sourceMappingURL=dom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom.js","sourceRoot":"","sources":["../../src/utils/dom.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,mBAAmB;AACnB,4DAA4D;AAC5D,MAAM,UAAU,oBAAoB,CAAC,UAAuB;IAM1D,MAAM,IAAI,GAAG,UAAU,CAAC,qBAAqB,EAAE,CAAC;IAChD,OAAO;QACL,CAAC,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;QAC1B,CAAC,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;QAC1B,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,MAAM,EAAE,IAAI,CAAC,MAAM;KACpB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { UniformValue } from '@luma.gl/core';
2
+ import { Layer } from '@deck.gl/core';
3
+ /**
4
+ * Extract uniform values set for a Layer in the underlying UniformBlock store
5
+ */
6
+ export declare function getLayerUniforms(layer: Layer, blockName?: string): Record<string, UniformValue>;
7
+ //# sourceMappingURL=layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layer.d.ts","sourceRoot":"","sources":["../../src/utils/layer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAEpC;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAW/F"}
@@ -0,0 +1,18 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+ /**
5
+ * Extract uniform values set for a Layer in the underlying UniformBlock store
6
+ */
7
+ export function getLayerUniforms(layer, blockName) {
8
+ const uniforms = {};
9
+ const uniformStore = layer.getModels()[0]._uniformStore;
10
+ const uniformBlocks = blockName
11
+ ? [uniformStore.uniformBlocks.get(blockName)]
12
+ : uniformStore.uniformBlocks.values();
13
+ for (const block of uniformBlocks) {
14
+ Object.assign(uniforms, block.uniforms);
15
+ }
16
+ return uniforms;
17
+ }
18
+ //# sourceMappingURL=layer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layer.js","sourceRoot":"","sources":["../../src/utils/layer.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAKpC;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAY,EAAE,SAAkB;IAC/D,MAAM,QAAQ,GAAG,EAAE,CAAC;IACpB,MAAM,YAAY,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC;IACxD,MAAM,aAAa,GAAG,SAAS;QAC7B,CAAC,CAAC,CAAC,YAAY,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC7C,CAAC,CAAC,YAAY,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;IACxC,KAAK,MAAM,KAAK,IAAI,aAAa,EAAE,CAAC;QAClC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAM,CAAC,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"precision.d.ts","sourceRoot":"","sources":["../../src/utils/precision.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;AAC1E,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;AAC9E,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"precision.d.ts","sourceRoot":"","sources":["../../src/utils/precision.ts"],"names":[],"mappings":"AAIA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;AAC1E,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;AAC9E,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
@@ -1,3 +1,6 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
1
4
  /**
2
5
  * Covert all numbers in a deep structure to a given precision, allowing
3
6
  * reliable float comparisons. Converts data in-place.
@@ -17,3 +20,4 @@ export function toLowPrecision(input, precision = 11) {
17
20
  }
18
21
  return input;
19
22
  }
23
+ //# sourceMappingURL=precision.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"precision.js","sourceRoot":"","sources":["../../src/utils/precision.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AASpC;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,KAAiD,EACjD,YAAoB,EAAE;IAEtB,iCAAiC;IACjC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC;IAC9C,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IAC5D,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;YACxB,KAAK,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,5 +1,4 @@
1
1
  /** Test device */
2
2
  export declare const device: import("@luma.gl/webgl").WebGLDevice;
3
- /** Test context */
4
- export declare const gl: WebGL2RenderingContext | null;
3
+ export declare const gl: WebGL2RenderingContext;
5
4
  //# sourceMappingURL=setup-gl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"setup-gl.d.ts","sourceRoot":"","sources":["../../src/utils/setup-gl.ts"],"names":[],"mappings":"AAEA,kBAAkB;AAClB,eAAO,MAAM,MAAM,sCAAoC,CAAC;AAExD,mBAAmB;AACnB,eAAO,MAAM,EAAE,+BAMb,CAAC"}
1
+ {"version":3,"file":"setup-gl.d.ts","sourceRoot":"","sources":["../../src/utils/setup-gl.ts"],"names":[],"mappings":"AAMA,kBAAkB;AAClB,eAAO,MAAM,MAAM,sCAAoC,CAAC;AAExD,eAAO,MAAM,EAAE,wBAAuB,CAAC"}
@@ -1,15 +1,9 @@
1
- import { createTestContext, webglDevice, NullDevice } from '@luma.gl/test-utils';
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+ import { webglDevice, NullDevice } from '@luma.gl/test-utils';
2
5
  /** Test device */
3
6
  export const device = webglDevice || new NullDevice({});
4
- /** Test context */
5
- export const gl = createTestContext({
6
- width: 1,
7
- height: 1,
8
- debug: true
9
- // throwOnFailure: false,
10
- // throwOnError: false
11
- });
12
- // // TODO - Seems to be an issue in luma.gl
13
- // (createContext && createContext(100, 100, {}));
14
- // // console.log('Context', globalThis.glContext);
7
+ export const gl = webglDevice?.gl || 1;
15
8
  globalThis.glContext = globalThis.glContext || gl;
9
+ //# sourceMappingURL=setup-gl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup-gl.js","sourceRoot":"","sources":["../../src/utils/setup-gl.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EAAC,WAAW,EAAE,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAE5D,kBAAkB;AAClB,MAAM,CAAC,MAAM,MAAM,GAAG,WAAW,IAAI,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AAExD,MAAM,CAAC,MAAM,EAAE,GAAG,WAAW,EAAE,EAAE,IAAI,CAAC,CAAC;AAEvC,UAAU,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,IAAI,EAAE,CAAC"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Test utilities for deck.gl layers",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
- "version": "9.0.40",
6
+ "version": "9.1.0-beta.3",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -32,14 +32,14 @@
32
32
  "src"
33
33
  ],
34
34
  "dependencies": {
35
- "@luma.gl/test-utils": "~9.0.27"
35
+ "@luma.gl/test-utils": "^9.1.0-beta.16"
36
36
  },
37
37
  "peerDependencies": {
38
- "@deck.gl/core": "^9.0.0",
39
- "@luma.gl/core": "~9.0.27",
40
- "@luma.gl/engine": "~9.0.27",
41
- "@probe.gl/test-utils": "^4.0.0"
38
+ "@deck.gl/core": "^9.1.0-beta",
39
+ "@luma.gl/core": "^9.1.0-beta",
40
+ "@luma.gl/engine": "^9.1.0-beta",
41
+ "@probe.gl/test-utils": "^4.1.0-alpha.2"
42
42
  },
43
43
  "scripts": {},
44
- "gitHead": "fe6e4763b3dcd5b602291e7732e9d30b0a4eaec1"
44
+ "gitHead": "6625885881202cb753b64c6f2b8ee6f323092075"
45
45
  }
@@ -1,22 +1,7 @@
1
- // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+
20
5
  import {_count as count, Layer} from '@deck.gl/core';
21
6
 
22
7
  import type {DefaultProps} from '@deck.gl/core';
package/src/index.ts CHANGED
@@ -1,3 +1,8 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+
5
+ export {getLayerUniforms} from './utils/layer';
1
6
  export {toLowPrecision} from './utils/precision';
2
7
  export {gl, device} from './utils/setup-gl';
3
8
 
@@ -1,22 +1,6 @@
1
- // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
20
4
 
21
5
  /* global window */
22
6
  import {TestRunner} from './test-runner';
@@ -1,22 +1,6 @@
1
- // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
20
4
 
21
5
  import {LayerManager, MapView, DeckRenderer} from '@deck.gl/core';
22
6
 
@@ -1,22 +1,6 @@
1
- // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
20
4
 
21
5
  /* global window */
22
6
  import {TestRunner} from './test-runner';
@@ -33,6 +17,7 @@ type ImageDiffOptions = {
33
17
  tolerance?: number; // 0.1,
34
18
  includeAA?: boolean; // false,
35
19
  includeEmpty?: boolean; // true
20
+ platform?: string;
36
21
  };
37
22
 
38
23
  type DiffImageResult = {
@@ -140,8 +125,20 @@ export class SnapshotTestRunner extends TestRunner<
140
125
  };
141
126
  // Take screenshot and compare
142
127
  const result = await window.browserTestDriver_captureAndDiffScreen(diffOptions);
128
+
129
+ // If failed, try if we have a platform specific golden image
130
+ let resultOverride;
131
+ const platform = this.testOptions.imageDiffOptions?.platform?.toLowerCase();
132
+ if (!result.success) {
133
+ diffOptions.goldenImage = diffOptions.goldenImage.replace(
134
+ 'golden-images/',
135
+ `golden-images/platform-overrides/${platform}/`
136
+ );
137
+ resultOverride = await window.browserTestDriver_captureAndDiffScreen(diffOptions);
138
+ }
139
+
143
140
  // invoke user callback
144
- if (result.success) {
141
+ if (result.success || resultOverride.success) {
145
142
  this.pass(result);
146
143
  } else {
147
144
  this.fail(result);
@@ -1,22 +1,6 @@
1
- // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
20
4
 
21
5
  /* global window, console, setTimeout */
22
6
  /* eslint-disable no-console */
package/src/utils/dom.ts CHANGED
@@ -1,3 +1,7 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+
1
5
  /* global window */
2
6
  // Get the bounding box of a DOMElement relative to the page
3
7
  export function getBoundingBoxInPage(domElement: HTMLElement): {
@@ -0,0 +1,22 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+
5
+ import {UniformValue} from '@luma.gl/core';
6
+ import {Layer} from '@deck.gl/core';
7
+
8
+ /**
9
+ * Extract uniform values set for a Layer in the underlying UniformBlock store
10
+ */
11
+ export function getLayerUniforms(layer: Layer, blockName?: string): Record<string, UniformValue> {
12
+ const uniforms = {};
13
+ const uniformStore = layer.getModels()[0]._uniformStore;
14
+ const uniformBlocks = blockName
15
+ ? [uniformStore.uniformBlocks.get(blockName)]
16
+ : uniformStore.uniformBlocks.values();
17
+ for (const block of uniformBlocks) {
18
+ Object.assign(uniforms, block!.uniforms);
19
+ }
20
+
21
+ return uniforms;
22
+ }
@@ -1,3 +1,7 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+
1
5
  export function toLowPrecision(input: number, precision?: number): number;
2
6
  export function toLowPrecision(input: number[], precision?: number): number[];
3
7
  export function toLowPrecision(
@@ -1,19 +1,12 @@
1
- import {createTestContext, webglDevice, NullDevice} from '@luma.gl/test-utils';
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+
5
+ import {webglDevice, NullDevice} from '@luma.gl/test-utils';
2
6
 
3
7
  /** Test device */
4
8
  export const device = webglDevice || new NullDevice({});
5
9
 
6
- /** Test context */
7
- export const gl = createTestContext({
8
- width: 1,
9
- height: 1,
10
- debug: true
11
- // throwOnFailure: false,
12
- // throwOnError: false
13
- });
14
-
15
- // // TODO - Seems to be an issue in luma.gl
16
- // (createContext && createContext(100, 100, {}));
17
- // // console.log('Context', globalThis.glContext);
10
+ export const gl = webglDevice?.gl || 1;
18
11
 
19
12
  globalThis.glContext = globalThis.glContext || gl;