Commit df8f4cf3 authored by Tomáš Peterka's avatar Tomáš Peterka

[accounting_rjs_test] Update date testing

parent 445109a5
......@@ -20,9 +20,9 @@ Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product
<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>
<tr><td>store</td><td tal:content="python: '{:0>#2d}/{:0>#2d}/{:d}'.format(today.day(), today.month(), today.year())"></td><td>today</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}/{:0>#2d}/{:d}'.format(tomorrow.day(), tomorrow.month(), tomorrow.year())"></td><td>tomorrow</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}/{:0>#2d}/{:d}'.format(yesterday.day(), yesterday.month(), yesterday.year())"></td><td>yesterday</td></tr>
<tr><td>store</td><td tal:content="python: '{:d}-{:0>#2d}-{:0>#2d}'.format(today.year(), today.month(), today.day())"></td><td>today</td></tr>
<tr><td>store</td><td tal:content="python: '{:d}-{:0>#2d}-{:0>#2d}'.format(tomorrow.year(), tomorrow.month(), tomorrow.day())"></td><td>tomorrow</td></tr>
<tr><td>store</td><td tal:content="python: '{:d}-{:0>#2d}-{:0>#2d}'.format(yesterday.year(), yesterday.month(), yesterday.day())"></td><td>yesterday</td></tr>
<tr><td>store</td>
<td>${base_url}/web_site_module/renderjs_runner</td>
......@@ -58,7 +58,7 @@ Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product
<td>//input[@name="field_your_at_date"]</td><td></td></tr>
<tr><td>type</td>
<td>//input[@name="field_your_at_date"]</td>
<td>${year}-${month}-${day}</td></tr>
<td>${today}</td></tr>
<!-- field_your_section_category_strict is False by default -->
<!-- field_your_portal_type is good by default -->
......
......@@ -100,9 +100,8 @@ Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product
<!-- skip account_number field -->
<!-- skip invoice_number field -->
<!-- skip transaction_reference field -->
<tr><td>assertText</td>
<td>${current_row}/td[6]/a</td>
<td>${last_day}/${last_month}/${last_year}</td></tr>
<tr><td>verifyElementPresent</td>
<td>${current_row}/td[6]//p[@data-date="${last_year}-${last_month}-${last_day}"]</td><td></td></tr>
<tr><td>assertText</td>
<td>${current_row}/td[7]/a</td>
<td>Sale Invoice Transaction</td></tr>
......
......@@ -24,9 +24,9 @@ Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product
<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>
<tr><td>store</td><td tal:content="python: '{:0>#2d}/{:0>#2d}/{:d}'.format(today.day(), today.month(), today.year())"></td><td>today</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}/{:0>#2d}/{:d}'.format(tomorrow.day(), tomorrow.month(), tomorrow.year())"></td><td>tomorrow</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}/{:0>#2d}/{:d}'.format(yesterday.day(), yesterday.month(), yesterday.year())"></td><td>yesterday</td></tr>
<tr><td>store</td><td tal:content="python: '{:d}-{:0>#2d}-{:0>#2d}'.format(today.year(), today.month(), today.day())"></td><td>today</td></tr>
<tr><td>store</td><td tal:content="python: '{:d}-{:0>#2d}-{:0>#2d}'.format(tomorrow.year(), tomorrow.month(), tomorrow.day())"></td><td>tomorrow</td></tr>
<tr><td>store</td><td tal:content="python: '{:d}-{:0>#2d}-{:0>#2d}'.format(yesterday.year(), yesterday.month(), yesterday.day())"></td><td>yesterday</td></tr>
<tr><td>store</td>
<td>${base_url}/web_site_module/renderjs_runner</td>
<td>renderjs_url</td></tr>
......
......@@ -86,7 +86,7 @@ Copy of <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product/ERP5/tes
<tr><td>store</td><td tal:content="python: now.year()"></td><td>year</td></tr>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[1];
date string:$${day}/$${month}/$${year};
date string:$${year}-$${month}-$${day};
title string:First One;
parent_reference string:1;
node_title string:A-REC;
......@@ -119,7 +119,7 @@ Copy of <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product/ERP5/tes
<!-- Second Transaction -->
<tal:block tal:define="row_selector string:$${table}/tbody/tr[4];
date string:$${day}/$${month}/$${year};
date string:$${year}-$${month}-$${day};
title string:Second One;
parent_reference string:2;
node_title string:A-REC;
......@@ -151,7 +151,7 @@ Copy of <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product/ERP5/tes
<!-- Third Transaction -->
<tal:block tal:define="row_selector string:$${table}/tbody/tr[7];
date string:$${day}/$${month}/$${year};
date string:$${year}-$${month}-$${day};
title string:Third One;
parent_reference string:3;
node_title string:A-REC;
......
......@@ -16,7 +16,7 @@ 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>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: '{: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>
<tr><td>store</td>
<td>${base_url}/web_site_module/renderjs_runner</td>
......
......@@ -36,9 +36,9 @@ Usage:
<td>${current_row}/td[1]//a</td>
<td tal:content="string:$specific_reference"></td></tr>
<tr tal:condition="exists:date">
<td>assertText</td>
<td>${current_row}/td[2]//p</td>
<td tal:content="string:$date"></td></tr>
<td>assertElementPresent</td>
<td tal:content="string:$${current_row}/td[2]//p[@data-date='$date']"></td>
<td></td></tr>
<tr tal:condition="exists:title">
<td>assertText</td>
<td>${current_row}/td[3]//a</td>
......@@ -74,9 +74,9 @@ Usage:
<td>current_row</tr>
<tr tal:condition="exists:date">
<td>assertText</td><!-- Date -->
<td tal:content="python: '${{current_row}}/td[{:d}]//p'.format(offset + 1)"></td>
<td tal:content="string:$date"></td></tr>
<td>assertElementPresent</td><!-- Date -->
<td tal:content="python: '${{current_row}}/td[{:d}]//p[@data-date=\'{}\']'.format(offset + 1, date)"></td>
<td></td></tr>
<tr tal:condition="exists:Movement_getExplanationTranslatedPortalType">
<td>assertText</td><!-- Type -->
<td tal:content="python: '${{current_row}}/td[{:d}]//a'.format(offset + 2)"></td>
......@@ -125,9 +125,9 @@ Usage:
<td>current_row</tr>
<tr tal:condition="exists:date">
<td>assertText</td><!-- Date -->
<td tal:content="python: '${{current_row}}/td[{:d}]//p'.format(offset + 1)"></td>
<td tal:content="string:$date"></td></tr>
<td>assertElementPresent</td><!-- Date -->
<td tal:content="python: '${{current_row}}/td[{:d}]//p[@data-date=\'{}\']'.format(offset + 1, date)"></td>
<td></td></tr>
<tr tal:condition="exists:Movement_getSpecificReference">
<td>assertText</td><!-- Transaction Reference -->
<td tal:content="python: '${{current_row}}/td[{:d}]//a'.format(offset + 2)"></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