Showing
6 changed files
with
103 additions
and
22 deletions
| @@ -1292,6 +1292,16 @@ Library openprocurement_client.utils | @@ -1292,6 +1292,16 @@ Library openprocurement_client.utils | ||
| 1292 | ${filename}= download_file_from_url ${document.url} ${OUTPUT_DIR}${/}${document.title} | 1292 | ${filename}= download_file_from_url ${document.url} ${OUTPUT_DIR}${/}${document.title} |
| 1293 | [return] ${filename} | 1293 | [return] ${filename} |
| 1294 | 1294 | ||
| 1295 | + | ||
| 1296 | +Отримати інформацію із cancellation | ||
| 1297 | + [Arguments] ${username} ${tender_uaid} ${field_name} ${cancellation_index} | ||
| 1298 | + openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid} | ||
| 1299 | + ${cancellations}= Get Variable Value ${USERS.users['${username}'].tender_data.data.cancellations[${cancellation_index}]} ${USERS.users['${username}'].tender_data.data.cancellations} | ||
| 1300 | + Log ${cancellations} | ||
| 1301 | + ${field_value}= Get Variable Value ${USERS.users['${username}'].tender_data.data.cancellations[${cancellation_index}]['${field_name}']} | ||
| 1302 | + Log ${field_value} | ||
| 1303 | + [Return] ${field_value} | ||
| 1304 | + | ||
| 1295 | ############################################################################## | 1305 | ############################################################################## |
| 1296 | # Bid operations | 1306 | # Bid operations |
| 1297 | ############################################################################## | 1307 | ############################################################################## |
| @@ -1604,7 +1614,7 @@ Library openprocurement_client.utils | @@ -1604,7 +1614,7 @@ Library openprocurement_client.utils | ||
| 1604 | 1614 | ||
| 1605 | Скасувати закупівлю | 1615 | Скасувати закупівлю |
| 1606 | [Documentation] | 1616 | [Documentation] |
| 1607 | - ... [Arguments] Username, tender uaid, cancellation reason, | 1617 | + ... [Arguments] Username, tender uaid, cancellation reason, cancellation reasonType |
| 1608 | ... document and new description of document | 1618 | ... document and new description of document |
| 1609 | ... [Description] Find tender using uaid, set cancellation reason, get data from cancel_tender | 1619 | ... [Description] Find tender using uaid, set cancellation reason, get data from cancel_tender |
| 1610 | ... and call create_cancellation | 1620 | ... and call create_cancellation |
| @@ -1612,22 +1622,33 @@ Library openprocurement_client.utils | @@ -1612,22 +1622,33 @@ Library openprocurement_client.utils | ||
| 1612 | ... [Return] Nothing | 1622 | ... [Return] Nothing |
| 1613 | [Arguments] ${username} ${tender_uaid} ${cancellation_reason} ${cancellation_reasonType} ${document} ${new_description} | 1623 | [Arguments] ${username} ${tender_uaid} ${cancellation_reason} ${cancellation_reasonType} ${document} ${new_description} |
| 1614 | ${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid} | 1624 | ${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid} |
| 1625 | + ${procurementMethodType}= set variable ${USERS.users['${tender_owner}'].initial_data.data.procurementMethodType} | ||
| 1626 | + Log ${procurementMethodType} | ||
| 1615 | ${data}= Create dictionary | 1627 | ${data}= Create dictionary |
| 1616 | ... reason=${cancellation_reason} | 1628 | ... reason=${cancellation_reason} |
| 1617 | ... reasonType=${cancellation_reasonType} | 1629 | ... reasonType=${cancellation_reasonType} |
| 1618 | ${cancellation_data}= Create dictionary data=${data} | 1630 | ${cancellation_data}= Create dictionary data=${data} |
| 1619 | ${cancellation_data}= munch_dict arg=${cancellation_data} | 1631 | ${cancellation_data}= munch_dict arg=${cancellation_data} |
| 1632 | + Log ${cancellation_data} | ||
| 1620 | ${cancel_reply}= Call Method ${USERS.users['${username}'].client} create_cancellation | 1633 | ${cancel_reply}= Call Method ${USERS.users['${username}'].client} create_cancellation |
| 1621 | ... ${tender.data.id} | 1634 | ... ${tender.data.id} |
| 1622 | ... ${cancellation_data} | 1635 | ... ${cancellation_data} |
| 1623 | ... access_token=${tender.access.token} | 1636 | ... access_token=${tender.access.token} |
| 1624 | ${cancellation_id}= Set variable ${cancel_reply.data.id} | 1637 | ${cancellation_id}= Set variable ${cancel_reply.data.id} |
| 1625 | - | ||
| 1626 | - ${document_id}= openprocurement_client.Завантажити документацію до запиту на скасування ${username} ${tender_uaid} ${cancellation_id} ${document} | ||
| 1627 | - | ||
| 1628 | - openprocurement_client.Змінити опис документа в скасуванні ${username} ${tender_uaid} ${cancellation_id} ${document_id} ${new_description} | ||
| 1629 | - | ||
| 1630 | - openprocurement_client.Підтвердити скасування закупівлі ${username} ${tender_uaid} ${cancellation_id} | 1638 | + ${document_id}= openprocurement_client.Завантажити документацію до запиту на скасування |
| 1639 | + ... ${username} | ||
| 1640 | + ... ${tender_uaid} | ||
| 1641 | + ... ${cancellation_id} | ||
| 1642 | + ... ${document} | ||
| 1643 | + openprocurement_client.Змінити опис документа в скасуванні | ||
| 1644 | + ... ${username} | ||
| 1645 | + ... ${tender_uaid} | ||
| 1646 | + ... ${cancellation_id} | ||
| 1647 | + ... ${document_id} | ||
| 1648 | + ... ${new_description} | ||
| 1649 | + run keyword if '${procurementMethodType}' in ['belowThreshold', 'reporting', 'closeFrameworkAgreementUA'] | ||
| 1650 | + ... openprocurement_client.Підтвердити скасування закупівлі ${username} ${tender_uaid} ${cancellation_id} | ||
| 1651 | + ... ELSE openprocurement_client.Перевести скасування закупівлі в період очікування ${username} ${tender_uaid} ${cancellation_id} | ||
| 1631 | 1652 | ||
| 1632 | 1653 | ||
| 1633 | Завантажити документацію до запиту на скасування | 1654 | Завантажити документацію до запиту на скасування |
| @@ -1683,6 +1704,23 @@ Library openprocurement_client.utils | @@ -1683,6 +1704,23 @@ Library openprocurement_client.utils | ||
| 1683 | Log ${reply} | 1704 | Log ${reply} |
| 1684 | 1705 | ||
| 1685 | 1706 | ||
| 1707 | +Перевести скасування закупівлі в період очікування | ||
| 1708 | + [Documentation] | ||
| 1709 | + ... [Arguments] Username, tender uaid, cancellation number | ||
| 1710 | + ... Find tender using uaid, get cancellation test_confirmation data and call patch_cancellation | ||
| 1711 | + ... [Return] Nothing | ||
| 1712 | + [Arguments] ${username} ${tender_uaid} ${cancel_id} | ||
| 1713 | + ${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid} | ||
| 1714 | + ${data}= test_cancel_pending_data ${cancel_id} | ||
| 1715 | + Log ${data} | ||
| 1716 | + ${reply}= Call Method ${USERS.users['${username}'].client} patch_cancellation | ||
| 1717 | + ... ${tender.data.id} | ||
| 1718 | + ... ${data} | ||
| 1719 | + ... ${data.data.id} | ||
| 1720 | + ... access_token=${tender.access.token} | ||
| 1721 | + Log ${reply} | ||
| 1722 | + | ||
| 1723 | + | ||
| 1686 | Отримати інформацію із документа до скасування | 1724 | Отримати інформацію із документа до скасування |
| 1687 | [Arguments] ${username} ${tender_uaid} ${cancel_id} ${doc_id} ${field_name} | 1725 | [Arguments] ${username} ${tender_uaid} ${cancel_id} ${doc_id} ${field_name} |
| 1688 | ${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid} | 1726 | ${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid} |
| @@ -103,23 +103,22 @@ ${PLAN_TENDER} ${True} | @@ -103,23 +103,22 @@ ${PLAN_TENDER} ${True} | ||
| 103 | Можливість скасувати тендер | 103 | Можливість скасувати тендер |
| 104 | 104 | ||
| 105 | 105 | ||
| 106 | -Відображення активного статусу скасування тендера | ||
| 107 | - [Tags] ${USERS.users['${viewer}'].broker}: Відображення скасування тендера | ||
| 108 | - ... viewer | ||
| 109 | - ... ${USERS.users['${viewer}'].broker} | ||
| 110 | - ... tender_cancellation | ||
| 111 | - [Setup] Дочекатись синхронізації з майданчиком ${viewer} | ||
| 112 | - ${cancellation_index}= Отримати останній індекс cancellations ${tender_owner} ${viewer} | ||
| 113 | - Звірити поле тендера із значенням ${viewer} ${TENDER['TENDER_UAID']} | ||
| 114 | - ... active | ||
| 115 | - ... cancellations[${cancellation_index}].status | 106 | +Дочекатися закічення complait періоду |
| 107 | + [Tags] ${USERS.users['${tender_owner}'].broker}: Скасування тендера | ||
| 108 | + ... tender_owner | ||
| 109 | + ... ${USERS.users['${tender_owner}'].broker} | ||
| 110 | + ... tender_cancellation_stand_still | ||
| 111 | + ... critical | ||
| 112 | + Log ${TENDER['TENDER_UAID']} | ||
| 113 | + ${cancellation_index}= Отримати останній індекс cancellations ${tender_owner} | ||
| 114 | + Дочекатись зміни статусу cancellations ${tender_owner} ${TENDER['TENDER_UAID']} active ${cancellation_index} | ||
| 116 | 115 | ||
| 117 | 116 | ||
| 118 | Відображення причини скасування тендера | 117 | Відображення причини скасування тендера |
| 119 | [Tags] ${USERS.users['${viewer}'].broker}: Відображення скасування тендера | 118 | [Tags] ${USERS.users['${viewer}'].broker}: Відображення скасування тендера |
| 120 | ... viewer | 119 | ... viewer |
| 121 | ... ${USERS.users['${viewer}'].broker} | 120 | ... ${USERS.users['${viewer}'].broker} |
| 122 | - ... tender_cancellation | 121 | + ... tender_cancellation_view |
| 123 | ${cancellation_index}= Отримати останній індекс cancellations ${tender_owner} ${viewer} | 122 | ${cancellation_index}= Отримати останній індекс cancellations ${tender_owner} ${viewer} |
| 124 | Звірити поле тендера із значенням ${viewer} ${TENDER['TENDER_UAID']} | 123 | Звірити поле тендера із значенням ${viewer} ${TENDER['TENDER_UAID']} |
| 125 | ... ${USERS.users['${tender_owner}']['tender_cancellation_data']['cancellation_reason']} | 124 | ... ${USERS.users['${tender_owner}']['tender_cancellation_data']['cancellation_reason']} |
| @@ -130,7 +129,7 @@ ${PLAN_TENDER} ${True} | @@ -130,7 +129,7 @@ ${PLAN_TENDER} ${True} | ||
| 130 | [Tags] ${USERS.users['${viewer}'].broker}: Відображення скасування тендера | 129 | [Tags] ${USERS.users['${viewer}'].broker}: Відображення скасування тендера |
| 131 | ... viewer | 130 | ... viewer |
| 132 | ... ${USERS.users['${viewer}'].broker} | 131 | ... ${USERS.users['${viewer}'].broker} |
| 133 | - ... tender_cancellation | 132 | + ... tender_cancellation_view |
| 134 | Звірити відображення поля description документа ${USERS.users['${tender_owner}']['tender_cancellation_data']['document']['doc_id']} до скасування ${USERS.users['${tender_owner}']['tender_cancellation_data']['cancellation_id']} із ${USERS.users['${tender_owner}']['tender_cancellation_data']['description']} для користувача ${viewer} | 133 | Звірити відображення поля description документа ${USERS.users['${tender_owner}']['tender_cancellation_data']['document']['doc_id']} до скасування ${USERS.users['${tender_owner}']['tender_cancellation_data']['cancellation_id']} із ${USERS.users['${tender_owner}']['tender_cancellation_data']['description']} для користувача ${viewer} |
| 135 | 134 | ||
| 136 | 135 | ||
| @@ -138,7 +137,7 @@ ${PLAN_TENDER} ${True} | @@ -138,7 +137,7 @@ ${PLAN_TENDER} ${True} | ||
| 138 | [Tags] ${USERS.users['${viewer}'].broker}: Відображення скасування тендера | 137 | [Tags] ${USERS.users['${viewer}'].broker}: Відображення скасування тендера |
| 139 | ... viewer | 138 | ... viewer |
| 140 | ... ${USERS.users['${viewer}'].broker} | 139 | ... ${USERS.users['${viewer}'].broker} |
| 141 | - ... tender_cancellation | 140 | + ... tender_cancellation_view |
| 142 | Звірити відображення поля title документа ${USERS.users['${tender_owner}']['tender_cancellation_data']['document']['doc_id']} до скасування ${USERS.users['${tender_owner}']['tender_cancellation_data']['cancellation_id']} із ${USERS.users['${tender_owner}']['tender_cancellation_data']['document']['doc_name']} для користувача ${viewer} | 141 | Звірити відображення поля title документа ${USERS.users['${tender_owner}']['tender_cancellation_data']['document']['doc_id']} до скасування ${USERS.users['${tender_owner}']['tender_cancellation_data']['cancellation_id']} із ${USERS.users['${tender_owner}']['tender_cancellation_data']['document']['doc_name']} для користувача ${viewer} |
| 143 | 142 | ||
| 144 | 143 | ||
| @@ -146,9 +145,21 @@ ${PLAN_TENDER} ${True} | @@ -146,9 +145,21 @@ ${PLAN_TENDER} ${True} | ||
| 146 | [Tags] ${USERS.users['${viewer}'].broker}: Відображення скасування тендера | 145 | [Tags] ${USERS.users['${viewer}'].broker}: Відображення скасування тендера |
| 147 | ... viewer | 146 | ... viewer |
| 148 | ... ${USERS.users['${viewer}'].broker} | 147 | ... ${USERS.users['${viewer}'].broker} |
| 149 | - ... tender_cancellation | 148 | + ... tender_cancellation_view |
| 150 | Звірити відображення вмісту документа ${USERS.users['${tender_owner}']['tender_cancellation_data']['document']['doc_id']} до скасування ${USERS.users['${tender_owner}']['tender_cancellation_data']['cancellation_id']} з ${USERS.users['${tender_owner}']['tender_cancellation_data']['document']['doc_content']} для користувача ${viewer} | 149 | Звірити відображення вмісту документа ${USERS.users['${tender_owner}']['tender_cancellation_data']['document']['doc_id']} до скасування ${USERS.users['${tender_owner}']['tender_cancellation_data']['cancellation_id']} з ${USERS.users['${tender_owner}']['tender_cancellation_data']['document']['doc_content']} для користувача ${viewer} |
| 151 | 150 | ||
| 151 | + | ||
| 152 | +Відображення активного статусу скасування тендера | ||
| 153 | + [Tags] ${USERS.users['${viewer}'].broker}: Відображення скасування тендера | ||
| 154 | + ... viewer | ||
| 155 | + ... ${USERS.users['${viewer}'].broker} | ||
| 156 | + ... tender_cancellation_view | ||
| 157 | + [Setup] Дочекатись синхронізації з майданчиком ${viewer} | ||
| 158 | + ${cancellation_index}= Отримати останній індекс cancellations ${tender_owner} ${viewer} | ||
| 159 | + Звірити поле тендера із значенням ${viewer} ${TENDER['TENDER_UAID']} | ||
| 160 | + ... active | ||
| 161 | + ... cancellations[${cancellation_index}].status | ||
| 162 | + | ||
| 152 | ############################################################################################## | 163 | ############################################################################################## |
| 153 | # DELETING LOT | 164 | # DELETING LOT |
| 154 | ############################################################################################## | 165 | ############################################################################################## |
| @@ -475,6 +475,15 @@ def test_confirm_data(id): | @@ -475,6 +475,15 @@ def test_confirm_data(id): | ||
| 475 | }) | 475 | }) |
| 476 | 476 | ||
| 477 | 477 | ||
| 478 | +def test_cancel_pending_data(id): | ||
| 479 | + return munchify({ | ||
| 480 | + "data": { | ||
| 481 | + "status": "pending", | ||
| 482 | + "id": id | ||
| 483 | + } | ||
| 484 | + }) | ||
| 485 | + | ||
| 486 | + | ||
| 478 | def test_submit_claim_data(claim_id): | 487 | def test_submit_claim_data(claim_id): |
| 479 | return munchify({ | 488 | return munchify({ |
| 480 | "data": { | 489 | "data": { |
| @@ -1010,6 +1010,12 @@ Require Failure | @@ -1010,6 +1010,12 @@ Require Failure | ||
| 1010 | Порівняти об'єкти ${left} ${right} | 1010 | Порівняти об'єкти ${left} ${right} |
| 1011 | 1011 | ||
| 1012 | 1012 | ||
| 1013 | +Звірити статус cancellations | ||
| 1014 | + [Arguments] ${username} ${tender_uaid} ${left} ${cancellation_index} | ||
| 1015 | + ${right}= Run as ${username} Отримати інформацію із cancellation ${tender_uaid} status ${cancellation_index} | ||
| 1016 | + Порівняти об'єкти ${left} ${right} | ||
| 1017 | + | ||
| 1018 | + | ||
| 1013 | Дочекатись дати початку періоду уточнення | 1019 | Дочекатись дати початку періоду уточнення |
| 1014 | [Arguments] ${username} ${tender_uaid} | 1020 | [Arguments] ${username} ${tender_uaid} |
| 1015 | Оновити LAST_MODIFICATION_DATE | 1021 | Оновити LAST_MODIFICATION_DATE |
| @@ -1218,6 +1224,19 @@ Require Failure | @@ -1218,6 +1224,19 @@ Require Failure | ||
| 1218 | ... ${award_index} | 1224 | ... ${award_index} |
| 1219 | 1225 | ||
| 1220 | 1226 | ||
| 1227 | +Дочекатись зміни статусу cancellations | ||
| 1228 | + [Arguments] ${username} ${tender_uaid} ${status} ${cancellation_index} | ||
| 1229 | + Дочекатись синхронізації з майданчиком ${username} | ||
| 1230 | + Wait until keyword succeeds | ||
| 1231 | + ... 12 min | ||
| 1232 | + ... 60 sec | ||
| 1233 | + ... Звірити статус cancellations | ||
| 1234 | + ... ${username} | ||
| 1235 | + ... ${tender_uaid} | ||
| 1236 | + ... ${status} | ||
| 1237 | + ... ${cancellation_index} | ||
| 1238 | + | ||
| 1239 | + | ||
| 1221 | Оновити LAST_MODIFICATION_DATE | 1240 | Оновити LAST_MODIFICATION_DATE |
| 1222 | [Documentation] | 1241 | [Documentation] |
| 1223 | ... Variable ``${TEST_STATUS}`` is only available in test case teardown. | 1242 | ... Variable ``${TEST_STATUS}`` is only available in test case teardown. |
| @@ -81,7 +81,8 @@ from .initial_data import ( | @@ -81,7 +81,8 @@ from .initial_data import ( | ||
| 81 | invalid_buyers_data, | 81 | invalid_buyers_data, |
| 82 | test_plan_cancel_data, | 82 | test_plan_cancel_data, |
| 83 | test_confirm_plan_cancel_data, | 83 | test_confirm_plan_cancel_data, |
| 84 | - test_cancellation_data | 84 | + test_cancellation_data, |
| 85 | + test_cancel_pending_data | ||
| 85 | ) | 86 | ) |
| 86 | from barbecue import chef | 87 | from barbecue import chef |
| 87 | from restkit import request | 88 | from restkit import request |
| @@ -9,6 +9,9 @@ | @@ -9,6 +9,9 @@ | ||
| 9 | 9 | ||
| 10 | -i create_tender | 10 | -i create_tender |
| 11 | -i find_tender | 11 | -i find_tender |
| 12 | +-i lot_cancellation | ||
| 12 | -i tender_cancellation | 13 | -i tender_cancellation |
| 14 | +-i tender_cancellation_stand_still | ||
| 15 | +-i tender_cancellation_view | ||
| 13 | -i lot_cancellation | 16 | -i lot_cancellation |
| 14 | -i delete_lot | 17 | -i delete_lot |
Please
register
or
login
to post a comment