Skip to content

Commit

Permalink
refactor: activity name must now be given in zoomToLevel function for…
Browse files Browse the repository at this point in the history
… tests
  • Loading branch information
claustres committed Aug 27, 2024
1 parent 04d6784 commit 23919ff
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
18 changes: 9 additions & 9 deletions test/data-editor.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe(`suite:${suite}`, () => {

it('add line', async () => {
await map.goToPosition(page, 43.31588, 1.95109)
await map.zoomToLevel(page, 17)
await map.zoomToLevel(page, 'mapActivity.state.zoom', 17)
await core.clickPaneActions(page, 'right', ['layer-actions', 'edit-layer-data'], 1500)
await core.clickPaneAction(page, 'top', 'add-lines')
await core.click(page, '#map', 1000)
Expand All @@ -51,7 +51,7 @@ describe(`suite:${suite}`, () => {
})

it('add points', async () => {
await map.zoomToLevel(page, 15)
await map.zoomToLevel(page, 'mapActivity.state.zoom', 15)
await core.clickPaneActions(page, 'right', ['layer-actions', 'edit-layer-data'], 1500)
await core.clickPaneAction(page, 'top', 'add-points', 1000)
await map.moveMap(page, 'left', 2)
Expand All @@ -71,7 +71,7 @@ describe(`suite:${suite}`, () => {

it('add rectangle', async () => {
await map.goToPosition(page, 43.31501, 1.9547)
await map.zoomToLevel(page, 17)
await map.zoomToLevel(page, 'mapActivity.state.zoom', 17)
await core.clickPaneActions(page, 'right', ['layer-actions', 'edit-layer-data'], 1500)
await core.clickPaneAction(page, 'top', 'add-rectangles', 1000)
await core.click(page, '#map', 1000)
Expand All @@ -85,7 +85,7 @@ describe(`suite:${suite}`, () => {

it('add polygon', async () => {
await map.goToPosition(page, 43.31359, 1.95684)
await map.zoomToLevel(page, 17)
await map.zoomToLevel(page, 'mapActivity.state.zoom', 17)
await core.clickPaneActions(page, 'right', ['layer-actions', 'edit-layer-data'], 1500)
await core.clickPaneAction(page, 'top', 'add-polygons', 1000)
await core.click(page, '#map')
Expand Down Expand Up @@ -116,7 +116,7 @@ describe(`suite:${suite}`, () => {

it('remove rectangle', async () => {
await map.goToPosition(page, 43.31523, 1.95554)
await map.zoomToLevel(page, 17)
await map.zoomToLevel(page, 'mapActivity.state.zoom', 17)
await map.moveMap(page, 'down', 1)
await core.clickPaneActions(page, 'right', ['layer-actions', 'edit-layer-data'], 1500)
await core.clickPaneAction(page, 'top', 'remove', 1000)
Expand All @@ -128,7 +128,7 @@ describe(`suite:${suite}`, () => {

it('remove point', async () => {
await map.goToPosition(page, 43.31904, 1.96055)
await map.zoomToLevel(page, 17)
await map.zoomToLevel(page, 'mapActivity.state.zoom', 17)
await map.moveMap(page, 'down', 1)
await core.clickPaneActions(page, 'right', ['layer-actions', 'edit-layer-data'], 1500)
await core.clickPaneAction(page, 'top', 'remove', 1000)
Expand All @@ -141,7 +141,7 @@ describe(`suite:${suite}`, () => {

it('remove line', async () => {
await map.goToPosition(page, 43.31652, 1.95110)
await map.zoomToLevel(page, 17)
await map.zoomToLevel(page, 'mapActivity.state.zoom', 17)
await map.moveMap(page, 'down', 1)
await core.clickPaneActions(page, 'right', ['layer-actions', 'edit-layer-data'], 1500)
await core.clickPaneAction(page, 'top', 'remove', 1000)
Expand All @@ -154,7 +154,7 @@ describe(`suite:${suite}`, () => {

it('edit point', async () => {
await map.goToPosition(page, 43.31902, 1.94681)
await map.zoomToLevel(page, 17)
await map.zoomToLevel(page, 'mapActivity.state.zoom', 17)
await map.moveMap(page, 'down', 1)
await core.clickPaneActions(page, 'right', ['layer-actions', 'edit-layer-data'], 1500)
await core.clickPaneAction(page, 'top', 'edit-properties', 1500)
Expand All @@ -168,7 +168,7 @@ describe(`suite:${suite}`, () => {

it('edit polygon', async () => {
await map.goToPosition(page, 43.31379, 1.95728)
await map.zoomToLevel(page, 17)
await map.zoomToLevel(page, 'mapActivity.state.zoom', 17)
await map.moveMap(page, 'down', 1)
await core.clickPaneActions(page, 'right', ['layer-actions', 'edit-layer-data'], 1500)
await core.clickPaneAction(page, 'top', 'edit-properties', 1500)
Expand Down
2 changes: 1 addition & 1 deletion test/form-fields.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe(`suite:${suite}`, () => {

it('add point', async () => {
await map.goToPosition(page, 43.31902, 1.94681)
await map.zoomToLevel(page, 17)
await map.zoomToLevel(page, 'mapActivity.state.zoom', 17)
await core.clickPaneActions(page, 'right', ['layer-actions', 'edit-layer-data'], 1500)
await core.clickPaneAction(page, 'top', 'add-points', 1000)
await map.moveMap(page, 'left', 1)
Expand Down
2 changes: 1 addition & 1 deletion test/realtime-layers.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ describe(`suite:${suite}`, () => {

it('create layer', async () => {
await map.goToPosition(page, 43.31588, 1.95109)
await map.zoomToLevel(page, 17)
await map.zoomToLevel(page, 'mapActivity.state.zoom', 17)
layer = await client.getService('catalog').create(layer)
expect(await map.layerExists(page, userLayersTab, 'realtime')).beTrue()
})
Expand Down
8 changes: 4 additions & 4 deletions test/style-editor.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ describe(`suite:${suite}`, () => {
})

it('line: check min zoom visibility (13 -> not visible)', async () => {
await map.zoomToLevel(page, 13)
await map.zoomToLevel(page, 'mapActivity.state.zoom', 13)
await page.waitForTimeout(4000)
expect(await runner.captureAndMatch('S1_test3_line_min_zoom_z13')).beTrue()
})

it('line: check max zoom visibility (17 -> not visible)', async () => {
await map.zoomToLevel(page, 17)
await map.zoomToLevel(page, 'mapActivity.state.zoom', 17)
await page.waitForTimeout(4000)
expect(await runner.captureAndMatch('S1_test4_line_max_zoom_z17')).beTrue()
})
Expand All @@ -86,7 +86,7 @@ describe(`suite:${suite}`, () => {
await map.dropFile(page, runner.getDataPath('Enjeux_Inondation.geojson'))
await page.waitForTimeout(1000)
await map.goToPosition(page, 43.30095, 1.95545)
await map.zoomToLevel(page, 14)
await map.zoomToLevel(page, 'mapActivity.state.zoom', 14)
await page.waitForTimeout(3000)
expect(await runner.captureAndMatch('S2_test1_point_default_clustering')).beTrue()
})
Expand Down Expand Up @@ -115,7 +115,7 @@ describe(`suite:${suite}`, () => {
await core.click(page, '#done-button')
await core.click(page, '#apply-button')
await page.waitForTimeout(1000)
await map.zoomToLevel(page, 16)
await map.zoomToLevel(page, 'mapActivity.state.zoom', 16)
await page.waitForTimeout(3000)
expect(await runner.captureAndMatch('S2_test3_point_style_clustering_by_zoom')).beTrue()
})
Expand Down
4 changes: 2 additions & 2 deletions test/user-layers.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe(`suite:${suite}`, () => {
it('user: connect wms layer', async () => {
await core.clickPaneActions(page, 'top', ['tools', 'display-legend'])
await map.goToPosition(page, 46.62681, 2.59277)
await map.zoomToLevel(page, 7)
await map.zoomToLevel(page, 'mapActivity.state.zoom', 7)
const service = 'https://geoservices.brgm.fr/geologie?service=wms&request=getcapabilities'
const layerId = 'litho-1-m-simplifiee'
const layerName = 'Carte lithologique'
Expand All @@ -112,7 +112,7 @@ describe(`suite:${suite}`, () => {
it('user: connect wmts layer', async () => {
await core.clickPaneActions(page, 'top', ['tools', 'display-legend'])
await map.goToPosition(page, 46.83201, 8.31116)
await map.zoomToLevel(page, 8)
await map.zoomToLevel(page, 'mapActivity.state.zoom', 8)
const service = 'https://wmts.geo.admin.ch/EPSG/3857/1.0.0/WMTSCapabilities.xml'
const layerId = 'ch-bakom-notruf-112-zentral'
const layerName = '112 Alarmzentralen'
Expand Down

0 comments on commit 23919ff

Please sign in to comment.