-
-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move layer specific settings to a dedicated fieldset
cf #1490
- Loading branch information
1 parent
fb6230d
commit 75ff147
Showing
3 changed files
with
103 additions
and
20 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
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
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,45 @@ | ||
from playwright.sync_api import expect | ||
|
||
|
||
def test_should_have_fieldset_for_layer_type_properties(page, live_server, tilelayer): | ||
page.goto(f"{live_server.url}/en/map/new/") | ||
|
||
# Open DataLayers list | ||
button = page.get_by_title("Manage Layers") | ||
expect(button).to_be_visible() | ||
button.click() | ||
|
||
edit = page.locator("#umap-ui-container").get_by_title("Edit", exact=True) | ||
expect(edit).to_be_visible() | ||
edit.click() | ||
|
||
select = page.locator("#umap-ui-container .umap-field-type select") | ||
expect(select).to_be_visible() | ||
|
||
choropleth_header = page.get_by_text("Choropleth: settings") | ||
heat_header = page.get_by_text("Heatmap: settings") | ||
cluster_header = page.get_by_text("Clustered: settings") | ||
expect(choropleth_header).to_be_hidden() | ||
expect(heat_header).to_be_hidden() | ||
expect(cluster_header).to_be_hidden() | ||
|
||
# Switching to Choropleth should add a dedicated fieldset | ||
select.select_option("Choropleth") | ||
expect(choropleth_header).to_be_visible() | ||
expect(heat_header).to_be_hidden() | ||
expect(cluster_header).to_be_hidden() | ||
|
||
select.select_option("Heat") | ||
expect(heat_header).to_be_visible() | ||
expect(choropleth_header).to_be_hidden() | ||
expect(cluster_header).to_be_hidden() | ||
|
||
select.select_option("Cluster") | ||
expect(cluster_header).to_be_visible() | ||
expect(choropleth_header).to_be_hidden() | ||
expect(heat_header).to_be_hidden() | ||
|
||
select.select_option("Default") | ||
expect(choropleth_header).to_be_hidden() | ||
expect(heat_header).to_be_hidden() | ||
expect(cluster_header).to_be_hidden() |