From bac721c1c935eee449a0a01e7c7c4c7a751fd331 Mon Sep 17 00:00:00 2001 From: Bouillaguet Quentin Date: Thu, 19 Dec 2024 10:36:40 +0100 Subject: [PATCH] feat: test --- test/functional/GlobeControls.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/functional/GlobeControls.js b/test/functional/GlobeControls.js index 6dbef35b97..f0b80a60b3 100644 --- a/test/functional/GlobeControls.js +++ b/test/functional/GlobeControls.js @@ -177,22 +177,28 @@ describe('GlobeControls with globe example', function _() { assert.ok(Math.abs(result) < 100); }); - it('should zoom like expected with mouse wheel', async () => { + it('should zoom like expected with mouse wheel', async function () { // FIX Me: use puppetter mouse#wheel instead of new WheelEvent await page.evaluate(() => { view.controls.enableDamping = false; }); + console.log('PASSING AWAIT 1'); await page.mouse.move(middleWidth, middleHeight, { steps: 20 }); + console.log('PASSING AWAIT 2'); const finalRange = await page.evaluate(() => new Promise((resolve) => { view.mainLoop.addEventListener('command-queue-empty', () => { + console.log('command-queue-empty'); if (view.mainLoop.renderingState === 0) { resolve(view.controls.getRange()); } }); + console.log(view.mainLoop); const wheelEvent = new WheelEvent('wheel', { deltaY: -50000, }); view.domElement.dispatchEvent(wheelEvent, document); window.dispatchEvent(wheelEvent, document); })); + console.log('PASSING AWAIT 3'); + console.log(finalRange); // On the travis server, the range is negative. assert.ok(Math.abs(initialPosition.range - finalRange) > 2000000); });