Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
officejs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
officejs
Commits
3baa7364
Commit
3baa7364
authored
Aug 02, 2011
by
Gabriel L. Oliveira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into erp5_selenium_test
parents
87e28097
c975a038
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
tests/selenium/testUNGDocsTableEditor.py
tests/selenium/testUNGDocsTableEditor.py
+20
-10
No files found.
tests/selenium/testUNGDocsTableEditor.py
View file @
3baa7364
...
@@ -6,20 +6,30 @@ class TestUNGDocsTableEditor(UNGTestMixin):
...
@@ -6,20 +6,30 @@ class TestUNGDocsTableEditor(UNGTestMixin):
def
test_fill_some_cells_in_web_table
(
self
):
def
test_fill_some_cells_in_web_table
(
self
):
"""test the action of add, fill cells, assert title of sheet and
"""test the action of add, fill cells, assert title of sheet and
content of cells of a Web Table document"""
content of cells of a Web Table document"""
self
.
selenium
.
open
(
"ERP5Site_createNewWebDocument?template=web_table_template"
)
self
.
selenium
.
open
(
"ERP5Site_createNewWebDocument?"
"template=web_table_template"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"Web Table"
,
self
.
selenium
.
get_text
(
"//a[@name=
\
"
document_title
\
"
]"
))
self
.
assertEqual
(
"Web Table"
,
self
.
selenium
.
get_text
(
self
.
failUnless
(
self
.
selenium
.
is_element_present
(
"//td[@id='0_table0_cell_c0_r1']"
))
"//a[@name=
\
"
document_title
\
"
]"
))
self
.
failUnless
(
self
.
selenium
.
is_element_present
(
"//td[@id='0_table0_cell_c1_r1']"
))
self
.
failUnless
(
self
.
selenium
.
is_element_present
(
self
.
assertEqual
(
"Spreadsheet Playground"
,
self
.
selenium
.
get_text
(
"//td[@id=
\
"
jSheetTitle_0
\
"
]"
))
"//td[@id='0_table0_cell_c0_r1']"
))
self
.
assertEqual
(
"MENU"
,
self
.
selenium
.
get_text
(
"//td[@id=
\
"
jSheetMenu_0
\
"
]/span[@class=
\
"
rootVoice
\
"
]"
))
self
.
failUnless
(
self
.
selenium
.
is_element_present
(
self
.
selenium
.
run_script
(
"$(
\
"
#0_table0_cell_c0_r0
\
"
).html(
\
"
Gabriel
\
"
)"
)
"//td[@id='0_table0_cell_c1_r1']"
))
self
.
selenium
.
run_script
(
"$(
\
"
#0_table0_cell_c1_r1
\
"
).html(
\
"
Monnerat
\
"
)"
)
self
.
assertEqual
(
"Spreadsheet Playground"
,
self
.
selenium
.
get_text
(
"//td[@id=
\
"
jSheetTitle_0
\
"
]"
))
self
.
assertEqual
(
"MENU"
,
self
.
selenium
.
get_text
(
"//td"
"[@id=
\
"
jSheetMenu_0
\
"
]/span[@class=
\
"
rootVoice
\
"
]"
))
self
.
selenium
.
run_script
(
"$(
\
"
#0_table0_cell_c0_r0
\
"
)"
".html(
\
"
Gabriel
\
"
)"
)
self
.
selenium
.
run_script
(
"$(
\
"
#0_table0_cell_c1_r1
\
"
)"
".html(
\
"
Monnerat
\
"
)"
)
self
.
selenium
.
click
(
"//button[@class=
\
"
save
\
"
]"
)
self
.
selenium
.
click
(
"//button[@class=
\
"
save
\
"
]"
)
for
page_reload
in
range
(
2
):
for
page_reload
in
range
(
2
):
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"Gabriel"
,
self
.
selenium
.
get_text
(
"//td[@id='0_table0_cell_c0_r0']"
))
self
.
assertEqual
(
"Gabriel"
,
self
.
selenium
.
get_text
(
self
.
assertEqual
(
"Monnerat"
,
self
.
selenium
.
get_text
(
"//td[@id='0_table0_cell_c1_r1']"
))
"//td[@id='0_table0_cell_c0_r0']"
))
self
.
assertEqual
(
"Monnerat"
,
self
.
selenium
.
get_text
(
"//td[@id='0_table0_cell_c1_r1']"
))
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment