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:
Sunil Mohan Adapa authored and James Valleroy committed 2022-09-03 17:28:31 -04:00
1 parent 75e5c71020
commit d645cfa35e
1 file changed
+2 -3
+2 -3
View File
@@ -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)