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 2022-08-30 17:19:21 -07:00 committed by James Valleroy
parent 75e5c71020
commit d645cfa35e
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

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)