Commit 61666928e527f3efe7c91c30af1ac513353fddc6
Committed by
GitHub
Merge pull request #238 from ProzorroUKR/reasonType
update cancelation testing
Showing
6 changed files
with
103 additions
and
22 deletions
| ... | ... | @@ -1292,6 +1292,16 @@ Library openprocurement_client.utils |
| 1292 | 1292 | ${filename}= download_file_from_url ${document.url} ${OUTPUT_DIR}${/}${document.title} |
| 1293 | 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 | 1306 | # Bid operations |
| 1297 | 1307 | ############################################################################## |
| ... | ... | @@ -1604,7 +1614,7 @@ Library openprocurement_client.utils |
| 1604 | 1614 | |
| 1605 | 1615 | Скасувати закупівлю |
| 1606 | 1616 | [Documentation] |
| 1607 | - ... [Arguments] Username, tender uaid, cancellation reason, | |
| 1617 | + ... [Arguments] Username, tender uaid, cancellation reason, cancellation reasonType | |
| 1608 | 1618 | ... document and new description of document |
| 1609 | 1619 | ... [Description] Find tender using uaid, set cancellation reason, get data from cancel_tender |
| 1610 | 1620 | ... and call create_cancellation |
| ... | ... | @@ -1612,22 +1622,33 @@ Library openprocurement_client.utils |
| 1612 | 1622 | ... [Return] Nothing |
| 1613 | 1623 | [Arguments] ${username} ${tender_uaid} ${cancellation_reason} ${cancellation_reasonType} ${document} ${new_description} |
| 1614 | 1624 | ${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid} |
| 1625 | + ${procurementMethodType}= set variable ${USERS.users['${tender_owner}'].initial_data.data.procurementMethodType} | |
| 1626 | + Log ${procurementMethodType} | |
| 1615 | 1627 | ${data}= Create dictionary |
| 1616 | 1628 | ... reason=${cancellation_reason} |
| 1617 | 1629 | ... reasonType=${cancellation_reasonType} |
| 1618 | 1630 | ${cancellation_data}= Create dictionary data=${data} |
| 1619 | 1631 | ${cancellation_data}= munch_dict arg=${cancellation_data} |
| 1632 | + Log ${cancellation_data} | |
| 1620 | 1633 | ${cancel_reply}= Call Method ${USERS.users['${username}'].client} create_cancellation |
| 1621 | 1634 | ... ${tender.data.id} |
| 1622 | 1635 | ... ${cancellation_data} |
| 1623 | 1636 | ... access_token=${tender.access.token} |
| 1624 | 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 | 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 | 1725 | [Arguments] ${username} ${tender_uaid} ${cancel_id} ${doc_id} ${field_name} |
| 1688 | 1726 | ${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid} | ... | ... |
| ... | ... | @@ -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 | 118 | [Tags] ${USERS.users['${viewer}'].broker}: Відображення скасування тендера |
| 120 | 119 | ... viewer |
| 121 | 120 | ... ${USERS.users['${viewer}'].broker} |
| 122 | - ... tender_cancellation | |
| 121 | + ... tender_cancellation_view | |
| 123 | 122 | ${cancellation_index}= Отримати останній індекс cancellations ${tender_owner} ${viewer} |
| 124 | 123 | Звірити поле тендера із значенням ${viewer} ${TENDER['TENDER_UAID']} |
| 125 | 124 | ... ${USERS.users['${tender_owner}']['tender_cancellation_data']['cancellation_reason']} |
| ... | ... | @@ -130,7 +129,7 @@ ${PLAN_TENDER} ${True} |
| 130 | 129 | [Tags] ${USERS.users['${viewer}'].broker}: Відображення скасування тендера |
| 131 | 130 | ... viewer |
| 132 | 131 | ... ${USERS.users['${viewer}'].broker} |
| 133 | - ... tender_cancellation | |
| 132 | + ... tender_cancellation_view | |
| 134 | 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 | 137 | [Tags] ${USERS.users['${viewer}'].broker}: Відображення скасування тендера |
| 139 | 138 | ... viewer |
| 140 | 139 | ... ${USERS.users['${viewer}'].broker} |
| 141 | - ... tender_cancellation | |
| 140 | + ... tender_cancellation_view | |
| 142 | 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 | 145 | [Tags] ${USERS.users['${viewer}'].broker}: Відображення скасування тендера |
| 147 | 146 | ... viewer |
| 148 | 147 | ... ${USERS.users['${viewer}'].broker} |
| 149 | - ... tender_cancellation | |
| 148 | + ... tender_cancellation_view | |
| 150 | 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 | 164 | # DELETING LOT |
| 154 | 165 | ############################################################################################## | ... | ... |
| ... | ... | @@ -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 | 487 | def test_submit_claim_data(claim_id): |
| 479 | 488 | return munchify({ |
| 480 | 489 | "data": { | ... | ... |
| ... | ... | @@ -1010,6 +1010,12 @@ Require Failure |
| 1010 | 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 | 1020 | [Arguments] ${username} ${tender_uaid} |
| 1015 | 1021 | Оновити LAST_MODIFICATION_DATE |
| ... | ... | @@ -1218,6 +1224,19 @@ Require Failure |
| 1218 | 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 | 1240 | Оновити LAST_MODIFICATION_DATE |
| 1222 | 1241 | [Documentation] |
| 1223 | 1242 | ... Variable ``${TEST_STATUS}`` is only available in test case teardown. | ... | ... |
| ... | ... | @@ -81,7 +81,8 @@ from .initial_data import ( |
| 81 | 81 | invalid_buyers_data, |
| 82 | 82 | test_plan_cancel_data, |
| 83 | 83 | test_confirm_plan_cancel_data, |
| 84 | - test_cancellation_data | |
| 84 | + test_cancellation_data, | |
| 85 | + test_cancel_pending_data | |
| 85 | 86 | ) |
| 86 | 87 | from barbecue import chef |
| 87 | 88 | from restkit import request | ... | ... |
Please
register
or
login
to post a comment