Skip to content

Commit

Permalink
refactor(3dtiles_ion): to reset: tests functional test 3dtile_ion
Browse files Browse the repository at this point in the history
  • Loading branch information
ftoromanoff committed May 3, 2024
1 parent a942010 commit 69f1099
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/functional/3dtiles_ion.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,25 @@ describe('3dtiles_ion', function _() {
});

it('should pick a building from 3D', async () => {
// const res = await page.evaluate(() => {
await page.evaluate(() => {
const lyonExtent = new itowns.Extent('EPSG:4326', 4.85, 4.9, 45.75, 45.77);
itowns.CameraUtils.transformCameraToLookAtTarget(view, view.camera3D, lyonExtent);
return 'transformCameraToLookAtTarget sent';
});
// console.log(res);
await waitUntilItownsIsIdle(this.fullTitle());
// console.log('waitUntilItownsIsIdle', this.fullTitle());
const layers = await page.evaluate(
() => view.pickObjectsAt({
x: 166,
y: 65,
})
.map(p => p.layer.id),
);
// console.log(layers);

assert.ok(layers.indexOf('3d-tiles-cesium-ion') >= 0);
assert.ok(layers.length > 0, 'layer picked is empty');
assert.ok(layers.indexOf('3d-tiles-cesium-ion') >= 0, '3d-tiles-cesium-ion was not found');
});
});

0 comments on commit 69f1099

Please sign in to comment.