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
147
Merge Requests
147
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
fac1111f
Commit
fac1111f
authored
Jul 18, 2019
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs_ui_test: refactoring on text editor app tests
parent
8cc9e49b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
298 additions
and
42 deletions
+298
-42
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_texteditor_zuite/testOfficeJSTextEditor.zpt
...s/officejs_ui_texteditor_zuite/testOfficeJSTextEditor.zpt
+152
-12
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_texteditor_zuite/testOfficeJSTextEditorErp5Synchronization.zpt
...ditor_zuite/testOfficeJSTextEditorErp5Synchronization.zpt
+40
-29
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_texteditor_zuite/testOfficeJSTextEditorMigration.zpt
...s_ui_texteditor_zuite/testOfficeJSTextEditorMigration.zpt
+1
-1
bt5/erp5_officejs_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_ui_test/gadget_officejs_create_bad_storage_for_text_editor.html.html
...get_officejs_create_bad_storage_for_text_editor.html.html
+22
-0
bt5/erp5_officejs_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_ui_test/gadget_officejs_create_bad_storage_for_text_editor.html.xml
...dget_officejs_create_bad_storage_for_text_editor.html.xml
+28
-0
bt5/erp5_officejs_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_ui_test/gadget_officejs_create_bad_storage_for_text_editor.js.js
.../gadget_officejs_create_bad_storage_for_text_editor.js.js
+23
-0
bt5/erp5_officejs_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_ui_test/gadget_officejs_create_bad_storage_for_text_editor.js.xml
...gadget_officejs_create_bad_storage_for_text_editor.js.xml
+32
-0
No files found.
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_texteditor_zuite/testOfficeJSTextEditor.zpt
View file @
fac1111f
...
...
@@ -46,21 +46,35 @@
<td>
link=Local is Enough
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Add
</td>
<td></td>
<td>
waitForElementPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//a[@data-i18n="Add"]
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=Add
</td>
<td></td>
<td>
click
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//a[@data-i18n="Add"]
</td>
<td></td>
</tr>
<!-- Skip dialog because there is only one portal type
<tr>
<td>waitForElementPresent</td>
<td>
//button[@data-i18n='Save']
</td>
<td>//select[@name="portal_type"]</td>
<td></td>
<tr>
<tr>
<td>select</td>
<td>//select[@name="portal_type"]</td>
<td>value=Web Page</td>
<tr>
<tr>
<td>click</td>
<td>//div[contains(@class, 'dialog_button_container')]//input[@value="Create Document"]</td>
<td></td>
</tr>
-->
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'Test Titre %s' % DateTime()"
>
Titre
</td>
...
...
@@ -116,34 +130,102 @@
<td>
//textarea[@title='Description']
</td>
<td>
${description}
</td>
</tr>
<tr>
<td>
click
</td>
<td>
//button[@data-i18n='Save']
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tal:block
tal:define=
"notification_configuration python: {'class': 'success',
'text': 'Data Updated'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification"
/>
</tal:block>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Document']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//a[@data-i18n="Add"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope="notification"]//button[text()='Data Updated']
</td>
<td>
link=${title}
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Document']
</td>
<td>
link=${title}
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Add
</td>
<td>
//textarea[@title='Description']
</td>
<td></td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//input[@title='Title']
</td>
<td>
${title}
</td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//input[@title='Reference']
</td>
<td>
${reference}
</td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//input[@title='Version']
</td>
<td>
${version}
</td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//input[@title='Language']
</td>
<td>
${language}
</td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//textarea[@title='Description']
</td>
<td>
${description}
</td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=${title}
</td>
<td>
identifier=cke_1_contents
</td>
<td></td>
</tr>
<!-- Clone action -->
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//a[@data-i18n="Actions"]
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//a[@data-i18n="Actions"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_page_action_officejs.html')]//a[@data-i18n="Clone"]
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_page_action_officejs.html')]//a[@data-i18n="Clone"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[contains(@class, 'dialog_button_container')]//input[@value="Clone"]
</td>
<td></td>
<tr>
<tr>
<td>
click
</td>
<td>
link=${title}
</td>
<td>
//div[contains(@class, 'dialog_button_container')]//input[@value="Clone"]
</td>
<td></td>
</tr>
<tr>
...
...
@@ -156,6 +238,64 @@
<td>
//input[@title='Title']
</td>
<td>
${title}
</td>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python:'Cloned document'"
>
Titre
</td>
<td>
cloned_title
</td>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@title='Title']
</td>
<td>
${cloned_title}
</td>
</tr>
<tr>
<td>
click
</td>
<td>
//button[@data-i18n='Save']
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tal:block
tal:define=
"notification_configuration python: {'class': 'success',
'text': 'Data Updated'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification"
/>
</tal:block>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Document']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//a[@data-i18n="Add"]
</td>
<td></td>
</tr>
<!-- check that previous document still exists -->
<tr>
<td>
waitForElementPresent
</td>
<td>
link=${title}
</td>
<td></td>
</tr>
<!-- check new cloned document -->
<tr>
<td>
waitForElementPresent
</td>
<td>
link=${cloned_title}
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=${cloned_title}
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//textarea[@title='Description']
</td>
<td></td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//input[@title='Title']
</td>
<td>
${cloned_title}
</td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//input[@title='Reference']
</td>
...
...
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_texteditor_zuite/testOfficeJSTextEditorErp5Synchronization.zpt
View file @
fac1111f
...
...
@@ -62,21 +62,18 @@
<td>
//button[@data-i18n='Proceed']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Add
</td>
<td></td>
<td>
waitForElementPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//a[@data-i18n="Add"]
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=Add
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@data-i18n='Save']
</td>
<td></td>
<td>
click
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//a[@data-i18n="Add"]
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr>
<td>
waitForElementPresent
</td>
<td>
identifier=title
</td>
...
...
@@ -117,11 +114,12 @@
<td>
//button[@data-i18n='Save']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope="notification"]//button[text()='Data Updated']
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tal:block
tal:define=
"notification_configuration python: {'class': 'success',
'text': 'Data Updated'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification"
/>
</tal:block>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Document']
</td>
...
...
@@ -129,21 +127,18 @@
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded"
/>
<!-- Verify Search, add another document -->
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='Add'
]
</td>
<td></td>
<td>
waitForElementPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//a[@data-i18n="Add"
]
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Add']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@data-i18n='Save']
</td>
<td></td>
<td>
click
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//a[@data-i18n="Add"]
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr>
<td>
store
</td>
<td>
search
</td>
...
...
@@ -169,6 +164,12 @@
<td>
//button[@data-i18n='Save']
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tal:block
tal:define=
"notification_configuration python: {'class': 'success',
'text': 'Data Updated'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification"
/>
</tal:block>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Document']
</td>
...
...
@@ -209,8 +210,13 @@
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
${title}
</td>
<td>
waitForElementPresent
</td>
<td>
//input[@name='title']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//input[@value='${title}']
</td>
<td></td>
</tr>
<tr>
...
...
@@ -308,6 +314,11 @@
<td>
${base_url}/web_page_module/Zuite_waitForActivities
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//pre
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Done.
</td>
...
...
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_texteditor_zuite/testOfficeJSTextEditorMigration.zpt
View file @
fac1111f
...
...
@@ -24,7 +24,7 @@
<!-- Initialize -->
<tr>
<td>
open
</td>
<td>
${base_url}/portal_skins/erp5_officejs_ui_test/gadget_officejs_create_bad_storage.html
</td>
<td>
${base_url}/portal_skins/erp5_officejs_ui_test/gadget_officejs_create_bad_storage
_for_text_editor
.html
</td>
<td></td>
</tr>
<tr>
...
...
bt5/erp5_officejs_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_ui_test/gadget_officejs_create_bad_storage_for_text_editor.html.html
0 → 100644
View file @
fac1111f
<!DOCTYPE html>
<html>
<head>
<!--
data-i18n=No records
data-i18n=Records
-->
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<title>
Bad Storage Creation
</title>
<!-- renderjs -->
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"jio.js"
></script>
<!-- custom script -->
<script
src=
"gadget_officejs_create_bad_storage_for_text_editor.js"
type=
"text/javascript"
></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_ui_test/gadget_officejs_create_bad_storage_for_text_editor.html.xml
0 → 100644
View file @
fac1111f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
gadget_officejs_create_bad_storage_for_text_editor.html
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_ui_test/gadget_officejs_create_bad_storage_for_text_editor.js.js
0 → 100644
View file @
fac1111f
/*jslint indent: 2, nomen: true */
/*global window, rJS, jIO, document*/
(
function
(
window
,
rJS
,
jIO
)
{
"
use strict
"
;
rJS
(
window
)
.
declareService
(
function
()
{
var
storage
=
jIO
.
createJIO
({
type
:
"
indexeddb
"
,
database
:
"
setting
"
}),
gadget
=
this
;
return
storage
.
put
(
'
setting/Text Editor
'
,
{
'
jio_storage_description
'
:
{
type
:
'
unknownstorage
'
}}
)
.
push
(
function
()
{
var
div
=
document
.
createElement
(
'
div
'
);
div
.
textContent
=
'
Storage Created
'
;
gadget
.
element
.
appendChild
(
div
);
});
});
}(
window
,
rJS
,
jIO
,
document
));
bt5/erp5_officejs_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_ui_test/gadget_officejs_create_bad_storage_for_text_editor.js.xml
0 → 100644
View file @
fac1111f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Cacheable__manager_id
</string>
</key>
<value>
<string>
http_cache
</string>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
gadget_officejs_create_bad_storage_for_text_editor.js
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
application/javascript
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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