mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
config: Rename Default App to Webserver Home Page
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
a87b0ff596
commit
8bc34f84c3
8 files changed
+60
-54
No files matched your search
@@ -30,10 +30,10 @@ Scenario: Change domain name
|
||||
When I change the domain name to mydomain.example
|
||||
Then the domain name should be mydomain.example
|
||||
|
||||
Scenario: Change default app
|
||||
Scenario: Change webserver home page
|
||||
Given the syncthing application is installed
|
||||
And the syncthing application is enabled
|
||||
And the default app is syncthing
|
||||
When I change the default app to plinth
|
||||
Then the default app should be plinth
|
||||
And the home page is syncthing
|
||||
When I change the home page to plinth
|
||||
Then the home page should be plinth
|
||||
|
||||
@@ -45,9 +45,9 @@ def downloaded_file_info():
|
||||
return dict()
|
||||
|
||||
|
||||
@given(parsers.parse('the default app is {app_name:w}'))
|
||||
def set_default_app(browser, app_name):
|
||||
system.set_default_app(browser, app_name)
|
||||
@given(parsers.parse('the home page is {app_name:w}'))
|
||||
def set_home_page(browser, app_name):
|
||||
system.set_home_page(browser, app_name)
|
||||
|
||||
|
||||
@given(parsers.parse('the domain name is set to {domain:S}'))
|
||||
@@ -65,9 +65,9 @@ def change_domain_name_to(browser, domain):
|
||||
system.set_domain_name(browser, domain)
|
||||
|
||||
|
||||
@when(parsers.parse('I change the default app to {app_name:w}'))
|
||||
def change_default_app_to(browser, app_name):
|
||||
system.set_default_app(browser, app_name)
|
||||
@when(parsers.parse('I change the home page to {app_name:w}'))
|
||||
def change_home_page_to(browser, app_name):
|
||||
system.set_home_page(browser, app_name)
|
||||
|
||||
|
||||
@when('I change the language to <language>')
|
||||
@@ -157,8 +157,8 @@ def snapshot_assert_configuration(browser, free_space, timeline_enabled,
|
||||
yearly) == system.snapshot_get_configuration(browser)
|
||||
|
||||
|
||||
@then(parsers.parse('the default app should be {app_name:w}'))
|
||||
def default_app_should_be(browser, app_name):
|
||||
@then(parsers.parse('the home page should be {app_name:w}'))
|
||||
def home_page_should_be(browser, app_name):
|
||||
assert system.check_home_page_redirect(browser, app_name)
|
||||
|
||||
|
||||
|
||||
@@ -15,9 +15,10 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from urllib.parse import urlparse
|
||||
import requests
|
||||
import tempfile
|
||||
from urllib.parse import urlparse
|
||||
|
||||
import requests
|
||||
|
||||
from . import application, config
|
||||
from .interface import default_url, nav_to_module, submit
|
||||
@@ -62,10 +63,10 @@ def set_domain_name(browser, domain_name):
|
||||
submit(browser)
|
||||
|
||||
|
||||
def set_default_app(browser, app_name):
|
||||
def set_home_page(browser, home_page):
|
||||
nav_to_module(browser, 'config')
|
||||
drop_down = browser.find_by_id('id_configuration-defaultapp')
|
||||
drop_down.select(app_name)
|
||||
drop_down = browser.find_by_id('id_configuration-homepage')
|
||||
drop_down.select(home_page)
|
||||
submit(browser)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user