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
83c378f0
Commit
83c378f0
authored
Aug 02, 2011
by
Gabriel L. Oliveira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor to follow guidelines
parent
198ffc9b
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
8 deletions
+25
-8
testUNGCalendar.py
testUNGCalendar.py
+8
-3
testUNGDocs.py
testUNGDocs.py
+11
-5
testUNGDocsShare.py
testUNGDocsShare.py
+2
-0
testUNGDocsTableEditor.py
testUNGDocsTableEditor.py
+1
-0
testUNGDocsTextEditor.py
testUNGDocsTextEditor.py
+1
-0
testUNGGadgets.py
testUNGGadgets.py
+1
-0
testUNGSettings.py
testUNGSettings.py
+1
-0
No files found.
testUNGCalendar.py
View file @
83c378f0
from
UNGTestMixin
import
UNGTestMixin
from
UNGTestMixin
import
UNGTestMixin
import
unittest
import
unittest
class
TestUNGCalendar
(
UNGTestMixin
):
class
TestUNGCalendar
(
UNGTestMixin
):
""" Tests related to UNG Calendar
""" Tests related to UNG Calendar
"""
"""
...
@@ -17,10 +18,14 @@ class TestUNGCalendar(UNGTestMixin):
...
@@ -17,10 +18,14 @@ class TestUNGCalendar(UNGTestMixin):
test_subject_time
=
int
(
unittest
.
time
.
time
())
test_subject_time
=
int
(
unittest
.
time
.
time
())
self
.
selenium
.
open
(
"calendar"
)
self
.
selenium
.
open
(
"calendar"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
assertEqual
(
"Refresh"
,
self
.
selenium
.
get_text
(
"//span[@class='showdayflash']"
))
self
.
assertEqual
(
"Refresh"
,
self
.
selenium
.
get_text
(
self
.
assertEqual
(
"Su"
,
self
.
selenium
.
get_text
(
"//span[@title='Sunday']"
))
"//span[@class='showdayflash']"
))
self
.
assertEqual
(
"Su"
,
self
.
selenium
.
get_text
(
"//span[@title='Sunday']"
))
self
.
selenium
.
click
(
"//span[@class='showmonthview']"
)
self
.
selenium
.
click
(
"//span[@class='showmonthview']"
)
self
.
selenium
.
wait_for_condition
(
"selenium.browserbot.findElementOrNull('loadingpannel').style.display == 'none'"
,
"10000"
);
self
.
selenium
.
wait_for_condition
(
"selenium.browserbot.findElementOrNull"
"('loadingpannel').style.display == 'none'"
,
"10000"
);
self
.
selenium
.
click
(
"//span[@class='showdayview']"
)
self
.
selenium
.
click
(
"//span[@class='showdayview']"
)
self
.
selenium
.
wait_for_condition
(
"selenium.browserbot.findElementOrNull('loadingpannel').style.display == 'none'"
,
"10000"
);
self
.
selenium
.
wait_for_condition
(
"selenium.browserbot.findElementOrNull('loadingpannel').style.display == 'none'"
,
"10000"
);
self
.
selenium
.
type
(
"//input[@name='searchable-text']"
,
"My Event %d"
%
test_subject_time
)
self
.
selenium
.
type
(
"//input[@name='searchable-text']"
,
"My Event %d"
%
test_subject_time
)
...
...
testUNGDocs.py
View file @
83c378f0
...
@@ -9,6 +9,7 @@ xmlns='http://www.w3.org/2000/svg'> \
...
@@ -9,6 +9,7 @@ xmlns='http://www.w3.org/2000/svg'> \
<ellipse ry='46' rx='47' id='svg_1' cy='93' cx='138' stroke-width='5'
\
<ellipse ry='46' rx='47' id='svg_1' cy='93' cx='138' stroke-width='5'
\
stroke='#000000' fill='#FF0000'/> </g></svg>"
)
stroke='#000000' fill='#FF0000'/> </g></svg>"
)
class
TestUNGDocs
(
UNGTestMixin
):
class
TestUNGDocs
(
UNGTestMixin
):
"""Tests related to UNG Docs"""
"""Tests related to UNG Docs"""
def
test_web_illustration
(
self
):
def
test_web_illustration
(
self
):
...
@@ -36,18 +37,23 @@ class TestUNGDocs(UNGTestMixin):
...
@@ -36,18 +37,23 @@ class TestUNGDocs(UNGTestMixin):
pass
pass
finally
:
finally
:
self
.
selenium
.
set_timeout
(
30000
)
self
.
selenium
.
set_timeout
(
30000
)
self
.
selenium
.
open
(
url
+
"/WebIllustration_viewEditor?editable_mode:int=1"
)
self
.
selenium
.
open
(
url
+
"/WebIllustration_viewEditor?"
"editable_mode:int=1"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
self
.
selenium
.
wait_for_page_to_load
(
"30000"
)
#XXX had to change
#XXX had to change
#self.selenium.wait_for_condition("selenium.isElementPresent(\"//ellipse[@id='svg_1']\")", "9000")
#self.selenium.wait_for_condition("selenium.isElementPresent(\"//ellipse[@id='svg_1']\")", "9000")
self
.
selenium
.
select_frame
(
"//iframe[@id='svgframe']"
)
self
.
selenium
.
select_frame
(
"//iframe[@id='svgframe']"
)
self
.
selenium
.
wait_for_condition
(
"window.document.getElementById('svg_1')"
,
"1000"
)
self
.
selenium
.
wait_for_condition
(
"window.document.getElementById"
self
.
assertEqual
(
"46"
,
self
.
selenium
.
get_eval
(
"window.document.getElementById('svg_1').ry.baseVal.value"
))
"('svg_1')"
,
"1000"
)
self
.
assertEqual
(
"46"
,
self
.
selenium
.
get_eval
(
"window.document."
"getElementById('svg_1').ry.baseVal.value"
))
self
.
selenium
.
select_window
(
'null'
)
self
.
selenium
.
select_window
(
'null'
)
self
.
assertEqual
(
"Web Illustration"
,
self
.
selenium
.
get_text
(
"//a[@name=
\
"
document_title
\
"
]"
))
self
.
assertEqual
(
"Web Illustration"
,
self
.
selenium
.
get_text
(
self
.
assertEqual
(
"Draft"
,
self
.
selenium
.
get_text
(
"//a[@name=
\
"
document_state
\
"
]"
))
"//a[@name=
\
"
document_title
\
"
]"
))
self
.
assertEqual
(
"Draft"
,
self
.
selenium
.
get_text
(
"//a[@name=
\
"
document_state
\
"
]"
))
self
.
selenium
.
click
(
"//a[@name=
\
"
document_title
\
"
]"
)
self
.
selenium
.
click
(
"//a[@name=
\
"
document_title
\
"
]"
)
unittest
.
time
.
sleep
(
2
)
unittest
.
time
.
sleep
(
2
)
self
.
assertEqual
(
"Rename Document"
,
self
.
selenium
.
get_text
(
"//span[@id=
\
"
ui-dialog-title-edit_document
\
"
]"
))
self
.
assertEqual
(
"Rename Document"
,
self
.
selenium
.
get_text
(
"//span[@id=
\
"
ui-dialog-title-edit_document
\
"
]"
))
...
...
testUNGDocsShare.py
View file @
83c378f0
from
UNGTestMixin
import
UNGTestMixin
from
UNGTestMixin
import
UNGTestMixin
import
unittest
import
unittest
class
TestUNGDocsSharing
(
UNGTestMixin
):
class
TestUNGDocsSharing
(
UNGTestMixin
):
"""tests related to the action of share documents on UNG Docs"""
"""tests related to the action of share documents on UNG Docs"""
def
test_share_web_page_with_another_user
(
self
):
def
test_share_web_page_with_another_user
(
self
):
"""test that web_page is correctly shared with another user"""
"""test that web_page is correctly shared with another user"""
self
.
selenium
.
open
(
"ERP5Site_createNewWebDocument?template=web_page_template"
)
self
.
selenium
.
open
(
"ERP5Site_createNewWebDocument?template=web_page_template"
)
...
...
testUNGDocsTableEditor.py
View file @
83c378f0
from
UNGTestMixin
import
UNGTestMixin
from
UNGTestMixin
import
UNGTestMixin
import
unittest
import
unittest
class
TestUNGDocsTableEditor
(
UNGTestMixin
):
class
TestUNGDocsTableEditor
(
UNGTestMixin
):
def
test_fill_some_cells_in_web_table
(
self
):
def
test_fill_some_cells_in_web_table
(
self
):
"""test the action of add, fill cells, assert title of sheet and
"""test the action of add, fill cells, assert title of sheet and
...
...
testUNGDocsTextEditor.py
View file @
83c378f0
from
UNGTestMixin
import
UNGTestMixin
from
UNGTestMixin
import
UNGTestMixin
import
unittest
import
unittest
class
TestUNGDocsTextEditor
(
UNGTestMixin
):
class
TestUNGDocsTextEditor
(
UNGTestMixin
):
"""tests related to UNG Docs text editors"""
"""tests related to UNG Docs text editors"""
def
test_fill_content_on_web_page_with_fck_editor
(
self
):
def
test_fill_content_on_web_page_with_fck_editor
(
self
):
...
...
testUNGGadgets.py
View file @
83c378f0
...
@@ -3,6 +3,7 @@ import unittest
...
@@ -3,6 +3,7 @@ import unittest
import
re
import
re
class
TestUNGGadgets
(
UNGTestMixin
):
class
TestUNGGadgets
(
UNGTestMixin
):
"""tests related to gadgets on UNG"""
"""tests related to gadgets on UNG"""
def
test_add_and_delete_gadget
(
self
):
def
test_add_and_delete_gadget
(
self
):
...
...
testUNGSettings.py
View file @
83c378f0
from
UNGTestMixin
import
UNGTestMixin
from
UNGTestMixin
import
UNGTestMixin
import
unittest
import
unittest
class
TestUNGSettings
(
UNGTestMixin
):
class
TestUNGSettings
(
UNGTestMixin
):
"""tests related to UNG settings"""
"""tests related to UNG settings"""
def
test_saving_settings_even_on_different_users
(
self
):
def
test_saving_settings_even_on_different_users
(
self
):
...
...
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