Commit d4140df6 authored by Ayush Tiwari's avatar Ayush Tiwari

[erp5_web_renderjs_ui_test]: Add notification macros in save macros

This will ensure that whenever we use save macors, it'll use the notification
macros to test for the correct notification hence minimizing code duplication.

Also, Use wait_for_content_loaded macro after we use notification macro in save to ensure that spinner is cleared after notifications
parent bd5c3a0d
......@@ -26,28 +26,11 @@
<td>//button[@data-i18n="Save"][contains(@class, "ui-disabled")]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- Second loader while updating the page -->
<tr>
<td>waitForElementPresent</td>
<td>//h1[@class="ui-title"]//a[contains(@class, "ui-icon-spinner")]</td>
<td></td>
</tr>
<!-- Save Button is disabled -->
<tr>
<td>verifyElementPresent</td>
<td>//button[@data-i18n="Save"][contains(@class, "ui-disabled")]</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//h1[@class="ui-title"]//a[contains(@class, "ui-icon-spinner")]</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>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>verifyElementPresent</td>
<td>//button[@data-i18n="Save"][contains(@class, "ui-icon-check")]</td>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment