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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Leo Le Bouter
erp5
Commits
a593a08e
Commit
a593a08e
authored
Aug 25, 2020
by
Lu Xu
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs_ui_test: UI test upload shared file
parent
e98efa7e
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1060 additions
and
1 deletion
+1060
-1
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_smartassistant_zuite/testOfficeJSSmartAssistantAll.zpt
...ui_smartassistant_zuite/testOfficeJSSmartAssistantAll.zpt
+5
-0
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_smartassistant_zuite/testOfficeJSSmartAssistantUploadSharedFile.xml
...tant_zuite/testOfficeJSSmartAssistantUploadSharedFile.xml
+58
-0
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_smartassistant_zuite/testOfficeJSSmartAssistantUploadSharedFile.zpt
...tant_zuite/testOfficeJSSmartAssistantUploadSharedFile.zpt
+238
-0
bt5/erp5_officejs_ui_test/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_smart_assistant_test_upload_shared_file_html.html
...p5_page_smart_assistant_test_upload_shared_file_html.html
+23
-0
bt5/erp5_officejs_ui_test/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_smart_assistant_test_upload_shared_file_html.xml
...rp5_page_smart_assistant_test_upload_shared_file_html.xml
+370
-0
bt5/erp5_officejs_ui_test/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_smart_assistant_test_upload_shared_file_js.js
...s_erp5_page_smart_assistant_test_upload_shared_file_js.js
+33
-0
bt5/erp5_officejs_ui_test/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_smart_assistant_test_upload_shared_file_js.xml
..._erp5_page_smart_assistant_test_upload_shared_file_js.xml
+329
-0
bt5/erp5_officejs_ui_test/bt/template_keep_last_workflow_history_only_path_list
...est/bt/template_keep_last_workflow_history_only_path_list
+1
-0
bt5/erp5_officejs_ui_test/bt/template_keep_workflow_path_list
...erp5_officejs_ui_test/bt/template_keep_workflow_path_list
+1
-0
bt5/erp5_officejs_ui_test/bt/template_path_list
bt5/erp5_officejs_ui_test/bt/template_path_list
+2
-1
No files found.
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_smartassistant_zuite/testOfficeJSSmartAssistantAll.zpt
View file @
a593a08e
...
...
@@ -381,6 +381,11 @@
<td>
//a[text() = 'New Event']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope='field_your_text_content']//iframe
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//input[@name='action_confirm' and @value='Create Event']
</td>
...
...
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_smartassistant_zuite/testOfficeJSSmartAssistantUploadSharedFile.xml
0 → 100644
View file @
a593a08e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
testOfficeJSSmartAssistantUploadSharedFile
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_smartassistant_zuite/testOfficeJSSmartAssistantUploadSharedFile.zpt
0 → 100644
View file @
a593a08e
<html
xmlns:tal=
"http://xml.zope.org/namespaces/tal"
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
Test OfficeJS UI
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test OfficeJS UI
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<!-- Clean Up -->
<!-- Initialize -->
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/officejs_smart_assistant/
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='Storages']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Storages']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Local is Enough
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=Local is Enough
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//label[@for='upload']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//label[@for='image']
</td>
<td></td>
</tr>
<!-- upload no data-->
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/officejs_smart_assistant/
</td>
<td></td>
</tr>
<tr>
<td>
openAndWait
</td>
<td>
${base_url}/web_site_module/officejs_smart_assistant/app/#/?page=ojs_smart_assistant_upload_shared_file
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[text()="No data found"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//label[@for='upload']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//label[@for='image']
</td>
<td></td>
</tr>
<!-- upload file -->
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/officejs_smart_assistant/
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/officejs_smart_assistant/app/#/?page=ojs_smart_assistant_test_upload_shared_file
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[text()="Data created"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@data-i18n='Filter']
</td>
<td></td>
</tr>
<!-- uploaded file is named by Date() -->
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[contains(text(), "GMT")]
</td>
<td></td>
</tr>
<!-- ERP5 storage -->
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/officejs_smart_assistant/
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Storages
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=Storages
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Erp5
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=Erp5
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
name=erp5_url
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
name=erp5_url
</td>
<td>
${base_url}/web_site_module/
</td>
</tr>
<tr>
<td>
click
</td>
<td>
//button[@data-i18n='Proceed']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//label[@for='upload']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//label[@for='image']
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/officejs_smart_assistant/
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/officejs_smart_assistant/app/#/?page=ojs_smart_assistant_test_upload_shared_file
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[text()="Data created"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[contains(text(), "GMT")]
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//button[@data-i18n='Menu']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Synchronize']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[contains(@href,'smart_assistant_audio')]
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/web_page_module/Zuite_waitForActivities
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Done.
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/smart_assistant_file_module/
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//button[@title="Show All"]
</td>
<td></td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
//button[@title="Show All"]
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
name=listbox_title
</td>
<td>
%GMT%
</td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
Base_doSelect:method
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@class="listbox-container"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[contains(text(), "GMT")]
</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs_ui_test/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_smart_assistant_test_upload_shared_file_html.html
0 → 100644
View file @
a593a08e
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"gadget_officejs_smart_assistant.css"
>
<link
rel=
"manifest"
href=
"gadget_officejs_json_manifest_smart_assistant.json"
>
<title>
OfficeJS Smart Assistant Test Upload Shared File
</title>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"jiodev.js"
></script>
<script
src=
"gadget_erp5_page_ojs_smart_assistant_test_upload_shared_file.js"
></script>
</head>
<body>
<h1>
Testing uploading shared file to Smart Assistant...
</h1>
</body>
</html>
bt5/erp5_officejs_ui_test/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_smart_assistant_test_upload_shared_file_html.xml
0 → 100644
View file @
a593a08e
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs_ui_test/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_smart_assistant_test_upload_shared_file_js.js
0 → 100644
View file @
a593a08e
/*global window, rJS, jIO, FormData*/
/*jslint indent:2, maxlen: 80, nomen: true */
(
function
(
window
,
rJS
,
jIO
,
FormData
)
{
"
use strict
"
;
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareService
(
function
handleWebShareFile
()
{
var
gadget
=
this
,
data
=
new
FormData
();
data
.
append
(
'
file
'
,
'
test
'
);
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
jIO
.
util
.
ajax
({
type
:
'
POST
'
,
url
:
'
testpostData
'
,
dataType
:
"
blob
"
,
processData
:
false
,
contentType
:
false
,
data
:
data
});
})
.
push
(
function
()
{
return
gadget
.
redirect
({
command
:
'
display
'
,
options
:
{
page
:
"
ojs_smart_assistant_upload_shared_file
"
}
});
});
});
}(
window
,
rJS
,
jIO
,
FormData
));
\ No newline at end of file
bt5/erp5_officejs_ui_test/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_smart_assistant_test_upload_shared_file_js.xml
0 → 100644
View file @
a593a08e
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs_ui_test/bt/template_keep_last_workflow_history_only_path_list
0 → 100644
View file @
a593a08e
web_page_module/gadget_officejs_erp5_page_smart_assistant_test_upload_shared_file*
\ No newline at end of file
bt5/erp5_officejs_ui_test/bt/template_keep_workflow_path_list
0 → 100644
View file @
a593a08e
web_page_module/gadget_officejs_erp5_page_smart_assistant_test_upload_shared_file*
\ No newline at end of file
bt5/erp5_officejs_ui_test/bt/template_path_list
View file @
a593a08e
...
...
@@ -3,4 +3,5 @@ notebook_module/notebook_test_purejs
notebook_module/notebook_test_python_basic
portal_tests/officejs_ui_*_zuite
portal_tests/officejs_ui_*_zuite/**
sound_module/test_audio
\ No newline at end of file
sound_module/test_audio
web_page_module/gadget_officejs_erp5_page_smart_assistant_test_upload_shared_file*
\ No newline at end of file
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