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
d89d123b
Commit
d89d123b
authored
Aug 02, 2011
by
Gabriel L. Oliveira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor to follow guidelines
parent
5cad3839
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
testUNGDocs.py
testUNGDocs.py
+18
-9
No files found.
testUNGDocs.py
View file @
d89d123b
...
...
@@ -133,26 +133,35 @@ class TestUNGDocs(UNGTestMixin):
def
test_web_table_upload_twice
(
self
):
"""test the twice upload of a spreadsheet file into a Web Table
document."""
test_file_path
=
sef
.
get_file_path
(
"tiolive-ERP5.Freedom.TioLive.Spreadsheet-001-en.ods"
)
test_file_path
=
self
.
get_file_path
(
"tiolive-ERP5.Freedom.TioLive.Spreadsheet-001-en.ods"
)
for
index
in
range
(
2
):
self
.
selenium
.
click
(
"//a[@class=
\
"
ung_docs
\
"
]"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
selenium
.
click
(
"//input[@id=
\
"
upload
\
"
]"
)
self
.
selenium
.
select
(
"//select[@name=
\
"
portal_type
\
"
]"
,
"Web Table"
)
self
.
selenium
.
select
(
"//select[@name=
\
"
portal_type
\
"
]"
,
"Web Table"
)
self
.
selenium
.
click
(
"//input[@id=
\
"
submit_document
\
"
]"
)
self
.
assertEqual
(
"Please input a file"
,
self
.
selenium
.
get_text
(
"//span[@id='no-input-file']"
))
self
.
assertEqual
(
"Please input a file"
,
self
.
selenium
.
get_text
(
"//span[@id='no-input-file']"
))
self
.
failUnless
(
self
.
selenium
.
is_text_present
(
"Loading..."
))
self
.
failUnless
(
self
.
selenium
.
is_element_present
(
"//input[@id=
\
"
upload-file
\
"
]"
))
self
.
failUnless
(
self
.
selenium
.
is_element_present
(
"//input[@id=
\
"
upload-file
\
"
]"
))
self
.
selenium
.
type
(
"//input[@id=
\
"
upload-file
\
"
]"
,
test_file_path
)
self
.
selenium
.
click
(
"//input[@id=
\
"
submit_document
\
"
]"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
selenium
.
wait_for_condition
(
"selenium.isTextPresent(
\
"
Opening
\
"
)"
,
"30000"
)
self
.
selenium
.
wait_for_condition
(
"selenium.isTextPresent("
"
\
"
Opening
\
"
)"
,
"30000"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
#XXX this requires enabling a System Preference with Cloudooo
self
.
selenium
.
wait_for_condition
(
"selenium.isElementPresent(
\
"
//a[@name='document_title']
\
"
)"
,
"30000"
)
self
.
failUnless
(
self
.
selenium
.
is_text_present
(
"TioLive Spreadsheet"
))
self
.
assertEqual
(
"1"
,
self
.
selenium
.
get_attribute
(
"//td[@id='0_table0_cell_c0_r1']@sdval"
))
self
.
assertEqual
(
"2"
,
self
.
selenium
.
get_attribute
(
"//td[@id='0_table0_cell_c1_r1']@sdval"
))
self
.
selenium
.
wait_for_condition
(
"selenium.isElementPresent("
"
\
"
//a[@name='document_title']
\
"
)"
,
"30000"
)
self
.
failUnless
(
self
.
selenium
.
is_text_present
(
"TioLive Spreadsheet"
))
self
.
assertEqual
(
"1"
,
self
.
selenium
.
get_attribute
(
"//td[@id='0_table0_cell_c0_r1']@sdval"
))
self
.
assertEqual
(
"2"
,
self
.
selenium
.
get_attribute
(
"//td[@id='0_table0_cell_c1_r1']@sdval"
))
def
test_web_table_upload_converting_to_web_page
(
self
):
"""test upload of a spreadsheet converting to a Web Page document"""
...
...
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