From c4f087ea4a372b275234310450c862dcd13e14fe Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 23 Aug 2023 14:54:44 -0700 Subject: [PATCH] networks, samba: tests: functional: Fix setting firewall zone Without the changes, the form submission for setting firewall zone fails with error similar to "element can't be scrolled to view". Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/networks/templates/connections_create.html | 2 +- plinth/modules/networks/templates/connections_edit.html | 2 +- plinth/tests/functional/__init__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plinth/modules/networks/templates/connections_create.html b/plinth/modules/networks/templates/connections_create.html index 3e2a6651d..84d7b81be 100644 --- a/plinth/modules/networks/templates/connections_create.html +++ b/plinth/modules/networks/templates/connections_create.html @@ -10,7 +10,7 @@

{{ title }}

-
+ {% csrf_token %} {{ form|bootstrap }} diff --git a/plinth/modules/networks/templates/connections_edit.html b/plinth/modules/networks/templates/connections_edit.html index c61ec1c69..3cecdd54a 100644 --- a/plinth/modules/networks/templates/connections_edit.html +++ b/plinth/modules/networks/templates/connections_edit.html @@ -11,7 +11,7 @@

{{ title }}

- + {% csrf_token %} {{ form|bootstrap }} diff --git a/plinth/tests/functional/__init__.py b/plinth/tests/functional/__init__.py index a8e601d46..26a74b2d9 100644 --- a/plinth/tests/functional/__init__.py +++ b/plinth/tests/functional/__init__.py @@ -566,7 +566,7 @@ def networks_set_firewall_zone(browser, zone): edit_url = "/plinth/sys/networks/{}/edit/".format(network_id) browser.links.find_by_href(edit_url).first.click() browser.select('zone', zone) - browser.find_by_tag("form").first.find_by_tag('input')[-1].click() + submit(browser, form_class='form-connection-edit') ##################