From 5e0ea8e3752dae6362b8cc0f46085c3c3b752bba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 4 Mar 2016 11:33:13 +0100 Subject: [PATCH] backoffice: make it possible to have the global view as default (#10139) --- tests/test_backoffice_pages.py | 16 +++++++++------- wcs/backoffice/management.py | 11 ++++++++--- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/tests/test_backoffice_pages.py b/tests/test_backoffice_pages.py index 8d7e30f..1eedcbe 100644 --- a/tests/test_backoffice_pages.py +++ b/tests/test_backoffice_pages.py @@ -192,6 +192,7 @@ def test_backoffice_forms(pub): app = login(get_app(pub)) resp = app.get('/backoffice/') resp = resp.click('Management', index=0) + resp = resp.follow() assert not 'Forms in your care' in resp.body assert re.findall('Other Forms.*form-title', resp.body) @@ -200,6 +201,7 @@ def test_backoffice_forms(pub): app = login(get_app(pub)) resp = app.get('/backoffice/') resp = resp.click('Management', index=0) + resp = resp.follow() assert 'Forms in your care' in resp.body assert '17 open on 50' in resp.body @@ -644,7 +646,7 @@ def test_backoffice_handling_post_dispatch(pub): app = login(get_app(pub)) # check there's no access at the moment - resp = app.get('/backoffice/management/') + resp = app.get('/backoffice/management/').follow() assert not 'form-title/' in resp.body resp = app.get('/backoffice/management/form-title/', status=403) resp = app.get('/backoffice/management/form-title/%s/' % number31.id, status=403) @@ -656,7 +658,7 @@ def test_backoffice_handling_post_dispatch(pub): formdata31.store() # check listing is accessible, with a single item - resp = app.get('/backoffice/management/') + resp = app.get('/backoffice/management/').follow() assert 'form-title/' in resp.body resp = app.get('/backoffice/management/form-title/', status=200) assert re.findall('', resp.body, re.DOTALL)[0].count('') rt += htmltext('

%s

') % _('Global View') rt += htmltext('
') - rt += htmltext('%s') % _('Forms View') + rt += htmltext('%s') % _('Forms View') rt += htmltext('
') rt += htmltext('') rt += get_session().display_message() -- 2.7.0