summaryrefslogtreecommitdiffstats
path: root/tests/test_manager.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_manager.py')
-rw-r--r--tests/test_manager.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_manager.py b/tests/test_manager.py
index 8392f42..8aafd61 100644
--- a/tests/test_manager.py
+++ b/tests/test_manager.py
@@ -342,18 +342,18 @@ def test_add_edit_cell(app, admin_user):
resp = app.get('/manage/pages/%s/' % page.id)
# click on first option link, this should add a text cell
resp = app.get(resp.html.find('option').get('data-add-url'))
- assert resp.location.endswith('/manage/pages/1/')
cells = CellBase.get_cells(page_id=page.id)
assert len(cells) == 1
assert isinstance(cells[0], TextCell)
+ assert resp.location.endswith('/manage/pages/1/#cell-%s' % cells[0].get_reference())
resp = app.get('/manage/pages/%s/' % page.id)
assert ('data-cell-reference="%s"' % cells[0].get_reference()) in resp.text
resp.forms[0]['c%s-text' % cells[0].get_reference()].value = 'Hello world'
resp = resp.forms[0].submit()
assert resp.status_int == 302
- assert resp.location.endswith('/manage/pages/1/')
+ assert resp.location.endswith('/manage/pages/1/#cell-%s' % cells[0].get_reference())
resp = app.get('/manage/pages/%s/' % page.id)
assert resp.forms[0]['c%s-text' % cells[0].get_reference()].value == 'Hello world'
@@ -557,11 +557,11 @@ def test_edit_text_cell(app, admin_user):
resp = app.get('/manage/pages/%s/' % page.id)
data_add_url = [x for x in resp.html.find_all('option') if x.text == 'Text'][0].get('data-add-url')
resp = app.get(data_add_url)
- assert resp.location.endswith('/manage/pages/%s/' % page.id)
cells = CellBase.get_cells(page_id=page.id)
assert len(cells) == 1
assert isinstance(cells[0], TextCell)
+ assert resp.location.endswith('/manage/pages/%s/#cell-%s' % (page.id, cells[0].get_reference()))
resp = app.get('/manage/pages/%s/' % page.id)
resp.form['cdata_textcell-%s-text' % cells[0].id].value = 'Hello : World'
@@ -594,12 +594,12 @@ def test_edit_config_json_cell(app, admin_user):
assert 'Foobar' in options
data_add_url = [x for x in resp.html.find_all('option') if x.text == 'Foobar'][0].get('data-add-url')
resp = app.get(data_add_url)
- assert resp.location.endswith('/manage/pages/%s/' % page.id)
cells = CellBase.get_cells(page_id=page.id)
assert len(cells) == 1
assert isinstance(cells[0], ConfigJsonCell)
assert cells[0].key == 'test-config-json-cell'
+ assert resp.location.endswith('/manage/pages/%s/#cell-%s' % (page.id, cells[0].get_reference()))
resp = app.get('/manage/pages/%s/' % page.id)
assert ('data-cell-reference="%s"' % cells[0].get_reference()) in resp.text
@@ -641,7 +641,7 @@ def test_edit_config_json_cell(app, admin_user):
resp.form['c%s-test3' % cells[0].get_reference()].value = 'Hello again'
resp = resp.form.submit()
assert resp.status_int == 302
- assert resp.location.endswith('/manage/pages/%s/' % page.id)
+ assert resp.location.endswith('/manage/pages/%s/#cell-%s' % (page.id, cells[0].get_reference()))
resp = app.get('/manage/pages/%s/' % page.id)
assert resp.form['c%s-test' % cells[0].get_reference()].value == 'Hello world'