Skip to content

Commit

Permalink
feat: test
Browse files Browse the repository at this point in the history
  • Loading branch information
Desplandis committed Dec 19, 2024
1 parent dc48291 commit d30494e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 65 deletions.
64 changes: 0 additions & 64 deletions test/functional/.eslintrc.cjs

This file was deleted.

8 changes: 7 additions & 1 deletion test/functional/GlobeControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Check warning on line 183 in test/functional/GlobeControls.js

View workflow job for this annotation

GitHub Actions / Build bundle, check Linter and generate documentation

Unexpected console statement
await page.mouse.move(middleWidth, middleHeight, { steps: 20 });
console.log('PASSING AWAIT 2');

Check warning on line 185 in test/functional/GlobeControls.js

View workflow job for this annotation

GitHub Actions / Build bundle, check Linter and generate documentation

Unexpected console statement
const finalRange = await page.evaluate(() => new Promise((resolve) => {
view.mainLoop.addEventListener('command-queue-empty', () => {
console.log('command-queue-empty');

Check warning on line 188 in test/functional/GlobeControls.js

View workflow job for this annotation

GitHub Actions / Build bundle, check Linter and generate documentation

Unexpected console statement
if (view.mainLoop.renderingState === 0) {
resolve(view.controls.getRange());
}
});
console.log(view.mainLoop);

Check warning on line 193 in test/functional/GlobeControls.js

View workflow job for this annotation

GitHub Actions / Build bundle, check Linter and generate documentation

Unexpected console statement
const wheelEvent = new WheelEvent('wheel', {
deltaY: -50000,
});
view.domElement.dispatchEvent(wheelEvent, document);
window.dispatchEvent(wheelEvent, document);
}));
console.log('PASSING AWAIT 3');

Check warning on line 200 in test/functional/GlobeControls.js

View workflow job for this annotation

GitHub Actions / Build bundle, check Linter and generate documentation

Unexpected console statement
console.log(finalRange);

Check warning on line 201 in test/functional/GlobeControls.js

View workflow job for this annotation

GitHub Actions / Build bundle, check Linter and generate documentation

Unexpected console statement
// On the travis server, the range is negative.
assert.ok(Math.abs(initialPosition.range - finalRange) > 2000000);
});
Expand Down

0 comments on commit d30494e

Please sign in to comment.