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
923d561a
Commit
923d561a
authored
Aug 02, 2011
by
Gabriel L. Oliveira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor test
parent
81b57e40
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
14 deletions
+22
-14
testUNGDocs.py
testUNGDocs.py
+22
-14
No files found.
testUNGDocs.py
View file @
923d561a
...
@@ -856,22 +856,30 @@ class TestUNGDocs(UNGTestMixin):
...
@@ -856,22 +856,30 @@ class TestUNGDocs(UNGTestMixin):
self
.
selenium
.
get_text
(
"//button[@value='ung_domain/by_subject/"
self
.
selenium
.
get_text
(
"//button[@value='ung_domain/by_subject/"
"subject_UNG Test Cloudooo %d.1']"
%
test_subject_time
))
"subject_UNG Test Cloudooo %d.1']"
%
test_subject_time
))
def
test_change_state_of_document_using_ung_interface_button
(
self
):
self
.
create_document
(
'table'
,
keywords
=
"UNG Test Web Table Subject %d"
\
"""test the possibility to change state of a document
%
test_subject_time
)
from within ung default interface, using 'Change State' button"""
self
.
open_ung_default_page
(
'ung'
,
clear_cache
=
1
,
wait_for_activities
=
1
)
test_time
=
int
(
unittest
.
time
.
time
())
self
.
selenium
.
click
(
"//button[@value='ung_domain/by_subject.0']"
)
self
.
selenium
.
open
(
"ERP5Site_createNewWebDocument?template=web_page_template"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
selenium
.
click
(
"//a[@name=
\
"
document_title
\
"
]"
)
self
.
selenium
.
type
(
"//input[@id=
\
"
name
\
"
]"
,
"Functional UNG Test %d"
%
test_time
)
self
.
selenium
.
click
(
"//div[@class=
\
"
ui-dialog-buttonset
\
"
]/button[1]"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
open_ung_default_page
(
clear_cache
=
1
,
wait_for_activities
=
1
)
self
.
wait_ung_listbox_to_load
()
self
.
selenium
.
click
(
"//table[@class=
\
"
listbox your_listbox your_listbox-table
\
"
]/tbody/tr[1]/td[1]/input"
)
self
.
assertEqual
(
"Ung test web table subject %d"
%
test_subject_time
,
self
.
selenium
.
click
(
"//button[@class=
\
"
change_state
\
"
]"
)
self
.
selenium
.
get_text
(
"//button[@value='ung_domain/by_subject/"
"subject_UNG Test Web Table Subject %d.1']"
%
test_subject_time
))
self
.
selenium
.
click
(
"//button[@value='ung_domain/by_subject/"
"subject_UNG Test Web Table Subject %d.1']"
%
test_subject_time
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
#XXX it's not implemented yet
self
.
wait_ung_listbox_to_load
()
raise
NotImplementedError
self
.
failUnless
(
self
.
selenium
.
is_element_present
(
"//table[@class=
\
"
listbox listbox listbox-table
\
"
]/tbody"
"/tr[1]/td[1]/input"
))
self
.
failUnless
(
self
.
selenium
.
is_element_present
(
"//table[@class=
\
"
listbox listbox listbox-table
\
"
]/tbody"
"/tr[1]/td[2]/input"
))
#assert only one element is present,
#because only one 'table' element was created
self
.
failIf
(
self
.
selenium
.
is_element_present
(
"//table[@class=
\
"
listbox listbox listbox-table
\
"
]/tbody/"
"tr[2]/td[1]/input"
))
def
test_all_domain_tree_filters
(
self
):
def
test_all_domain_tree_filters
(
self
):
"""test Domain Tree on UNG Docs.
"""test Domain Tree on UNG Docs.
...
...
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