mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
wireguard: Update functional tests to handle Start Server button
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
53f7c75d8e
commit
0614b5e509
@ -59,7 +59,7 @@
|
||||
{% if not server.public_key %}
|
||||
<form method="post" action="{% url 'wireguard:enable-server' %}">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-primary"
|
||||
<button type="submit" class="btn btn-primary btn-start-server"
|
||||
title="{% trans 'Start WireGuard Server' %}">
|
||||
<span class="fa fa-rocket" aria-hidden="true"></span>
|
||||
{% trans "Start WireGuard Server" %}
|
||||
|
||||
@ -67,6 +67,11 @@ class TestWireguardApp(functional.BaseAppTests):
|
||||
def _add_client(browser, key):
|
||||
"""Add a client."""
|
||||
functional.nav_to_module(browser, 'wireguard')
|
||||
# Start the server on FreedomBox, if needed.
|
||||
start_server_button = browser.find_by_css('.btn-start-server')
|
||||
if start_server_button:
|
||||
start_server_button.first.click()
|
||||
|
||||
browser.find_by_css('.btn-add-client').first.click()
|
||||
browser.find_by_id('id_public_key').fill(key)
|
||||
functional.submit(browser, form_class='form-add-client')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user