-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
578 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import _ from 'lodash' | ||
import chai, { util, expect } from 'chai' | ||
import chailint from 'chai-lint' | ||
|
||
import { core, map } from '@kalisio/kdk/test.client.js' | ||
|
||
const suite = '3D' | ||
|
||
const catalogLayersTab = 'catalog-layers-tab' | ||
const userLayersTab = 'user-layers-tab' | ||
|
||
describe(`suite:${suite}`, () => { | ||
let runner, page | ||
const user = { email: '[email protected]', password: 'Pass;word1' } | ||
|
||
before(async () => { | ||
chailint(chai, util) | ||
|
||
runner = new core.Runner(suite, { | ||
appName: 'kano', | ||
user: user.email, | ||
geolocation: { latitude: 43.10, longitude: 1.71 }, | ||
localStorage: { | ||
'kano-welcome': false | ||
} | ||
}) | ||
page = await runner.start() | ||
await core.login(page, user) | ||
}) | ||
|
||
it('import data and switch to 3D mode', async () => { | ||
await map.importLayer(page, runner.getDataPath('trace.gpx')) | ||
await map.saveLayer(page, userLayersTab, 'trace') | ||
await core.clickPaneAction(page, 'top', 'toggle-globe') | ||
await map.zoomToLayer(page, userLayersTab, 'trace') | ||
}) | ||
|
||
it('check terrain layer category', async () => { | ||
await map.clickCatalogTab(page, catalogLayersTab) | ||
const categoryId = await map.getLayerCategoryId(page, map.getLayerId('K2')) | ||
expect(categoryId).to.equal('categories-terrain-layers') | ||
expect(await map.isLayerCategoryOpened(page, categoryId)).beFalse() | ||
await map.clickLayerCategory(page, catalogLayersTab, categoryId) | ||
expect(await map.isLayerCategoryOpened(page, categoryId)).beTrue() | ||
await core.clickOpener(page, 'right') | ||
}) | ||
|
||
it('check base and terrain layers', async () => { | ||
await core.clickOpener(page, 'right') | ||
const layers = ['IMAGERY', 'K2'] | ||
for (const layer of layers) { | ||
await map.clickLayer(page, catalogLayersTab, layer) | ||
} | ||
await core.clickOpener(page, 'right') | ||
expect(await runner.captureAndMatch('terrain')).beTrue() | ||
}).timeout(60000) | ||
|
||
it('remove layer', async () => { | ||
await map.removeLayer(page, userLayersTab, 'trace') | ||
}) | ||
|
||
after(async () => { | ||
await core.logout(page) | ||
await runner.stop() | ||
}) | ||
}) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.