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
Ekaterina
erp5
Commits
45832eae
Commit
45832eae
authored
Feb 19, 2018
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui_test]: Substitute macros for the notifications in tests
parent
24e3f704
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
47 deletions
+33
-47
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testActionFail.zpt
...l_tests/renderjs_ui_notification_zuite/testActionFail.zpt
+4
-5
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testFormViewEditableSaveFail.zpt
...js_ui_notification_zuite/testFormViewEditableSaveFail.zpt
+5
-10
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testFormViewEditableSaveSuccess.zpt
...ui_notification_zuite/testFormViewEditableSaveSuccess.zpt
+4
-10
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testHiddenFieldError.zpt
...s/renderjs_ui_notification_zuite/testHiddenFieldError.zpt
+4
-2
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testWorkflowTransitionPass.zpt
...erjs_ui_notification_zuite/testWorkflowTransitionPass.zpt
+4
-10
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormDialogWorkflowActionCrash.zpt
...age_templates_zuite/testFormDialogWorkflowActionCrash.zpt
+6
-5
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewEditableCrashOnSaveAction.zpt
...templates_zuite/testFormViewEditableCrashOnSaveAction.zpt
+6
-5
No files found.
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testActionFail.zpt
View file @
45832eae
...
...
@@ -55,11 +55,10 @@
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog"
/>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope='notification']//button[@class='error']
</td>
<td></td>
</tr>
<tal:block
tal:define=
"notification_configuration python: {'class': 'error',
'text': 'Encountered an unknown error. Try to resubmit.'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification"
/>
</tal:block>
</tbody></table>
</body>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testFormViewEditableSaveFail.zpt
View file @
45832eae
...
...
@@ -73,17 +73,12 @@
<td>
QWERTY
</td>
</tr>
<t
r>
<td>
assertTextPresent
</td
>
<t
d>
Input data has errors.
</td
>
<td></td
>
</tr>
<t
al:block
tal:define=
"notification_configuration python: {'class': 'error',
'text': 'Input data has errors.'}"
>
<t
al:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification"
/
>
</tal:block
>
<tr>
<td>
verifyElementPresent
</td>
<td>
//div[@data-gadget-scope='notification']//button[@class='error']
</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testFormViewEditableSaveSuccess.zpt
View file @
45832eae
...
...
@@ -70,17 +70,11 @@
<td>
Title 1
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Data updated.
</td>
<td></td>
</tr>
<tr>
<td>
verifyElementPresent
</td>
<td>
//div[@data-gadget-scope='notification']//button[@class='success']
</td>
<td></td>
</tr>
<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>
</tbody></table>
</body>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testHiddenFieldError.zpt
View file @
45832eae
...
...
@@ -44,8 +44,10 @@ Check that user gets notified if there is an error on a hidden field.
<td>
//button[@data-i18n='Save']
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//button[@data-i18n='Save']
</td><td></td></tr>
<tr><td>
waitForTextPresent
</td>
<td>
The input failed the external validator.
</td><td></td></tr>
<tal:block
tal:define=
"notification_configuration python: {'class': 'error',
'text': 'Input data has errors.'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification"
/>
</tal:block>
</tbody>
</table>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testWorkflowTransitionPass.zpt
View file @
45832eae
...
...
@@ -60,17 +60,11 @@
<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>
assertTextPresent
</td>
<td>
Status changed.
</td>
<td></td>
</tr>
<tr>
<td>
verifyElementPresent
</td>
<td>
//div[@data-gadget-scope='notification']//button[@class='success']
</td>
<td></td>
</tr>
<tal:block
tal:define=
"notification_configuration python: {'class': 'success',
'text': 'Status changed.'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification"
/>
</tal:block>
</tbody></table>
</body>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormDialogWorkflowActionCrash.zpt
View file @
45832eae
...
...
@@ -57,13 +57,14 @@
<td>
//input[@type='submit' and @value='Dummy Crashing Workflow Action']
</td>
<td></td>
</tr>
<!-- Wait for the notification to appear. We cannot use verifyText because the button
is there all the time. It gets text assigned and is shown asynchronously later. -->
<t
r>
<td>
waitForElementPresent
</td
>
<t
d>
//div[@data-gadget-scope='notification']/button[text()='Encountered an unknown error. Try to resubmit.']
</td
>
<td></td
>
</tr>
<t
al:block
tal:define=
"notification_configuration python: {'class': 'error',
'text': 'Encountered an unknown error. Try to resubmit.'}"
>
<t
al:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification"
/
>
</tal:block
>
<!-- Modified form data must stay after the notification -->
<tr>
<td>
verifyValue
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewEditableCrashOnSaveAction.zpt
View file @
45832eae
...
...
@@ -66,11 +66,12 @@
</tr>
<!-- Wait for the notification to appear. We cannot use verifyText because the button
is there all the time. It gets text assigned and is shown asynchronously later. -->
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope='notification']/button[text()='Encountered an unknown error. Try to resubmit.']
</td>
<td></td>
</tr>
<tal:block
tal:define=
"notification_configuration python: {'class': 'error',
'text': 'Encountered an unknown error. Try to resubmit.'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification"
/>
</tal:block>
<!-- Modified form data must stay after the notification -->
<tr>
<td>
verifyValue
</td>
...
...
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