From 6841b5fc0f0e50a8d99aa833e4a9d7dfe8731c4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Tue, 2 Apr 2024 11:23:07 +0200 Subject: [PATCH] tests: Fix the test with the proper data. --- umap/static/umap/js/modules/schema.js | 5 ++++- umap/tests/integration/test_on_edit.py | 5 ++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/umap/static/umap/js/modules/schema.js b/umap/static/umap/js/modules/schema.js index ada14f02..b2984402 100644 --- a/umap/static/umap/js/modules/schema.js +++ b/umap/static/umap/js/modules/schema.js @@ -393,7 +393,10 @@ export const SCHEMA = { inheritable: true, default: 1.0, }, - sortKey: { impacts: ['data', 'datalayer-index'], type: String }, + sortKey: { + type: String, + impacts: ['datalayer-index', 'data'], + }, starControl: { type: Boolean, impacts: ['ui'], diff --git a/umap/tests/integration/test_on_edit.py b/umap/tests/integration/test_on_edit.py index fbe65ad2..2ebda5ae 100644 --- a/umap/tests/integration/test_on_edit.py +++ b/umap/tests/integration/test_on_edit.py @@ -128,7 +128,7 @@ def test_sortkey_impacts_datalayerindex(map, live_server, page): "type": "Point", "coordinates": [13.7, 48.4], }, - "properties": {"name": "Y Second", "key": "3d Point"}, + "properties": {"name": "Y Second", "key": "2d Point"}, }, { "type": "Feature", @@ -136,7 +136,7 @@ def test_sortkey_impacts_datalayerindex(map, live_server, page): "type": "Point", "coordinates": [13.5, 48.6], }, - "properties": {"name": "X Third", "key": "2d Point"}, + "properties": {"name": "X Third", "key": "3rd Point"}, }, ], }, @@ -175,7 +175,6 @@ def test_sortkey_impacts_datalayerindex(map, live_server, page): page.locator("div:nth-child(4) > div:nth-child(2) > .button").first.click() # Features should be sorted by key (First, Second, Third) - page.get_by_role("button", name="See data layers").click() page.get_by_role("button", name="Browse data").click() first_listed_feature = page.locator("#browse_data_datalayer_123 > ul > li").nth(0)