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
5cad3839
Commit
5cad3839
authored
Aug 02, 2011
by
Gabriel L. Oliveira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix method
- Reuse mixin methods
parent
54a2c965
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
23 deletions
+31
-23
testUNGDocs.py
testUNGDocs.py
+31
-23
No files found.
testUNGDocs.py
View file @
5cad3839
...
...
@@ -65,38 +65,46 @@ class TestUNGDocs(UNGTestMixin):
def
test_web_page
(
self
):
"""test the action of add, cancel, delete and then delete again a
Web Page document"""
self
.
selenium
.
open
(
"ERP5Site_createNewWebDocument?template=web_page_template"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"Web Page"
,
self
.
selenium
.
get_text
(
"//a[@name=
\
"
document_title
\
"
]"
))
self
.
create_document
(
'page'
)
self
.
assertEqual
(
"Web Page"
,
self
.
selenium
.
get_text
(
"//a[@name=
\
"
document_title
\
"
]"
))
self
.
selenium
.
click
(
"//div[@class=
\
"
action_menu
\
"
]/li/ul/li[1]/a"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"Cancelled"
,
self
.
selenium
.
get_text
(
"//a[@name=
\
"
document_state
\
"
]"
))
self
.
selenium
.
click
(
"//a[@class=
\
"
ung_docs
\
"
]"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"All Documents"
,
self
.
selenium
.
get_text
(
"//button[@class='tree-open']"
))
self
.
selenium
.
click
(
"//div[@class=
\
"
favorite
\
"
]/a[2]"
)
self
.
assertEqual
(
"Cancelled"
,
self
.
selenium
.
get_text
(
"//a[@name=
\
"
document_state
\
"
]"
))
self
.
open_ung_default_page
(
'ung'
,
wait_for_activities
=
1
)
self
.
assertEqual
(
"All Documents"
,
self
.
selenium
.
get_text
(
"//button[@class='tree-open']"
))
self
.
selenium
.
click
(
"//div[@class=
\
"
favorite
\
"
]/a[2]"
)
# Refresh
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"All Documents"
,
self
.
selenium
.
get_text
(
"//button[@class='tree-open']"
))
self
.
selenium
.
click
(
"//table[@class=
\
"
listbox your_listbox your_listbox-table
\
"
]/tbody/tr[1]/td[1]/input"
)
self
.
selenium
.
click
(
"//button[@class=
\
"
delete
\
"
]"
)
self
.
wait_ung_listbox_to_load
()
self
.
assertEqual
(
"All Documents"
,
self
.
selenium
.
get_text
(
"//button[@class='tree-open']"
))
self
.
selenium
.
click
(
"//table[@class=
\
"
listbox listbox listbox-table
\
"
]"
"/tbody/tr[1]/td[1]/input"
)
self
.
selenium
.
click
(
"//button[@class='delete']"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
open_ung_default_page
(
clear_cache
=
1
,
wait_for_activities
=
1
)
self
.
selenium
.
click
(
"//table[@class=
\
"
your_listbox-table-domain-tree
\
"
]/tbody/tr[11]/td/button"
)
self
.
open_ung_default_page
(
'ung'
,
wait_for_activities
=
1
)
self
.
selenium
.
click
(
"//button[@value='ung_domain/trash.0']"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
selenium
.
set_timeout
(
"30000"
)
self
.
wait_ung_listbox_to_load
(
)
self
.
failIf
(
self
.
selenium
.
is_text_present
(
"No result."
))
self
.
assertEqual
(
"Deleted"
,
self
.
selenium
.
get_text
(
"//table/tbody/tr[1]/td[4]"
))
self
.
assertEqual
(
"Deleted"
,
self
.
selenium
.
get_text
(
"//table/tbody/"
"tr[1]/td[4]"
))
self
.
selenium
.
click
(
"//input[@title='Check All']"
)
self
.
selenium
.
click
(
"//button[@class=
\
"
delete
\
"
]"
)
self
.
selenium
.
click
(
"//button[@class=
'delete'
]"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"No result."
,
self
.
selenium
.
get_text
(
"//td[@class=
\
"
listbox-table-no-result-row
\
"
]/span"
))
self
.
assertEqual
(
"Trash"
,
self
.
selenium
.
get_text
(
"//button[@class='tree-open']"
))
self
.
selenium
.
click
(
"//table[@class=
\
"
your_listbox-table-domain-tree
\
"
]/tbody/tr[3]/td/button"
)
self
.
wait_ung_listbox_to_load
()
self
.
assertEqual
(
"No result."
,
self
.
selenium
.
get_text
(
"//td[@class='listbox-table-no-result-row']/span"
))
self
.
assertEqual
(
"Trash"
,
self
.
selenium
.
get_text
(
"//button[@class='tree-open']"
))
self
.
selenium
.
click
(
"//button[@value='ung_domain/hidden.0']"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"No result."
,
self
.
selenium
.
get_text
(
"//td[@class=
\
"
listbox-table-no-result-row
\
"
]/span"
))
self
.
assertEqual
(
"Hidden"
,
self
.
selenium
.
get_text
(
"//button[@class='tree-open']"
))
self
.
assertEqual
(
"No result."
,
self
.
selenium
.
get_text
(
"//td[@class=
\
"
listbox-table-no-result-row
\
"
]/span"
))
self
.
assertEqual
(
"Hidden"
,
self
.
selenium
.
get_text
(
"//button[@class='tree-open']"
))
def
test_title_abbreviation
(
self
):
"""test the abbreviation of a long title of the 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