From b622fc74c7bfa540b75524641f40121274495be9 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/functional/GlobeControls.js b/test/functional/GlobeControls.js index 6dbef35b97..5006972fae 100644 --- a/test/functional/GlobeControls.js +++ b/test/functional/GlobeControls.js @@ -180,19 +180,25 @@ describe('GlobeControls with globe example', function _() { it('should zoom like expected with mouse wheel', async () => { // 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); });