From eb49b3f473da40962bdec11a8651ed0f71694430 Mon Sep 17 00:00:00 2001 From: Tomas Peterka <tomas.peterka@nexedi.com> Date: Mon, 29 Jan 2018 10:14:48 +0000 Subject: [PATCH] [accounting_report_ui_test] Other-Parties report clears caches before running --- .../test_restricted_skin_selection.zpt | 3 +-- .../test_third_parties.zpt | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_restricted_skin_selection.zpt b/bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_restricted_skin_selection.zpt index 0e3284ac07..bf0dbc0e39 100644 --- a/bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_restricted_skin_selection.zpt +++ b/bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_restricted_skin_selection.zpt @@ -3,7 +3,7 @@ <body> <table cellpadding="1" cellspacing="1" border="1"> <thead> -<tr><th rowspan="1" colspan="4"> +<tr><th rowspan="1" colspan="3"> Check that use gets notified if they are using wrong 'Report Style' (UI) Preference. </th></tr> </thead> @@ -38,7 +38,6 @@ Check that use gets notified if they are using wrong 'Report Style' (UI) Prefere <td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_page_form.html"]//input[@type="submit"]</td><td></td></tr> <tr><td>click</td> <td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_page_form.html"]//input[@type="submit"]</td><td></td></tr> - <!-- Now we should get somehow notified about wrong skin selection. At the beginning it was implemented as Form Message because the error is on a hidden field. --> <tr><td>waitForElementPresent</td> diff --git a/bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_third_parties.zpt b/bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_third_parties.zpt index a9f2730514..794d6f460c 100644 --- a/bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_third_parties.zpt +++ b/bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_third_parties.zpt @@ -15,6 +15,11 @@ Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product <tal:block metal:use-macro="here/AccountingZuite_CommonTemplate/macros/init"/> +<tr><td>open</td> + <td>${base_url}/portal_caches/manage_clearAllCache</td><td></td></tr> +<tr><td>assertElementPresent</td> + <td>//div[@class="system-msg" and contains(text(), "All cache factories cleared")]</td><td></td></tr> + <tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.day())"></td><td>day</td></tr> <tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.month())"></td><td>month</td></tr> <tr><td>store</td><td tal:content="python: now.year()"></td><td>year</td></tr> @@ -51,9 +56,9 @@ Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product <tr><td>click</td><!-- Uncheck because it is checked by default --> <td>//input[@type="checkbox" and @name="field_your_omit_balanced_accounts"]</td><td></td></tr> +<tr><th colspan="3">Zero-out simulation_state to just 'delivered'<th></tr> <tr><td>waitForElementPresent</td> <td>//div[@data-gadget-scope="field_your_simulation_state"]/div/div[1]//select</td><td></td></tr> -<!-- we need to zero-out simulation_state to just 'delivered' --> <tal:block tal:repeat="_ python:range(4)"><!-- There is by default just few simulation states --> <!-- we take advantage of dissapearing elements when selecting one empty --> <tr><td>select</td> -- 2.30.9