mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
- Fixes an issue with zoph not being setup after uninstall+install setup and makes a test pass. - Some failures exist but don't seem related to this change. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
34 lines
1.0 KiB
Python
34 lines
1.0 KiB
Python
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
"""
|
|
Functional, browser based tests for zoph app.
|
|
"""
|
|
|
|
import pytest
|
|
|
|
from plinth.tests import functional
|
|
|
|
pytestmark = [pytest.mark.apps, pytest.mark.zoph]
|
|
|
|
|
|
class TestZophApp(functional.BaseAppTests):
|
|
app_name = 'zoph'
|
|
has_service = False
|
|
has_web = True
|
|
|
|
def install_and_setup(self, session_browser):
|
|
"""Install the app and run setup."""
|
|
super().install_and_setup(session_browser)
|
|
self._zoph_is_setup(session_browser)
|
|
|
|
def _zoph_is_setup(self, session_browser):
|
|
"""Click setup button on the setup page."""
|
|
functional.nav_to_module(session_browser, self.app_name)
|
|
if session_browser.find_by_css('.form-configuration'):
|
|
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)
|
|
|
|
def assert_app_not_running(self, session_browser):
|
|
assert not functional.app_is_enabled(session_browser, self.app_name)
|