Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
32832200
Commit
32832200
authored
Aug 20, 2018
by
Richard
Committed by
Vincent Bechu
Aug 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_officejs_ui_test]: update notebook test to new officejs install template and ERP5Synch test
parent
621d2b24
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
81 deletions
+35
-81
bt5/erp5_notebook/SkinTemplateItem/portal_skins/erp5_notebook/gadget_notebook.html.html
...Item/portal_skins/erp5_notebook/gadget_notebook.html.html
+1
-1
bt5/erp5_notebook/SkinTemplateItem/portal_skins/erp5_notebook/gadget_officejs_jio_notebook.js.js
...al_skins/erp5_notebook/gadget_officejs_jio_notebook.js.js
+16
-12
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficeJSNotebook.zpt
...tests/officejs_ui_notebook_zuite/testOfficeJSNotebook.zpt
+5
-63
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficeJSNotebookErp5Synchronization.zpt
...otebook_zuite/testOfficeJSNotebookErp5Synchronization.zpt
+9
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
...inTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
+4
-2
No files found.
bt5/erp5_notebook/SkinTemplateItem/portal_skins/erp5_notebook/gadget_notebook.html.html
View file @
32832200
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
<script
src=
"rsvp.js"
></script>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"jio.js"
></script>
<script
src=
"gadget_officejs_jio_notebook.js"
></script>
<script
src=
"gadget_officejs_jio_notebook.js"
></script>
<link
rel=
"stylesheet"
href=
"iodide_master.css"
>
<link
rel=
"stylesheet"
href=
"iodide_master.css"
>
...
@@ -16,5 +15,6 @@
...
@@ -16,5 +15,6 @@
<body>
<body>
<div
id=
'page'
></div>
<div
id=
'page'
></div>
<script
id=
"jsmd"
type=
"text/jsmd"
></script>
</body>
</body>
</html>
</html>
\ No newline at end of file
bt5/erp5_notebook/SkinTemplateItem/portal_skins/erp5_notebook/gadget_officejs_jio_notebook.js.js
View file @
32832200
...
@@ -19,21 +19,25 @@
...
@@ -19,21 +19,25 @@
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
render
"
,
function
(
options
)
{
.
declareMethod
(
"
render
"
,
function
(
options
)
{
this
.
options
=
options
;
return
this
.
changeState
({
var
script
=
document
.
createElement
(
'
script
'
);
key
:
options
.
key
,
script
.
setAttribute
(
'
id
'
,
'
jsmd
'
);
value
:
options
.
value
,
script
.
setAttribute
(
'
type
'
,
'
text/jsmd
'
);
first_render
:
true
script
.
innerHTML
=
options
.
value
;
});
document
.
body
.
appendChild
(
script
);
})
.
onStateChange
(
function
(
modified_dict
)
{
this
.
element
.
querySelector
(
'
script
'
).
textContent
=
this
.
state
.
value
;
if
(
!
modified_dict
.
hasOwnProperty
(
'
first_render
'
))
{
throw
new
Error
(
'
Sorry, it is not possible to dynamically change the iodide content
'
);
}
var
iodide
=
document
.
createElement
(
"
script
"
);
var
iodide
=
document
.
createElement
(
"
script
"
);
iodide
.
src
=
"
iodide_master.js
"
;
iodide
.
src
=
"
iodide_master.js
"
;
document
.
body
.
appendChild
(
iodide
);
this
.
element
.
appendChild
(
iodide
);
})
})
.
declareMethod
(
"
getContent
"
,
function
()
{
.
declareMethod
(
"
getContent
"
,
function
()
{
var
dict
=
{};
var
dict
=
{};
dict
[
this
.
options
.
key
]
=
localStorage
.
getItem
(
'
AUTOSAVE: untitled
'
);
dict
[
this
.
state
.
key
]
=
localStorage
.
getItem
(
'
AUTOSAVE: untitled
'
);
return
dict
;
return
dict
;
});
});
}(
window
,
rJS
,
RSVP
));
}(
window
,
rJS
,
RSVP
));
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficeJSNotebook.zpt
View file @
32832200
...
@@ -23,69 +23,11 @@
...
@@ -23,69 +23,11 @@
<td>
Reset Successfully.
</td>
<td>
Reset Successfully.
</td>
<td></td>
<td></td>
</tr>
</tr>
<!-- Initialize -->
<tal:block
tal:define=
"web_site_name python: 'officejs_notebook'"
>
<tr>
<tal:block
<td>
open
</td>
metal:use-macro=
"here/Zuite_CommonTemplateForOfficejsUi/macros/install_offline_and_redirect"
<td>
${base_url}/web_site_module/officejs_notebook?ignore_layout:int=1
&
editable_mode:int=1
</td>
/>
<td></td>
</tal:block>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
name=Base_createCloneDocument:method
</td>
<td></td>
field_my_id
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
name=Base_createCloneDocument:method
</td>
<td></td>
</tr>
<tr>
<td>
verifyTextPresent
</td>
<td>
Created Clone Web Site
</td>
<td></td>
</tr>
<tr>
<td>
storeValue
</td>
<td>
name=field_my_id
</td>
<td>
test_url
</td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/wait_for_activities"
/>
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/${test_url}/
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='Storages']
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/manage_main
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
name=ids:list
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
name=ids:list
</td>
<td>
${test_url}
</td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
name=manage_delObjects:method
</td>
<td></td>
</tr>
<!-- Offline Test -->
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/${test_url}/
</td>
<td></td>
</tr>
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='Storages']
</td>
<td>
//a[@data-i18n='Storages']
</td>
...
...
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficeJSNotebookErp5Synchronization.zpt
View file @
32832200
...
@@ -27,6 +27,12 @@
...
@@ -27,6 +27,12 @@
<td>
${base_url}/web_site_module/officejs_notebook/
</td>
<td>
${base_url}/web_site_module/officejs_notebook/
</td>
<td></td>
<td></td>
</tr>
</tr>
!-- Install can be longer than 90s -->
<tr>
<td>
waitForCondition
</td>
<td>
selenium.browserbot.currentWindow.applicationCache.status !== window.applicationCache.DOWNLOADING
</td>
<td>
50000
</td>
</tr>
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
<td>
link=Storages
</td>
<td>
link=Storages
</td>
...
@@ -212,7 +218,7 @@ For that I'm using this undocumented triggerOnKeyDown() method -->
...
@@ -212,7 +218,7 @@ For that I'm using this undocumented triggerOnKeyDown() method -->
<td></td>
<td></td>
</tr>
</tr>
<tal:block
tal:define=
"search_query python: 'Titre'"
>
<tal:block
tal:define=
"search_query python: 'Titre'"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list
_without_header_url
"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list"
/>
</tal:block>
</tal:block>
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
...
@@ -345,8 +351,8 @@ For that I'm using this undocumented triggerOnKeyDown() method -->
...
@@ -345,8 +351,8 @@ For that I'm using this undocumented triggerOnKeyDown() method -->
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
assertTex
tPresent
</td>
<td>
waitForElemen
tPresent
</td>
<td>
Done.
</td>
<td>
//pre[contains(text(), Done.)]
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
View file @
32832200
...
@@ -72,12 +72,14 @@ lockGadgetInQueue, unlockGadgetInQueue, unlockGadgetInFailedQueue*/
...
@@ -72,12 +72,14 @@ lockGadgetInQueue, unlockGadgetInQueue, unlockGadgetInFailedQueue*/
queue
=
lockGadgetInQueue
(
gadget
)();
queue
=
lockGadgetInQueue
(
gadget
)();
if
((
modification_dict
.
hasOwnProperty
(
'
editable
'
))
||
if
((
modification_dict
.
hasOwnProperty
(
'
editable
'
))
||
(
modification_dict
.
hasOwnProperty
(
'
editor
'
)))
{
(
modification_dict
.
hasOwnProperty
(
'
editor
'
))
||
(
gadget
.
state
.
editor
==
'
notebook_editor
'
))
{
// Clear first to DOM, append after to reduce flickering/manip
// Clear first to DOM, append after to reduce flickering/manip
while
(
element
.
firstChild
)
{
while
(
element
.
firstChild
)
{
element
.
removeChild
(
element
.
firstChild
);
element
.
removeChild
(
element
.
firstChild
);
}
}
if
(
modification_dict
.
hasOwnProperty
(
'
maximize
'
))
{
if
(
modification_dict
.
hasOwnProperty
(
'
maximize
'
)
||
(
gadget
.
state
.
editor
==
'
notebook_editor
'
))
{
// for fck_editor fields, we want to be able to maximize also in non editable
// for fck_editor fields, we want to be able to maximize also in non editable
if
((
gadget
.
state
.
maximize
&&
gadget
.
state
.
editable
)
||
if
((
gadget
.
state
.
maximize
&&
gadget
.
state
.
editable
)
||
(
gadget
.
state
.
maximize
&&
gadget
.
state
.
editor
===
'
fck_editor
'
))
{
(
gadget
.
state
.
maximize
&&
gadget
.
state
.
editor
===
'
fck_editor
'
))
{
...
...
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