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
5c1cfb93
Commit
5c1cfb93
authored
Aug 02, 2011
by
Gabriel L. Oliveira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor test to follow guidelines
parent
32489131
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
testUNGDocsTableEditor.py
testUNGDocsTableEditor.py
+20
-10
No files found.
testUNGDocsTableEditor.py
View file @
5c1cfb93
...
...
@@ -6,20 +6,30 @@ class TestUNGDocsTableEditor(UNGTestMixin):
def
test_fill_some_cells_in_web_table
(
self
):
"""test the action of add, fill cells, assert title of sheet and
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
.
assertEqual
(
"Web Table"
,
self
.
selenium
.
get_text
(
"//a[@name=
\
"
document_title
\
"
]"
))
self
.
failUnless
(
self
.
selenium
.
is_element_present
(
"//td[@id='0_table0_cell_c0_r1']"
))
self
.
failUnless
(
self
.
selenium
.
is_element_present
(
"//td[@id='0_table0_cell_c1_r1']"
))
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
.
assertEqual
(
"Web Table"
,
self
.
selenium
.
get_text
(
"//a[@name=
\
"
document_title
\
"
]"
))
self
.
failUnless
(
self
.
selenium
.
is_element_present
(
"//td[@id='0_table0_cell_c0_r1']"
))
self
.
failUnless
(
self
.
selenium
.
is_element_present
(
"//td[@id='0_table0_cell_c1_r1']"
))
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
\
"
]"
)
for
page_reload
in
range
(
2
):
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"Gabriel"
,
self
.
selenium
.
get_text
(
"//td[@id='0_table0_cell_c0_r0']"
))
self
.
assertEqual
(
"Monnerat"
,
self
.
selenium
.
get_text
(
"//td[@id='0_table0_cell_c1_r1']"
))
self
.
assertEqual
(
"Gabriel"
,
self
.
selenium
.
get_text
(
"//td[@id='0_table0_cell_c0_r0']"
))
self
.
assertEqual
(
"Monnerat"
,
self
.
selenium
.
get_text
(
"//td[@id='0_table0_cell_c1_r1']"
))
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