192 |
192 |
app = login(get_app(pub))
|
193 |
193 |
resp = app.get('/backoffice/')
|
194 |
194 |
resp = resp.click('Management', index=0)
|
|
195 |
resp = resp.follow()
|
195 |
196 |
assert not 'Forms in your care' in resp.body
|
196 |
197 |
assert re.findall('Other Forms.*form-title', resp.body)
|
197 |
198 |
|
... | ... | |
200 |
201 |
app = login(get_app(pub))
|
201 |
202 |
resp = app.get('/backoffice/')
|
202 |
203 |
resp = resp.click('Management', index=0)
|
|
204 |
resp = resp.follow()
|
203 |
205 |
assert 'Forms in your care' in resp.body
|
204 |
206 |
assert '17 open on 50' in resp.body
|
205 |
207 |
|
... | ... | |
644 |
646 |
app = login(get_app(pub))
|
645 |
647 |
|
646 |
648 |
# check there's no access at the moment
|
647 |
|
resp = app.get('/backoffice/management/')
|
|
649 |
resp = app.get('/backoffice/management/').follow()
|
648 |
650 |
assert not 'form-title/' in resp.body
|
649 |
651 |
resp = app.get('/backoffice/management/form-title/', status=403)
|
650 |
652 |
resp = app.get('/backoffice/management/form-title/%s/' % number31.id, status=403)
|
... | ... | |
656 |
658 |
formdata31.store()
|
657 |
659 |
|
658 |
660 |
# check listing is accessible, with a single item
|
659 |
|
resp = app.get('/backoffice/management/')
|
|
661 |
resp = app.get('/backoffice/management/').follow()
|
660 |
662 |
assert 'form-title/' in resp.body
|
661 |
663 |
resp = app.get('/backoffice/management/form-title/', status=200)
|
662 |
664 |
assert re.findall('<tbody.*\/tbody>', resp.body, re.DOTALL)[0].count('<tr') == 1
|
... | ... | |
1313 |
1315 |
create_user(pub)
|
1314 |
1316 |
create_environment(pub)
|
1315 |
1317 |
app = login(get_app(pub))
|
1316 |
|
resp = app.get('/backoffice/management/')
|
|
1318 |
resp = app.get('/backoffice/management/').follow()
|
1317 |
1319 |
assert 'Global View' in resp.body
|
1318 |
1320 |
resp = resp.click('Global View')
|
1319 |
1321 |
assert resp.body.count('<tr') == 20
|
... | ... | |
1364 |
1366 |
code.formdata = formdata
|
1365 |
1367 |
|
1366 |
1368 |
app = login(get_app(pub))
|
1367 |
|
resp = app.get('/backoffice/management/')
|
|
1369 |
resp = app.get('/backoffice/management/').follow()
|
1368 |
1370 |
assert 'id="tracking-code"' in resp.body
|
1369 |
1371 |
resp.forms[0]['code'] = formdata.tracking_code
|
1370 |
1372 |
resp = resp.forms[0].submit()
|
... | ... | |
1376 |
1378 |
# check there's no access to other formdata
|
1377 |
1379 |
app.get('http://example.net/backoffice/management/form-title/%s/' % formdata2.id, status=403)
|
1378 |
1380 |
|
1379 |
|
resp = app.get('/backoffice/management/')
|
|
1381 |
resp = app.get('/backoffice/management/').follow()
|
1380 |
1382 |
resp.forms[0]['code'] = 'AAAAAAAA'
|
1381 |
1383 |
resp = resp.forms[0].submit()
|
1382 |
1384 |
assert resp.location == 'http://example.net/backoffice/management/'
|
1383 |
|
resp = resp.follow()
|
|
1385 |
resp = resp.follow().follow()
|
1384 |
1386 |
assert 'No such code' in resp.body
|
1385 |
1387 |
|
1386 |
1388 |
if pub.is_using_postgresql():
|
... | ... | |
1611 |
1613 |
user = create_user(pub)
|
1612 |
1614 |
create_environment(pub)
|
1613 |
1615 |
app = login(get_app(pub))
|
1614 |
|
resp = app.get('/backoffice/management/')
|
|
1616 |
resp = app.get('/backoffice/management/').follow()
|
1615 |
1617 |
assert '360 User View' in resp.body
|
1616 |
1618 |
resp = resp.click('360 User View')
|
1617 |
1619 |
assert 'Use the search field on the right' in resp.body
|