mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
zoph: tests: functional: Simplify finding the form to submit
Tests: - Run Zoph functional tests. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
75e5c71020
commit
d645cfa35e
@ -4,6 +4,7 @@ Functional, browser based tests for zoph app.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from plinth.tests import functional
|
||||
|
||||
pytestmark = [pytest.mark.apps, pytest.mark.zoph]
|
||||
@ -24,9 +25,7 @@ class TestZophApp(functional.BaseAppTests):
|
||||
def _zoph_is_setup(self, session_browser):
|
||||
"""Click setup button on the setup page."""
|
||||
functional.nav_to_module(session_browser, self.app_name)
|
||||
button = session_browser.find_by_css('input[name="zoph_setup"]')
|
||||
if button:
|
||||
functional.submit(session_browser, element=button)
|
||||
functional.submit(session_browser, form_class='form-configuration')
|
||||
|
||||
def assert_app_running(self, session_browser):
|
||||
assert functional.app_is_enabled(session_browser, self.app_name)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user