mirror of
https://github.com/umap-project/umap.git
synced 2025-04-30 12:12:36 +02:00
wip: fix more tests
This commit is contained in:
parent
897d4f22f4
commit
e968261dff
2 changed files with 5 additions and 4 deletions
|
@ -194,14 +194,15 @@ def test_alert_message_after_create(
|
|||
|
||||
def test_email_sending_error_are_catched(tilelayer, page, live_server):
|
||||
page.goto(f"{live_server.url}/en/map/new")
|
||||
alert = page.locator('umap-alert-creation div[role="dialog"]')
|
||||
alert_creation = page.locator('umap-alert-creation div[role="dialog"]')
|
||||
with page.expect_response(re.compile(r".*/map/create/")):
|
||||
page.get_by_role("button", name="Save").click()
|
||||
alert.get_by_placeholder("Email").fill("foo@bar.com")
|
||||
alert_creation.get_by_placeholder("Email").fill("foo@bar.com")
|
||||
with patch("umap.views.send_mail", side_effect=SMTPException) as patched:
|
||||
with page.expect_response(re.compile("/en/map/.*/send-edit-link/")):
|
||||
alert.get_by_role("input", name="Send me the link").click()
|
||||
alert_creation.get_by_role("button", name="Send me the link").click()
|
||||
assert patched.called
|
||||
alert = page.locator('umap-alert div[role="dialog"]')
|
||||
expect(alert.get_by_text("Can't send email to foo@bar.com")).to_be_visible()
|
||||
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@ def test_facets_search_are_persistent_when_closing_panel(live_server, page, map)
|
|||
DataLayerFactory(map=map, data=DATALAYER_DATA1)
|
||||
DataLayerFactory(map=map, data=DATALAYER_DATA2)
|
||||
page.goto(f"{live_server.url}{map.get_absolute_url()}#6/48.948/1.670")
|
||||
panel = page.locator(".umap-browser")
|
||||
panel = page.locator(".panel.left")
|
||||
|
||||
# Facet values
|
||||
odd = page.get_by_label("odd")
|
||||
|
|
Loading…
Reference in a new issue