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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
erp5
Commits
de2757b4
Commit
de2757b4
authored
Feb 17, 2020
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
web_renderjs_ui_test: simplify tests by using macros
Also fix a few copy/pasted test titles.
parent
7278881d
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
193 deletions
+28
-193
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testFormViewEditableSaveCustomMessage.zpt
...ification_zuite/testFormViewEditableSaveCustomMessage.zpt
+3
-43
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testFormViewEditableSaveSuccess.zpt
...ui_notification_zuite/testFormViewEditableSaveSuccess.zpt
+4
-48
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testNoConfirmationWhenFormContentSaved.zpt
...fication_zuite/testNoConfirmationWhenFormContentSaved.zpt
+5
-28
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testPageActionNonConfirmation.zpt
...s_ui_notification_zuite/testPageActionNonConfirmation.zpt
+5
-29
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testPageEditableWithConfirmation.zpt
...i_notification_zuite/testPageEditableWithConfirmation.zpt
+5
-27
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testPageFormListNonConfirmation.zpt
...ui_notification_zuite/testPageFormListNonConfirmation.zpt
+2
-14
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testWorkflowTransitionFail.zpt
...erjs_ui_notification_zuite/testWorkflowTransitionFail.zpt
+2
-2
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testWorkflowTransitionPass.zpt
...erjs_ui_notification_zuite/testWorkflowTransitionPass.zpt
+2
-2
No files found.
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testFormViewEditableSaveCustomMessage.zpt
View file @
de2757b4
...
@@ -16,55 +16,15 @@
...
@@ -16,55 +16,15 @@
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module/1?editable=true
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module/1?editable=true
</td>
<td></td>
<td></td>
</tr>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded"
/>
<!-- Wait for gadget to be loaded -->
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_view_editable.html']
</td>
<td></td>
</tr>
<tr>
<td>
waitForTextPresent
</td>
<td>
Title 1
</td>
<td></td>
</tr>
<!-- Header has a save button -->
<tr>
<td>
assertElementPresent
</td>
<td>
//div[@data-gadget-scope='header']//button[text()='Save' and @type='submit']
</td>
<td></td>
</tr>
<tr>
<tr>
<td>
type
</td>
<td>
type
</td>
<td>
field_my_title
</td>
<td>
field_my_title
</td>
<td>
Custom Message
</td>
<td>
Custom Message
</td>
</tr>
</tr>
<tr>
<td>
click
</td>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/click_save"
/>
<td>
//div[@data-gadget-scope='header']//button[text()='Save' and @type='submit']
</td>
<td></td>
</tr>
<tr>
<td>
pause
</td>
<td>
1000
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope='header']//button[text()='Save' and @type='submit' and contains(@class, 'ui-icon-check')]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope='header']//a[text()='Foo: Custom Message' and contains(@href, '#!history_previous')]
</td>
<td></td>
</tr>
<tr>
<td>
assertTextNotPresent
</td>
<td>
Title 1
</td>
<td></td>
</tr>
<tal:block
tal:define=
"notification_configuration python: {'class': 'error',
<tal:block
tal:define=
"notification_configuration python: {'class': 'error',
'text': 'Custom Message.'}"
>
'text': 'Custom Message.'}"
>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testFormViewEditableSaveSuccess.zpt
View file @
de2757b4
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<body>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test
Default Module View
</td></tr>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test
Form View Editable Save Action
</td></tr>
</thead><tbody>
</thead><tbody>
<tal:block
metal:use-macro=
"here/PTZuite_CommonTemplate/macros/init"
/>
<tal:block
metal:use-macro=
"here/PTZuite_CommonTemplate/macros/init"
/>
...
@@ -17,59 +17,15 @@
...
@@ -17,59 +17,15 @@
<td></td>
<td></td>
</tr>
</tr>
<!-- Wait for gadget to be loaded -->
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded"
/>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_view_editable.html']
</td>
<td></td>
</tr>
<tr>
<td>
waitForTextPresent
</td>
<td>
Title 1
</td>
<td></td>
</tr>
<!-- Header has a save button -->
<tr>
<td>
assertElementPresent
</td>
<td>
//div[@data-gadget-scope='header']//button[text()='Save' and @type='submit']
</td>
<td></td>
</tr>
<tr>
<tr>
<td>
type
</td>
<td>
type
</td>
<td>
field_my_title
</td>
<td>
field_my_title
</td>
<td>
QWERTY
</td>
<td>
QWERTY
</td>
</tr>
</tr>
<tr>
<td>
click
</td>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/click_save"
/>
<td>
//div[@data-gadget-scope='header']//button[text()='Save' and @type='submit']
</td>
<td></td>
</tr>
<tr>
<td>
pause
</td>
<td>
1000
</td>
<td></td>
</tr>
<!--tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//button[text()='Save' and @type='submit' and contains(@class, 'ui-icon-spinner')]</td>
<td></td>
</tr-->
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope='header']//button[text()='Save' and @type='submit' and contains(@class, 'ui-icon-check')]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope='header']//a[text()='Foo: QWERTY' and contains(@href, '#!history_previous')]
</td>
<td></td>
</tr>
<tr>
<td>
assertTextNotPresent
</td>
<td>
Title 1
</td>
<td></td>
</tr>
<tal:block
tal:define=
"notification_configuration python: {'class': 'success',
<tal:block
tal:define=
"notification_configuration python: {'class': 'success',
'text': 'Data updated.'}"
>
'text': 'Data updated.'}"
>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testNoConfirmationWhenFormContentSaved.zpt
View file @
de2757b4
...
@@ -2,45 +2,22 @@
...
@@ -2,45 +2,22 @@
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
<head>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
Test
RenderJS UI
</title>
<title>
Test
No Confirmation when Form Content Saved
</title>
</head>
</head>
<body>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test
RenderJS UI
</td></tr>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test
No Confirmation when Form Content Saved
</td></tr>
</thead><tbody>
</thead><tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<tal:block
metal:use-macro=
"here/PTZuite_CommonTemplate/macros/init"
/>
<!-- Clean Up -->
<tr>
<td>
open
</td>
<td>
${base_url}/foo_module/ListBoxZuite_reset
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Reset Successfully.
</td>
<td></td>
</tr>
<!-- Initialize -->
<!-- Initialize -->
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module
/1?editable=true
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded"
/>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='Add']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=Add
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog"
/>
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testPageActionNonConfirmation.zpt
View file @
de2757b4
...
@@ -2,46 +2,22 @@
...
@@ -2,46 +2,22 @@
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
<head>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
Test
RenderJS UI
</title>
<title>
Test
Page Action non Confirmation
</title>
</head>
</head>
<body>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test
RenderJS UI
</td></tr>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test
Page Action non Confirmation
</td></tr>
</thead><tbody>
</thead><tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<tal:block
metal:use-macro=
"here/PTZuite_CommonTemplate/macros/init"
/>
<!-- Clean Up -->
<tr>
<td>
open
</td>
<td>
${base_url}/bar_module/ListBoxZuite_reset
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Reset Successfully.
</td>
<td></td>
</tr>
<!-- Initialize -->
<!-- Initialize -->
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module/1?editable=true
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='Add']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded"
/>
<td>
click
</td>
<td>
link=Add
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog"
/>
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testPageEditableWithConfirmation.zpt
View file @
de2757b4
...
@@ -2,45 +2,23 @@
...
@@ -2,45 +2,23 @@
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
<head>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
Test
RenderJS UI
</title>
<title>
Test
EDitable with Confirmation
</title>
</head>
</head>
<body>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test
RenderJS UI
</td></tr>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test
EDitable with Confirmation
</td></tr>
</thead><tbody>
</thead><tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<!-- Clean Up -->
<tal:block
metal:use-macro=
"here/PTZuite_CommonTemplate/macros/init"
/>
<tr>
<td>
open
</td>
<td>
${base_url}/bar_module/ListBoxZuite_reset
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Reset Successfully.
</td>
<td></td>
</tr>
<!-- Initialize -->
<!-- Initialize -->
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module/1?editable=true
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='Add']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=Add
</td>
<td></td>
<td></td>
</tr>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog"
/>
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testPageFormListNonConfirmation.zpt
View file @
de2757b4
...
@@ -2,27 +2,15 @@
...
@@ -2,27 +2,15 @@
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
<head>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
Test
RenderJS UI
</title>
<title>
Test
Form List non Confirmation
</title>
</head>
</head>
<body>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test
RenderJS UI
</td></tr>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test
Form List non Confirmation
</td></tr>
</thead><tbody>
</thead><tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<!-- Clean Up -->
<tr>
<td>
open
</td>
<td>
${base_url}/foo_module/ListBoxZuite_reset
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Reset Successfully.
</td>
<td></td>
</tr>
<!-- Initialize -->
<!-- Initialize -->
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testWorkflowTransitionFail.zpt
View file @
de2757b4
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
<head>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
Test
Form View Editable Save Action
</title>
<title>
Test
Workflow Transition Fail
</title>
</head>
</head>
<body>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test
Default Module View
</td></tr>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test
Workflow Transition Fail
</td></tr>
</thead><tbody>
</thead><tbody>
<tal:block
metal:use-macro=
"here/PTZuite_CommonTemplate/macros/init"
/>
<tal:block
metal:use-macro=
"here/PTZuite_CommonTemplate/macros/init"
/>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testWorkflowTransitionPass.zpt
View file @
de2757b4
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
<head>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
Test
Form View Editable Save Action
</title>
<title>
Test
Workflow Transition Pass
</title>
</head>
</head>
<body>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test
Default Module View
</td></tr>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test
Workflow Transition Pass
</td></tr>
</thead><tbody>
</thead><tbody>
<tal:block
metal:use-macro=
"here/PTZuite_CommonTemplate/macros/init"
/>
<tal:block
metal:use-macro=
"here/PTZuite_CommonTemplate/macros/init"
/>
...
...
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