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
2e14569a
Commit
2e14569a
authored
May 16, 2011
by
Gabriel L. Oliveira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2011-05-16 gabriel.oliveira
* add more property asserts when naming and renaming
parent
4dbf566a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
82 additions
and
7 deletions
+82
-7
test_ung_change_title.py
test_ung_change_title.py
+82
-7
No files found.
test_ung_change_title.py
View file @
2e14569a
...
...
@@ -7,7 +7,7 @@ class TestUNGChangeTitle(BaseUNGTest):
self
.
init
()
self
.
login_as_default_user
()
#New
web i
llustration
#New
Web I
llustration
sel
.
open
(
"ERP5Site_createNewWebDocument?template=web_illustration_template"
)
sel
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"Web Illustration"
,
sel
.
get_text
(
"//a[@name=
\
"
document_title
\
"
]"
))
...
...
@@ -59,7 +59,7 @@ class TestUNGChangeTitle(BaseUNGTest):
self
.
assertEqual
(
""
,
sel
.
get_text
(
"//input[@id='language']"
))
sel
.
type
(
"language"
,
"fr"
)
self
.
assertEqual
(
""
,
sel
.
get_text
(
"//input[@id='sort_index']"
))
sel
.
type
(
"sort_index"
,
"
0
"
)
sel
.
type
(
"sort_index"
,
"
1
"
)
self
.
assertEqual
(
""
,
sel
.
get_text
(
"//textarea[@id='keyword_list']"
))
sel
.
type
(
"keyword_list"
,
"Functional UNG Test
\
n
UNG Test"
)
sel
.
click
(
"//div[@class=
\
"
ui-dialog-buttonset
\
"
]/button[1]/span"
)
...
...
@@ -72,6 +72,21 @@ class TestUNGChangeTitle(BaseUNGTest):
sel
.
open
(
""
)
sel
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"Functional UNG Test - Web Illustration"
,
sel
.
get_text
(
"//tr[@class='your_listbox-data-line-0 DataA']/td[3]"
))
sel
.
click
(
"//tr[@class='your_listbox-data-line-0 DataA']/td[3]/a"
)
sel
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"Functional UNG Test - Web Illu..."
,
sel
.
get_text
(
"//a[@name=
\
"
document_title
\
"
]"
))
sel
.
click
(
"//a[@name=
\
"
document_title
\
"
]"
)
self
.
assertEqual
(
"Rename Document"
,
sel
.
get_text
(
"//span[@id=
\
"
ui-dialog-title-edit_document
\
"
]"
))
self
.
assertEqual
(
"Functional UNG Test - Web Illustration"
,
sel
.
get_value
(
"//input[@id='name']"
))
self
.
assertEqual
(
"Edit More Properties"
,
sel
.
get_text
(
"//p[@id=
\
"
more_properties
\
"
]"
))
sel
.
click
(
"//p[@id=
\
"
more_properties
\
"
]"
)
self
.
assertEqual
(
"Func. UNG Test - Web Illustration"
,
sel
.
get_value
(
"//input[@id='short_title']"
))
self
.
assertEqual
(
"002"
,
sel
.
get_value
(
"//input[@id='version']"
))
self
.
assertEqual
(
"fr"
,
sel
.
get_value
(
"//input[@id='language']"
))
self
.
assertEqual
(
"1"
,
sel
.
get_value
(
"//input[@id='sort_index']"
))
self
.
assertEqual
(
"Functional UNG Test
\
n
UNG Test"
,
sel
.
get_value
(
"//textarea[@id='keyword_list']"
))
sel
.
open
(
""
)
sel
.
wait_for_page_to_load
(
"30000"
)
sel
.
type
(
"//input[@name=
\
"
field_your_search_text
\
"
]"
,
"
\
"
Functional UNG Test - Web Illustration
\
"
"
)
sel
.
click
(
"//input[@value=
\
"
Search Docs
\
"
]"
)
sel
.
wait_for_page_to_load
(
"30000"
)
...
...
@@ -96,7 +111,7 @@ class TestUNGChangeTitle(BaseUNGTest):
self
.
assertEqual
(
""
,
sel
.
get_text
(
"//input[@id='language']"
))
sel
.
type
(
"language"
,
"en"
)
self
.
assertEqual
(
""
,
sel
.
get_text
(
"//input[@id='sort_index']"
))
sel
.
type
(
"sort_index"
,
"
1
"
)
sel
.
type
(
"sort_index"
,
"
2
"
)
self
.
assertEqual
(
""
,
sel
.
get_text
(
"//textarea[@id='keyword_list']"
))
sel
.
type
(
"keyword_list"
,
"Functional UNG Test Renamed
\
n
UNG Test Renamed"
)
sel
.
click
(
"//div[@class=
\
"
ui-dialog-buttonset
\
"
]/button[1]/span"
)
...
...
@@ -112,6 +127,16 @@ class TestUNGChangeTitle(BaseUNGTest):
sel
.
click
(
"//tr[@class='your_listbox-data-line-0 DataA']/td[3]/a"
)
sel
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"Functional UNG Test - Renamed ..."
,
sel
.
get_text
(
"//a[@name=
\
"
document_title
\
"
]"
))
sel
.
click
(
"//a[@name=
\
"
document_title
\
"
]"
)
self
.
assertEqual
(
"Rename Document"
,
sel
.
get_text
(
"//span[@id=
\
"
ui-dialog-title-edit_document
\
"
]"
))
self
.
assertEqual
(
"Functional UNG Test - Renamed Web Illustration"
,
sel
.
get_value
(
"//input[@id='name']"
))
self
.
assertEqual
(
"Edit More Properties"
,
sel
.
get_text
(
"//p[@id=
\
"
more_properties
\
"
]"
))
sel
.
click
(
"//p[@id=
\
"
more_properties
\
"
]"
)
self
.
assertEqual
(
"Func. UNG Test - Renamed Web Illustration"
,
sel
.
get_value
(
"//input[@id='short_title']"
))
self
.
assertEqual
(
"003"
,
sel
.
get_value
(
"//input[@id='version']"
))
self
.
assertEqual
(
"en"
,
sel
.
get_value
(
"//input[@id='language']"
))
self
.
assertEqual
(
"2"
,
sel
.
get_value
(
"//input[@id='sort_index']"
))
self
.
assertEqual
(
"Functional UNG Test Renamed
\
n
UNG Test Renamed"
,
sel
.
get_value
(
"//textarea[@id='keyword_list']"
))
sel
.
open
(
""
)
sel
.
wait_for_page_to_load
(
"30000"
)
sel
.
type
(
"//input[@name=
\
"
field_your_search_text
\
"
]"
,
"
\
"
Functional UNG Test - Renamed Web Illustration
\
"
"
)
...
...
@@ -171,7 +196,7 @@ class TestUNGChangeTitle(BaseUNGTest):
self
.
assertEqual
(
""
,
sel
.
get_text
(
"//input[@id='language']"
))
sel
.
type
(
"language"
,
"fr"
)
self
.
assertEqual
(
""
,
sel
.
get_text
(
"//input[@id='sort_index']"
))
sel
.
type
(
"sort_index"
,
"
0
"
)
sel
.
type
(
"sort_index"
,
"
1
"
)
self
.
assertEqual
(
""
,
sel
.
get_text
(
"//textarea[@id='keyword_list']"
))
sel
.
type
(
"keyword_list"
,
"Functional UNG Test
\
n
UNG Test"
)
sel
.
click
(
"//div[@class=
\
"
ui-dialog-buttonset
\
"
]/button[1]/span"
)
...
...
@@ -184,6 +209,21 @@ class TestUNGChangeTitle(BaseUNGTest):
sel
.
open
(
""
)
sel
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"Functional UNG Test - Web Table"
,
sel
.
get_text
(
"//tr[@class='your_listbox-data-line-0 DataA']/td[3]"
))
sel
.
click
(
"//tr[@class='your_listbox-data-line-0 DataA']/td[3]/a"
)
sel
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"Functional UNG Test - Web Tabl..."
,
sel
.
get_text
(
"//a[@name=
\
"
document_title
\
"
]"
))
sel
.
click
(
"//a[@name=
\
"
document_title
\
"
]"
)
self
.
assertEqual
(
"Rename Document"
,
sel
.
get_text
(
"//span[@id=
\
"
ui-dialog-title-edit_document
\
"
]"
))
self
.
assertEqual
(
"Functional UNG Test - Web Table"
,
sel
.
get_value
(
"//input[@id='name']"
))
self
.
assertEqual
(
"Edit More Properties"
,
sel
.
get_text
(
"//p[@id=
\
"
more_properties
\
"
]"
))
sel
.
click
(
"//p[@id=
\
"
more_properties
\
"
]"
)
self
.
assertEqual
(
"Func. UNG Test - Web Table"
,
sel
.
get_value
(
"//input[@id='short_title']"
))
self
.
assertEqual
(
"002"
,
sel
.
get_value
(
"//input[@id='version']"
))
self
.
assertEqual
(
"fr"
,
sel
.
get_value
(
"//input[@id='language']"
))
self
.
assertEqual
(
"1"
,
sel
.
get_value
(
"//input[@id='sort_index']"
))
self
.
assertEqual
(
"Functional UNG Test
\
n
UNG Test"
,
sel
.
get_value
(
"//textarea[@id='keyword_list']"
))
sel
.
open
(
""
)
sel
.
wait_for_page_to_load
(
"30000"
)
sel
.
type
(
"//input[@name=
\
"
field_your_search_text
\
"
]"
,
"
\
"
Functional UNG Test - Web Table
\
"
"
)
sel
.
click
(
"//input[@value=
\
"
Search Docs
\
"
]"
)
sel
.
wait_for_page_to_load
(
"30000"
)
...
...
@@ -208,7 +248,7 @@ class TestUNGChangeTitle(BaseUNGTest):
self
.
assertEqual
(
""
,
sel
.
get_text
(
"//input[@id='language']"
))
sel
.
type
(
"language"
,
"en"
)
self
.
assertEqual
(
""
,
sel
.
get_text
(
"//input[@id='sort_index']"
))
sel
.
type
(
"sort_index"
,
"
1
"
)
sel
.
type
(
"sort_index"
,
"
2
"
)
self
.
assertEqual
(
""
,
sel
.
get_text
(
"//textarea[@id='keyword_list']"
))
sel
.
type
(
"keyword_list"
,
"Functional UNG Test Renamed
\
n
UNG Test Renamed"
)
sel
.
click
(
"//div[@class=
\
"
ui-dialog-buttonset
\
"
]/button[1]/span"
)
...
...
@@ -224,6 +264,16 @@ class TestUNGChangeTitle(BaseUNGTest):
sel
.
click
(
"//tr[@class='your_listbox-data-line-0 DataA']/td[3]/a"
)
sel
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"Functional UNG Test - Renamed ..."
,
sel
.
get_text
(
"//a[@name=
\
"
document_title
\
"
]"
))
sel
.
click
(
"//a[@name=
\
"
document_title
\
"
]"
)
self
.
assertEqual
(
"Rename Document"
,
sel
.
get_text
(
"//span[@id=
\
"
ui-dialog-title-edit_document
\
"
]"
))
self
.
assertEqual
(
"Functional UNG Test - Renamed Web Table"
,
sel
.
get_value
(
"//input[@id='name']"
))
self
.
assertEqual
(
"Edit More Properties"
,
sel
.
get_text
(
"//p[@id=
\
"
more_properties
\
"
]"
))
sel
.
click
(
"//p[@id=
\
"
more_properties
\
"
]"
)
self
.
assertEqual
(
"Func. UNG Test - Renamed Web Table"
,
sel
.
get_value
(
"//input[@id='short_title']"
))
self
.
assertEqual
(
"003"
,
sel
.
get_value
(
"//input[@id='version']"
))
self
.
assertEqual
(
"en"
,
sel
.
get_value
(
"//input[@id='language']"
))
self
.
assertEqual
(
"2"
,
sel
.
get_value
(
"//input[@id='sort_index']"
))
self
.
assertEqual
(
"Functional UNG Test Renamed
\
n
UNG Test Renamed"
,
sel
.
get_value
(
"//textarea[@id='keyword_list']"
))
sel
.
open
(
""
)
sel
.
wait_for_page_to_load
(
"30000"
)
sel
.
type
(
"//input[@name=
\
"
field_your_search_text
\
"
]"
,
"
\
"
Functional UNG Test - Renamed Web Table
\
"
"
)
...
...
@@ -283,7 +333,7 @@ class TestUNGChangeTitle(BaseUNGTest):
self
.
assertEqual
(
""
,
sel
.
get_text
(
"//input[@id='language']"
))
sel
.
type
(
"language"
,
"fr"
)
self
.
assertEqual
(
""
,
sel
.
get_text
(
"//input[@id='sort_index']"
))
sel
.
type
(
"sort_index"
,
"
0
"
)
sel
.
type
(
"sort_index"
,
"
1
"
)
self
.
assertEqual
(
""
,
sel
.
get_text
(
"//textarea[@id='keyword_list']"
))
sel
.
type
(
"keyword_list"
,
"Functional UNG Test
\
n
UNG Test"
)
sel
.
click
(
"//div[@class=
\
"
ui-dialog-buttonset
\
"
]/button[1]/span"
)
...
...
@@ -296,6 +346,21 @@ class TestUNGChangeTitle(BaseUNGTest):
sel
.
open
(
""
)
sel
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"Functional UNG Test - Web Page"
,
sel
.
get_text
(
"//tr[@class='your_listbox-data-line-0 DataA']/td[3]"
))
sel
.
click
(
"//tr[@class='your_listbox-data-line-0 DataA']/td[3]/a"
)
sel
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"Functional UNG Test - Web Page"
,
sel
.
get_text
(
"//a[@name=
\
"
document_title
\
"
]"
))
sel
.
click
(
"//a[@name=
\
"
document_title
\
"
]"
)
self
.
assertEqual
(
"Rename Document"
,
sel
.
get_text
(
"//span[@id=
\
"
ui-dialog-title-edit_document
\
"
]"
))
self
.
assertEqual
(
"Functional UNG Test - Web Page"
,
sel
.
get_value
(
"//input[@id='name']"
))
self
.
assertEqual
(
"Edit More Properties"
,
sel
.
get_text
(
"//p[@id=
\
"
more_properties
\
"
]"
))
sel
.
click
(
"//p[@id=
\
"
more_properties
\
"
]"
)
self
.
assertEqual
(
"Func. UNG Test - Web Page"
,
sel
.
get_value
(
"//input[@id='short_title']"
))
self
.
assertEqual
(
"002"
,
sel
.
get_value
(
"//input[@id='version']"
))
self
.
assertEqual
(
"fr"
,
sel
.
get_value
(
"//input[@id='language']"
))
self
.
assertEqual
(
"1"
,
sel
.
get_value
(
"//input[@id='sort_index']"
))
self
.
assertEqual
(
"Functional UNG Test
\
n
UNG Test"
,
sel
.
get_value
(
"//textarea[@id='keyword_list']"
))
sel
.
open
(
""
)
sel
.
wait_for_page_to_load
(
"30000"
)
sel
.
type
(
"//input[@name=
\
"
field_your_search_text
\
"
]"
,
"
\
"
Functional UNG Test - Web Page
\
"
"
)
sel
.
click
(
"//input[@value=
\
"
Search Docs
\
"
]"
)
sel
.
wait_for_page_to_load
(
"30000"
)
...
...
@@ -320,7 +385,7 @@ class TestUNGChangeTitle(BaseUNGTest):
self
.
assertEqual
(
""
,
sel
.
get_text
(
"//input[@id='language']"
))
sel
.
type
(
"language"
,
"en"
)
self
.
assertEqual
(
""
,
sel
.
get_text
(
"//input[@id='sort_index']"
))
sel
.
type
(
"sort_index"
,
"
1
"
)
sel
.
type
(
"sort_index"
,
"
2
"
)
self
.
assertEqual
(
""
,
sel
.
get_text
(
"//textarea[@id='keyword_list']"
))
sel
.
type
(
"keyword_list"
,
"Functional UNG Test Renamed
\
n
UNG Test Renamed"
)
sel
.
click
(
"//div[@class=
\
"
ui-dialog-buttonset
\
"
]/button[1]/span"
)
...
...
@@ -336,6 +401,16 @@ class TestUNGChangeTitle(BaseUNGTest):
sel
.
click
(
"//tr[@class='your_listbox-data-line-0 DataA']/td[3]/a"
)
sel
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"Functional UNG Test - Renamed ..."
,
sel
.
get_text
(
"//a[@name=
\
"
document_title
\
"
]"
))
sel
.
click
(
"//a[@name=
\
"
document_title
\
"
]"
)
self
.
assertEqual
(
"Rename Document"
,
sel
.
get_text
(
"//span[@id=
\
"
ui-dialog-title-edit_document
\
"
]"
))
self
.
assertEqual
(
"Functional UNG Test - Renamed Web Page"
,
sel
.
get_value
(
"//input[@id='name']"
))
self
.
assertEqual
(
"Edit More Properties"
,
sel
.
get_text
(
"//p[@id=
\
"
more_properties
\
"
]"
))
sel
.
click
(
"//p[@id=
\
"
more_properties
\
"
]"
)
self
.
assertEqual
(
"Func. UNG Test - Renamed Web Page"
,
sel
.
get_value
(
"//input[@id='short_title']"
))
self
.
assertEqual
(
"003"
,
sel
.
get_value
(
"//input[@id='version']"
))
self
.
assertEqual
(
"en"
,
sel
.
get_value
(
"//input[@id='language']"
))
self
.
assertEqual
(
"2"
,
sel
.
get_value
(
"//input[@id='sort_index']"
))
self
.
assertEqual
(
"Functional UNG Test Renamed
\
n
UNG Test Renamed"
,
sel
.
get_value
(
"//textarea[@id='keyword_list']"
))
sel
.
open
(
""
)
sel
.
wait_for_page_to_load
(
"30000"
)
sel
.
type
(
"//input[@name=
\
"
field_your_search_text
\
"
]"
,
"
\
"
Functional UNG Test - Renamed Web Page
\
"
"
)
...
...
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