Commit 89a94cec authored by Jérome Perrin's avatar Jérome Perrin

pdm_renderjs_ui_test: align test with pdm_ui_test

Previously, these tests were displaying the listbox with two lines, one
for source one for destination and where checking both lines at once.
Now that it's possible to filter by node category (site) in renderjs as
well, adjust the test to select the node categories one by one and check
that the results for each line category is what we expect.

Also fix a few typos
parent 90160a47
...@@ -14,32 +14,26 @@ Test stock browser for components portal type ...@@ -14,32 +14,26 @@ Test stock browser for components portal type
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check destination -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_destination_node_title';
index python: 1;
current_inventory python: 1.0;
available_inventory python: 1.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
</tal:block>
<!-- Check source --> <!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
index python: 2; node_title string: erp5_pdm_ui_test_source_node_title;
movement_count python: 1;
current_inventory python: -1.0; current_inventory python: -1.0;
available_inventory python: -1.0; available_inventory python: -1.0;
future_inventory python: -1.0; future_inventory python: -1.0;
"> ">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block> </tal:block>
<!-- Check for total value --> <!-- Check destination -->
<tal:block tal:define="current_inventory python: 0.0; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
available_inventory python: 0.0; node_title string: erp5_pdm_ui_test_destination_node_title;
future_inventory python: 0.0; movement_count python: 1;
current_inventory python: 1.0;
available_inventory python: 1.0;
future_inventory python: 1.0;
"> ">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_total_for_inventory" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block> </tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
......
...@@ -13,38 +13,32 @@ Test stock browser for confirmed state ...@@ -13,38 +13,32 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check destination -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_destination_node_title';
index python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
</tal:block>
<!-- Check source --> <!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
index python: 2; node_title string: erp5_pdm_ui_test_source_node_title;
movement_count python: 1;
current_inventory python: 0.0; current_inventory python: 0.0;
available_inventory python: -1.0; available_inventory python: -1.0;
future_inventory python: -1.0; future_inventory python: -1.0;
"> ">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block> </tal:block>
<!-- Check for total value --> <!-- Check destination -->
<tal:block tal:define="current_inventory python: 0.0; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
available_inventory python: -1.0; node_title string: erp5_pdm_ui_test_destination_node_title;
future_inventory python: 0.0; movement_count python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 1.0;
"> ">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_total_for_inventory" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block> </tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way --> <!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros --> <!-- TODO: If possible, move to macros -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td> <td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
......
<html> <html>
<head><title>Test stock browser for confirmed state</title></head> <head><title>Test stock browser for delivered state</title></head>
<body> <body>
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="4"> <tr><td rowspan="1" colspan="4">
Test stock browser for confirmed state Test stock browser for delivered state
</td></tr> </td></tr>
</thead> </thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=delivered"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=delivered">
...@@ -13,38 +13,32 @@ Test stock browser for confirmed state ...@@ -13,38 +13,32 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check destination -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_destination_node_title';
index python: 1;
current_inventory python: 1.0;
available_inventory python: 1.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
</tal:block>
<!-- Check source --> <!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
index python: 2; node_title string: erp5_pdm_ui_test_source_node_title;
movement_count python: 1;
current_inventory python: -1.0; current_inventory python: -1.0;
available_inventory python: -1.0; available_inventory python: -1.0;
future_inventory python: -1.0; future_inventory python: -1.0;
"> ">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block> </tal:block>
<!-- Check for total value --> <!-- Check destination -->
<tal:block tal:define="current_inventory python: 0.0; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
available_inventory python: 0.0; node_title string: erp5_pdm_ui_test_destination_node_title;
future_inventory python: 0.0; movement_count python: 1;
current_inventory python: 1.0;
available_inventory python: 1.0;
future_inventory python: 1.0;
"> ">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_total_for_inventory" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block> </tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way --> <!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros --> <!-- TODO: If possible, move to macros -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td> <td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
......
<html> <html>
<head><title>Test stock browser for confirmed state</title></head> <head><title>Test stock browser for ordered state</title></head>
<body> <body>
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="4"> <tr><td rowspan="1" colspan="4">
Test stock browser for confirmed state Test stock browser for ordered state
</td></tr> </td></tr>
</thead> </thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=ordered"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=ordered">
...@@ -13,38 +13,32 @@ Test stock browser for confirmed state ...@@ -13,38 +13,32 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check destination -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_destination_node_title';
index python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
</tal:block>
<!-- Check source --> <!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
index python: 2; node_title string: erp5_pdm_ui_test_source_node_title;
movement_count python: 1;
current_inventory python: 0.0; current_inventory python: 0.0;
available_inventory python: 0.0; available_inventory python: 0.0;
future_inventory python: -1.0; future_inventory python: -1.0;
"> ">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block> </tal:block>
<!-- Check for total value --> <!-- Check destination -->
<tal:block tal:define="current_inventory python: 0.0; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
node_title string: erp5_pdm_ui_test_destination_node_title;
movement_count python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0; available_inventory python: 0.0;
future_inventory python: 0.0; future_inventory python: 1.0;
"> ">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_total_for_inventory" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block> </tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way --> <!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros --> <!-- TODO: If possible, move to macros -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td> <td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
......
<html> <html>
<head><title>Test stock browser for confirmed state</title></head> <head><title>Test stock browser for planned state</title></head>
<body> <body>
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="4"> <tr><td rowspan="1" colspan="4">
Test stock browser for confirmed state Test stock browser for planned state
</td></tr> </td></tr>
</thead> </thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=planned"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=planned">
...@@ -13,38 +13,32 @@ Test stock browser for confirmed state ...@@ -13,38 +13,32 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check destination -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_destination_node_title';
index python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
</tal:block>
<!-- Check source --> <!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
index python: 2; node_title string: erp5_pdm_ui_test_source_node_title;
movement_count python: 1;
current_inventory python: 0.0; current_inventory python: 0.0;
available_inventory python: 0.0; available_inventory python: 0.0;
future_inventory python: -1.0; future_inventory python: -1.0;
"> ">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block> </tal:block>
<!-- Check for total value --> <!-- Check destination -->
<tal:block tal:define="current_inventory python: 0.0; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
node_title string: erp5_pdm_ui_test_destination_node_title;
movement_count python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0; available_inventory python: 0.0;
future_inventory python: 0.0; future_inventory python: 1.0;
"> ">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_total_for_inventory" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block> </tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way --> <!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros --> <!-- TODO: If possible, move to macros -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td> <td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
......
<html> <html>
<head><title>Test stock browser for confirmed state</title></head> <head><title>Test stock browser for ready state</title></head>
<body> <body>
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="4"> <tr><td rowspan="1" colspan="4">
Test stock browser for confirmed state Test stock browser for ready state
</td></tr> </td></tr>
</thead> </thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=ready"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=ready">
...@@ -13,38 +13,32 @@ Test stock browser for confirmed state ...@@ -13,38 +13,32 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check destination -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_destination_node_title';
index python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
</tal:block>
<!-- Check source --> <!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
index python: 2; node_title string: erp5_pdm_ui_test_source_node_title;
movement_count python: 1;
current_inventory python: 0.0; current_inventory python: 0.0;
available_inventory python: -1.0; available_inventory python: -1.0;
future_inventory python: -1.0; future_inventory python: -1.0;
"> ">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block> </tal:block>
<!-- Check for total value --> <!-- Check destination -->
<tal:block tal:define="current_inventory python: 0.0; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
available_inventory python: -1.0; node_title string: erp5_pdm_ui_test_destination_node_title;
future_inventory python: 0.0; movement_count python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 1.0;
"> ">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_total_for_inventory" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block> </tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way --> <!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros --> <!-- TODO: If possible, move to macros -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td> <td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
......
<html> <html>
<head><title>Test stock browser for confirmed state</title></head> <head><title>Test stock browser for started state</title></head>
<body> <body>
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="4"> <tr><td rowspan="1" colspan="4">
Test stock browser for confirmed state Test stock browser for started state
</td></tr> </td></tr>
</thead> </thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=started"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=started">
...@@ -13,38 +13,32 @@ Test stock browser for confirmed state ...@@ -13,38 +13,32 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check destination -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_destination_node_title';
index python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
</tal:block>
<!-- Check source --> <!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
index python: 2; node_title string: erp5_pdm_ui_test_source_node_title;
movement_count python: 1;
current_inventory python: -1.0; current_inventory python: -1.0;
available_inventory python: -1.0; available_inventory python: -1.0;
future_inventory python: -1.0; future_inventory python: -1.0;
"> ">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block> </tal:block>
<!-- Check for total value --> <!-- Check destination -->
<tal:block tal:define="current_inventory python: -1.0; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
available_inventory python: -1.0; node_title string: erp5_pdm_ui_test_destination_node_title;
future_inventory python: 0.0; movement_count python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 1.0;
"> ">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_total_for_inventory" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block> </tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way --> <!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros --> <!-- TODO: If possible, move to macros -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td> <td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
......
<html> <html>
<head><title>Test stock browser for confirmed state</title></head> <head><title>Test stock browser for stopped state</title></head>
<body> <body>
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="4"> <tr><td rowspan="1" colspan="4">
Test stock browser for confirmed state Test stock browser for stopped state
</td></tr> </td></tr>
</thead> </thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=stopped"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=stopped">
...@@ -13,38 +13,32 @@ Test stock browser for confirmed state ...@@ -13,38 +13,32 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check destination -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_destination_node_title';
index python: 1;
current_inventory python: 1.0;
available_inventory python: 1.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
</tal:block>
<!-- Check source --> <!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
index python: 2; node_title string: erp5_pdm_ui_test_source_node_title;
movement_count python: 1;
current_inventory python: -1.0; current_inventory python: -1.0;
available_inventory python: -1.0; available_inventory python: -1.0;
future_inventory python: -1.0; future_inventory python: -1.0;
"> ">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block> </tal:block>
<!-- Check for total value --> <!-- Check destination -->
<tal:block tal:define="current_inventory python: 0.0; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
available_inventory python: 0.0; node_title string: erp5_pdm_ui_test_destination_node_title;
future_inventory python: 0.0; movement_count python: 1;
current_inventory python: 1.0;
available_inventory python: 1.0;
future_inventory python: 1.0;
"> ">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_total_for_inventory" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block> </tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way --> <!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros --> <!-- TODO: If possible, move to macros -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td> <td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
......
...@@ -103,21 +103,6 @@ ...@@ -103,21 +103,6 @@
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a/@href</td> <td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a/@href</td>
<td>regexp:.*view_movement_history.*</td> <td>regexp:.*view_movement_history.*</td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[2]/td[1]/a</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[2]/td[1]/a/@href</td>
<td>regexp:.*push_history.*</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[2]/td[1]/a/@href</td>
<td>regexp:.*view_movement_history.*</td>
</tr>
<tr> <tr>
<td colspan="3"><p></p></td> <td colspan="3"><p></p></td>
</tr> </tr>
......
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal" <tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"> xmlns:metal="http://xml.zope.org/namespaces/metal">
<tal:block metal:define-macro="init" tal:define="base_url python: '/' + here.getPortalObject().getId()"> <tal:block metal:define-macro="check_inventory" tal:define="base_url python: '/' + here.getPortalObject().getId()">
<tr>
<td colspan="3"><b>Select node category in dialog</b></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="field_your_node_category"]</td>
<td tal:content='node_category'></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check inventory total records --> <!-- Check inventory total records -->
<tal:block tal:define="pagination_configuration python: {'header': '(2)', 'footer': '2 Records'}"> <tal:block tal:define="pagination_configuration python: {'header': '(%s)' % movement_count, 'footer': '%s Records' % movement_count}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block> </tal:block>
<!-- Check the correct title --> <!-- Check node title -->
<tr> <tr>
<td>assertText</td> <td>assertText</td>
<td tal:content="python: '//div[@data-gadget-scope=\'field_listbox\']//table/tbody/tr[%s]/td[1]' % index">inventory value</td> <td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]</td>
<td tal:content="python: title"></td> <td tal:content="node_title"></td>
</tr> </tr>
<!-- Check that inventory and movement list are consistent while in loop --> <!-- Check that inventory and movement list are consistent while in loop -->
...@@ -21,19 +33,10 @@ ...@@ -21,19 +33,10 @@
]"> ]">
<tr> <tr>
<td>assertText</td> <td>assertText</td>
<td tal:content="python: '//div[@data-gadget-scope=\'field_listbox\']//table/tbody/tr[%s]/td[%s]' % (index, inventory_tuple[1])">inventory value</td> <td tal:content="python: '//div[@data-gadget-scope=\'field_listbox\']//table/tbody/tr[1]/td[%s]' % (inventory_tuple[1])">inventory value</td>
<td tal:content="python: int(inventory_tuple[0])"></td> <td tal:content="python: int(inventory_tuple[0])"></td>
</tr> </tr>
</tal:block>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block> </tal:block>
<tal:block metal:define-macro="check_total_for_inventory">
<tr> <tr>
<td colspan="3"><b>Total for inventories</b></td> <td colspan="3"><b>Total for inventories</b></td>
</tr> </tr>
...@@ -57,8 +60,11 @@ ...@@ -57,8 +60,11 @@
<td>//div[@data-gadget-scope='field_listbox']//table/tfoot/tr[1]/td[5]</td> <td>//div[@data-gadget-scope='field_listbox']//table/tfoot/tr[1]/td[5]</td>
<td tal:content="python: int(future_inventory)"></td> <td tal:content="python: int(future_inventory)"></td>
</tr> </tr>
<tr> <tr>
<td colspan="3"><p></p></td> <td colspan="3"><p></p></td>
</tr> </tr>
</tal:block> </tal:block>
</tal:block> </tal:block>
\ No newline at end of file
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