Add a first test for the tablerows widget
This commit is contained in:
parent
acea1f7645
commit
dabe56da2a
|
@ -0,0 +1,44 @@
|
|||
import twill
|
||||
import datetime
|
||||
import utils
|
||||
|
||||
def setup():
|
||||
'''Set up test form with tablerows widget'''
|
||||
utils.login('admin')
|
||||
twill.execute_string('''
|
||||
go http://localhost:10003/admin/forms/new
|
||||
fv 1 name tablerows
|
||||
submit
|
||||
|
||||
fv 1 label table
|
||||
fv 1 type 'Table with rows'
|
||||
submit
|
||||
|
||||
go http://localhost:10003/admin/forms/1/fields/1/
|
||||
fv 1 columns$element0 Col1
|
||||
submit "Add column"
|
||||
fv 1 columns$element1 Col2
|
||||
submit "Add column"
|
||||
fv 1 columns$element2 Col3
|
||||
submit Submit
|
||||
''')
|
||||
|
||||
def teardown():
|
||||
'''Tear down form'''
|
||||
twill.execute_string('''
|
||||
go http://localhost:10003/admin/forms/1/delete
|
||||
submit
|
||||
''')
|
||||
utils.logout()
|
||||
|
||||
def test_fill_base_form():
|
||||
'''Table with rows widget: basis'''
|
||||
twill.execute_string('''
|
||||
go http://localhost:10003/tablerows
|
||||
fv 1 f1$element0$col0 12
|
||||
fv 1 f1$element0$col1 14
|
||||
fv 1 f1$element0$col2 8
|
||||
submit Next
|
||||
find 'Check values'
|
||||
''')
|
||||
|
Loading…
Reference in New Issue