mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
[sunil] - Move the script to plinth/tests/functional directory as it is the right place for it. - Add HACKING.md entry to talk about the script. - Update the pyproject.toml to ensure that functional tests config.ini is installed along with functional tests python code. Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
32 lines
682 B
Python
Executable File
32 lines
682 B
Python
Executable File
#!/usr/bin/python3
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
#
|
|
# Set FREEDOMBOX_URL to the URL of the FreedomBox on which
|
|
# all apps will be enabled.
|
|
|
|
from splinter import Browser
|
|
|
|
from plinth import app as app_module, module_loader
|
|
from plinth.tests.functional import app_enable, install, login
|
|
|
|
module_loader.load_modules()
|
|
app_module.apps_init()
|
|
|
|
browser = Browser('firefox')
|
|
login(browser)
|
|
|
|
for app in app_module.App.list():
|
|
app_name = app.app_id
|
|
try:
|
|
# Some apps cannot be installed.
|
|
install(browser, app_name)
|
|
except:
|
|
pass
|
|
|
|
try:
|
|
app_enable(browser, app_name)
|
|
except:
|
|
# Some apps cannot be enabled.
|
|
pass
|