Commit 93cf3ad880e3f52af680a112bad52d6604092bbd
1 parent
28832b9c
Added test suite for limited procurement procedure
Showing
4 changed files
with
330 additions
and
1 deletions
@@ -425,3 +425,105 @@ Library openprocurement_client_helper.py | @@ -425,3 +425,105 @@ Library openprocurement_client_helper.py | ||
425 | ${tender_lot}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} delete_lot ${tender} ${ARGUMENTS[2]} | 425 | ${tender_lot}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} delete_lot ${tender} ${ARGUMENTS[2]} |
426 | Log ${tender_lot} | 426 | Log ${tender_lot} |
427 | [return] ${tender_lot} | 427 | [return] ${tender_lot} |
428 | + | ||
429 | + | ||
430 | +Додати постачальника | ||
431 | + [Arguments] ${username} ${tenderUAID} | ||
432 | + log ${username} | ||
433 | + log ${tenderUAID} | ||
434 | + ${supplier_data}= test supplier data | ||
435 | + log ${supplier_data} | ||
436 | + ${tenderID}= openprocurement_client.Отримати internal id по UAid ${username} ${tenderUAID} | ||
437 | + ${tender}= Call Method ${USERS.users['${username}'].client} get_tender ${tenderID} | ||
438 | + ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token} | ||
439 | + ${reply}= Call Method ${USERS.users['${username}'].client} create_award ${tender} ${supplier_data} | ||
440 | + [return] ${reply} | ||
441 | + | ||
442 | + | ||
443 | +Підтвердити постачальника | ||
444 | + [Arguments] ${username} ${tenderUAID} | ||
445 | + log ${username} | ||
446 | + log ${tenderUAID} | ||
447 | + ${tenderID}= openprocurement_client.Отримати internal id по UAid ${username} ${tenderUAID} | ||
448 | + ${tender}= Call Method ${USERS.users['${username}'].client} get_tender ${tenderID} | ||
449 | + ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token} | ||
450 | + log ${tender} | ||
451 | + ${award_data}= Confirm supplier ${tender['data']['awards'][0]['id']} | ||
452 | + log ${award_data} | ||
453 | + ${reply}= Call Method ${USERS.users['${username}'].client} patch_award ${tender} ${award_data} | ||
454 | + [return] ${reply} | ||
455 | + | ||
456 | + | ||
457 | +Додати запит на скасування | ||
458 | + [Arguments] ${username} ${tenderUAID} | ||
459 | + ${tenderID}= openprocurement_client.Отримати internal id по UAid ${username} ${tenderUAID} | ||
460 | + ${tender}= Call Method ${USERS.users['${username}'].client} get_tender ${tenderID} | ||
461 | + ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token} | ||
462 | + ${cancel_data}= Cancel tender prost :)) | ||
463 | + log ${cancel_data} | ||
464 | + ${reply}= Call Method ${USERS.users['${username}'].client} create_cancellation ${tender} ${cancel_data} | ||
465 | + [return] ${reply} | ||
466 | + | ||
467 | + | ||
468 | +Завантажити документацію до запиту на скасування | ||
469 | + [Arguments] ${username} ${path} ${tenderid} | ||
470 | + log ${username} | ||
471 | + log ${path} | ||
472 | + log ${tenderid} | ||
473 | + ${internalid}= Отримати internal id по UAid ${username} ${tenderid} | ||
474 | + ${tender}= Call Method ${USERS.users['${username}'].client} get_tender ${internalid} | ||
475 | + ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token} | ||
476 | + ${response}= Call Method ${USERS.users['${username}'].client} upload_cancellation_document ${path} ${tender} ${tender['data']['cancellations'][0]['id']} | ||
477 | + log ${response} | ||
478 | + ${uploaded_file} = Create Dictionary filepath ${path} upload_response ${response} | ||
479 | + [return] ${uploaded_file} | ||
480 | + | ||
481 | + | ||
482 | +Змінити опис документа в скасуванні | ||
483 | + [Arguments] ${username} ${tenderUAID} | ||
484 | + Log ${username} | ||
485 | + Log ${tenderUAID} | ||
486 | + ${tenderID}= openprocurement_client.Отримати internal id по UAid ${username} ${tenderUAID} | ||
487 | + ${tender}= Call Method ${USERS.users['${username}'].client} get_tender ${tenderID} | ||
488 | + ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token} | ||
489 | + ${data}= change_cancellation_document_field description test_description | ||
490 | + log ${data} | ||
491 | + ${reply}= Call Method ${USERS.users['${username}'].client} patch_cancellation_document ${tender} ${data} | ||
492 | + [return] ${reply} | ||
493 | + | ||
494 | + | ||
495 | +Завантажити нову версію документа до запиту на скасування | ||
496 | + [Arguments] ${username} ${path} | ||
497 | + ${internalid}= Отримати internal id по UAid ${username} ${TENDER['TENDER_UAID']} | ||
498 | + ${tender}= Call Method ${USERS.users['${username}'].client} get_tender ${internalid} | ||
499 | + ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token} | ||
500 | + ${response}= Call Method ${USERS.users['${username}'].client} update_cancellation_document ${path} ${tender} ${tender['data']['cancellations'][0]['id']} ${tender['data']['cancellations'][0]['documents'][0]['id']} | ||
501 | + ${uploaded_file} = Create Dictionary filepath ${path} upload_response ${response} | ||
502 | + Log ${uploaded_file} | ||
503 | + [return] ${uploaded_file} | ||
504 | + | ||
505 | + | ||
506 | +Підтвердити скасування закупівлі | ||
507 | + [Arguments] ${username} ${tenderUAID} | ||
508 | + log ${username} | ||
509 | + log ${tenderUAID} | ||
510 | + ${tenderID}= openprocurement_client.Отримати internal id по UAid ${username} ${tenderUAID} | ||
511 | + ${tender}= Call Method ${USERS.users['${username}'].client} get_tender ${tenderID} | ||
512 | + ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token} | ||
513 | + ${data}= Confirm cancellation ${tender['data']['cancellations'][0]['id']} | ||
514 | + log ${data} | ||
515 | + ${reply}= Call Method ${USERS.users['${username}'].client} patch_cancellation ${tender} ${data} | ||
516 | + [return] ${reply} | ||
517 | + | ||
518 | + | ||
519 | +Підтвердити підписання контракту | ||
520 | + [Arguments] ${username} ${tenderUAID} | ||
521 | + log ${username} | ||
522 | + log ${tenderUAID} | ||
523 | + ${tenderID}= openprocurement_client.Отримати internal id по UAid ${username} ${tenderUAID} | ||
524 | + ${tender}= Call Method ${USERS.users['${username}'].client} get_tender ${tenderID} | ||
525 | + ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token} | ||
526 | + ${data}= confirm contract ${tender['data']['contracts'][0]['id']} | ||
527 | + log ${data} | ||
528 | + ${reply}= Call Method ${USERS.users['${username}'].client} patch_contract ${tender} ${data} | ||
529 | + [return] ${reply} |
@@ -112,6 +112,58 @@ def test_tender_data(intervals): | @@ -112,6 +112,58 @@ def test_tender_data(intervals): | ||
112 | return t_data | 112 | return t_data |
113 | 113 | ||
114 | 114 | ||
115 | +def test_tender_data_limited(intervals): | ||
116 | + return { | ||
117 | + "items": [ | ||
118 | + { | ||
119 | + "additionalClassifications": [ | ||
120 | + { | ||
121 | + "description": u"Послуги шкільних їдалень", | ||
122 | + "id": "55.51.10.300", | ||
123 | + "scheme": u"ДКПП" | ||
124 | + } | ||
125 | + ], | ||
126 | + "classification": { | ||
127 | + "description": u"Послуги з харчування у школах", | ||
128 | + "id": "55523100-3", | ||
129 | + "scheme": "CPV" | ||
130 | + }, | ||
131 | + "description": u"Послуги шкільних їдалень", | ||
132 | + "id": "2dc54675d6364e2baffbc0f8e74432ac" | ||
133 | + } | ||
134 | + ], | ||
135 | + "owner": "test.quintagroup.com", | ||
136 | + "procurementMethod": "limited", | ||
137 | + "procurementMethodType": "reporting", | ||
138 | + "procuringEntity": { | ||
139 | + "address": { | ||
140 | + "countryName": u"Україна", | ||
141 | + "locality": u"м. Вінниця", | ||
142 | + "postalCode": "21027", | ||
143 | + "region": u"м. Вінниця", | ||
144 | + "streetAddress": u"вул. Стахурського. 22" | ||
145 | + }, | ||
146 | + "contactPoint": { | ||
147 | + "name": u"Куца Світлана Валентинівна", | ||
148 | + "telephone": "+380 (432) 46-53-02", | ||
149 | + "url": "http://sch10.edu.vn.ua/" | ||
150 | + }, | ||
151 | + "identifier": { | ||
152 | + "id": "21725150", | ||
153 | + "legalName": u"Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\"", | ||
154 | + "scheme": u"UA-EDR" | ||
155 | + }, | ||
156 | + "name": u"ЗОСШ #10 м.Вінниці" | ||
157 | + }, | ||
158 | + "value": { | ||
159 | + "amount": 500000, | ||
160 | + "currency": "UAH", | ||
161 | + "valueAddedTaxIncluded": True | ||
162 | + }, | ||
163 | + "title": u"Послуги шкільних їдалень", | ||
164 | + } | ||
165 | + | ||
166 | + | ||
115 | def test_tender_data_multiple_items(intervals): | 167 | def test_tender_data_multiple_items(intervals): |
116 | now = get_now() | 168 | now = get_now() |
117 | t_data = test_tender_data(intervals) | 169 | t_data = test_tender_data(intervals) |
@@ -566,6 +618,41 @@ def auction_bid(): | @@ -566,6 +618,41 @@ def auction_bid(): | ||
566 | }) | 618 | }) |
567 | 619 | ||
568 | 620 | ||
621 | +def test_supplier_data(): | ||
622 | + return { | ||
623 | + "data": { | ||
624 | + "suppliers": [ | ||
625 | + { | ||
626 | + "address": { | ||
627 | + "countryName": u"Україна", | ||
628 | + "locality": u"м. Вінниця", | ||
629 | + "postalCode": "21100", | ||
630 | + "region": u"м. Вінниця", | ||
631 | + "streetAddress": u"вул. Островського, 33" | ||
632 | + }, | ||
633 | + "contactPoint": { | ||
634 | + "email": "soleksuk@gmail.com", | ||
635 | + "name": u"Сергій Олексюк", | ||
636 | + "telephone": "+380 (432) 21-69-30" | ||
637 | + }, | ||
638 | + "identifier": { | ||
639 | + "id": "13313462", | ||
640 | + "legalName": u"Державне комунальне підприємство громадського харчування «Школяр»", | ||
641 | + "scheme": "UA-EDR", | ||
642 | + "uri": "http://sch10.edu.vn.ua/" | ||
643 | + }, | ||
644 | + "name": u"ДКП «Школяр»" | ||
645 | + } | ||
646 | + ], | ||
647 | + "value": { | ||
648 | + "amount": 475000, | ||
649 | + "currency": "UAH", | ||
650 | + "valueAddedTaxIncluded": True | ||
651 | + } | ||
652 | + } | ||
653 | + } | ||
654 | + | ||
655 | + | ||
569 | def test_award_data(): | 656 | def test_award_data(): |
570 | return munchify({'data': {}}) | 657 | return munchify({'data': {}}) |
571 | 658 |
op_robot_tests/tests_files/limited.robot
0 → 100644
1 | +*** Settings *** | ||
2 | +Library op_robot_tests.tests_files.service_keywords | ||
3 | +Library String | ||
4 | +Library Collections | ||
5 | +Library Selenium2Library | ||
6 | +Library DebugLibrary | ||
7 | +Resource keywords.robot | ||
8 | +Resource resource.robot | ||
9 | +Suite Setup TestSuiteSetup | ||
10 | +Suite Teardown Close all browsers | ||
11 | + | ||
12 | + | ||
13 | +*** Variables *** | ||
14 | +${mode} limited | ||
15 | +${role} viewer | ||
16 | +${broker} Quinta | ||
17 | + | ||
18 | + | ||
19 | +*** Test Cases *** | ||
20 | +Можливість створити пряму закупівлю | ||
21 | + [Tags] ${USERS.users['${tender_owner}'].broker}: Можливість створити тендер | ||
22 | + ${tender_data}= Підготовка початкових даних | ||
23 | + ${TENDER_UAID}= Викликати для учасника ${tender_owner} Створити тендер ${tender_data} | ||
24 | + ${LAST_MODIFICATION_DATE}= Get Current TZdate | ||
25 | + Set To Dictionary ${USERS.users['${tender_owner}']} initial_data ${tender_data} | ||
26 | + Set To Dictionary ${TENDER} TENDER_UAID ${TENDER_UAID} | ||
27 | + Set To Dictionary ${TENDER} LAST_MODIFICATION_DATE ${LAST_MODIFICATION_DATE} | ||
28 | + log ${TENDER} | ||
29 | + log ${tender_data} | ||
30 | + | ||
31 | + | ||
32 | +Пошук прямої закупівлі по ідентифікатору | ||
33 | + [Tags] ${USERS.users['${viewer}'].broker}: Пошук тендера по ідентифікатору | ||
34 | + Дочекатись синхронізації з майданчиком ${viewer} | ||
35 | + Викликати для учасника ${viewer} Пошук тендера по ідентифікатору ${TENDER['TENDER_UAID']} | ||
36 | + Log ${TENDER['TENDER_UAID']} | ||
37 | + | ||
38 | + | ||
39 | +Можливість додати документацію до прямої закупівлі | ||
40 | + [Tags] ${USERS.users['${tender_owner}'].broker}: Можливість завантажити документацію | ||
41 | + [Documentation] Закупівельник ${USERS.users['${tender_owner}'].broker} завантажує документацію до оголошеної закупівлі | ||
42 | + ${filepath}= create_fake_doc | ||
43 | + ${doc_upload_reply}= Викликати для учасника ${tender_owner} Завантажити документ ${filepath} ${TENDER['TENDER_UAID']} | ||
44 | + ${file_upload_process_data}= Create Dictionary filepath=${filepath} doc_upload_reply=${doc_upload_reply} | ||
45 | + log ${file_upload_process_data} | ||
46 | + Set To Dictionary ${USERS.users['${tender_owner}']} file_upload_process_data ${file_upload_process_data} | ||
47 | + Log ${USERS.users['${tender_owner}']} | ||
48 | + | ||
49 | + | ||
50 | +Можливість зареєструвати і підтвердити постачальника | ||
51 | + ${award_response}= Викликати для учасника ${tender_owner} Додати постачальника ${TENDER['TENDER_UAID']} | ||
52 | + Log ${award_response} | ||
53 | + ${award_confirmation_response}= Викликати для учасника ${tender_owner} Підтвердити постачальника ${TENDER['TENDER_UAID']} | ||
54 | + log ${award_confirmation_response} | ||
55 | + | ||
56 | + | ||
57 | +Можливість укласти угоду | ||
58 | + ${contract_confirmation_response}= Викликати для учасника ${tender_owner} Підтвердити підписання контракту shouldfail ${TENDER['TENDER_UAID']} | ||
59 | + log ${contract_confirmation_response} | ||
60 | + | ||
61 | + | ||
62 | +Можливість сформувати запит на скасування | ||
63 | + ${cancellation_response}= Викликати для учасника ${tender_owner} Додати запит на скасування ${TENDER['TENDER_UAID']} | ||
64 | + log ${cancellation_response} | ||
65 | + Set To Dictionary ${USERS.users['${tender_owner}']} cancellation_response_field ${cancellation_response} | ||
66 | + log ${USERS.users['${tender_owner}']['cancellation_response_field']} | ||
67 | + | ||
68 | + | ||
69 | +Можливість додати документацію до запиту на скасування | ||
70 | + ${filepath}= create_fake_doc | ||
71 | + ${doc_upload_reply}= Викликати для учасника ${tender_owner} Завантажити документацію до запиту на скасування ${filepath} ${TENDER['TENDER_UAID']} | ||
72 | + log ${doc_upload_reply} | ||
73 | + ${file_upload_process_data}= Create Dictionary filepath=${filepath} doc_upload_reply=${doc_upload_reply} | ||
74 | + log ${file_upload_process_data} | ||
75 | + Set To Dictionary ${USERS.users['${tender_owner}']} file_upload_process_data ${file_upload_process_data} | ||
76 | + | ||
77 | + | ||
78 | +Можливість змінити опис процедури і інші поля | ||
79 | + ${cancellation_document_updated_data}= Викликати для учасника ${tender_owner} Змінити опис документа в скасуванні ${TENDER['TENDER_UAID']} | ||
80 | + log ${cancellation_document_updated_data} | ||
81 | + | ||
82 | + | ||
83 | +Можливість завантажити нову версію документа до запиту на скасування | ||
84 | + ${filepath}= create_fake_doc | ||
85 | + ${doc_upload_reply}= Викликати для учасника ${tender_owner} Завантажити нову версію документа до запиту на скасування ${filepath} | ||
86 | + log ${doc_upload_reply} | ||
87 | + | ||
88 | + | ||
89 | +Можливість активувати скасування закупівлі | ||
90 | + ${cancellation_confirmation_response}= Викликати для учасника ${tender_owner} Підтвердити скасування закупівлі ${TENDER['TENDER_UAID']} | ||
91 | + log ${cancellation_confirmation_response} |
@@ -19,7 +19,8 @@ from .initial_data import ( | @@ -19,7 +19,8 @@ from .initial_data import ( | ||
19 | test_invalid_features_data, test_item_data, test_lot_complaint_data, | 19 | test_invalid_features_data, test_item_data, test_lot_complaint_data, |
20 | test_lot_data, test_lot_document_data, test_lot_question_data, | 20 | test_lot_data, test_lot_document_data, test_lot_question_data, |
21 | test_lots_bid_data, test_meat_tender_data, test_question_answer_data, | 21 | test_lots_bid_data, test_meat_tender_data, test_question_answer_data, |
22 | - test_question_data, test_tender_data, test_tender_data_multiple_items, | 22 | + test_question_data, test_supplier_data, test_tender_data, |
23 | + test_tender_data_limited, test_tender_data_multiple_items, | ||
23 | test_tender_data_multiple_lots | 24 | test_tender_data_multiple_lots |
24 | ) | 25 | ) |
25 | from .local_time import get_now, TZ | 26 | from .local_time import get_now, TZ |
@@ -106,6 +107,8 @@ def prepare_test_tender_data(period_intervals, mode): | @@ -106,6 +107,8 @@ def prepare_test_tender_data(period_intervals, mode): | ||
106 | return munchify({'data': test_tender_data(period_intervals)}) | 107 | return munchify({'data': test_tender_data(period_intervals)}) |
107 | elif mode == 'multi': | 108 | elif mode == 'multi': |
108 | return munchify({'data': test_tender_data_multiple_items(period_intervals)}) | 109 | return munchify({'data': test_tender_data_multiple_items(period_intervals)}) |
110 | + elif mode == 'limited': | ||
111 | + return munchify({'data': test_tender_data_limited(period_intervals)}) | ||
109 | raise ValueError('Invalid mode for test_tender_data') | 112 | raise ValueError('Invalid mode for test_tender_data') |
110 | 113 | ||
111 | 114 | ||
@@ -179,6 +182,52 @@ def merge_dicts(left, right): | @@ -179,6 +182,52 @@ def merge_dicts(left, right): | ||
179 | return new | 182 | return new |
180 | 183 | ||
181 | 184 | ||
185 | +def cancel_tender(cancellation_reason): | ||
186 | + return { | ||
187 | + 'data': { | ||
188 | + 'reason': cancellation_reason | ||
189 | + } | ||
190 | + } | ||
191 | + | ||
192 | + | ||
193 | +def confirm_supplier(supplier_id): | ||
194 | + return { | ||
195 | + "data": { | ||
196 | + "status": "active", | ||
197 | + "id": supplier_id | ||
198 | + } | ||
199 | + } | ||
200 | + | ||
201 | + | ||
202 | +def change_cancellation_document_field(key, value): | ||
203 | + data = { | ||
204 | + "data": { | ||
205 | + key: value | ||
206 | + } | ||
207 | + } | ||
208 | + return data | ||
209 | + | ||
210 | + | ||
211 | +def confirm_cancellation(cancellation_id): | ||
212 | + data = { | ||
213 | + "data": { | ||
214 | + "status": "active", | ||
215 | + "id": cancellation_id | ||
216 | + } | ||
217 | + } | ||
218 | + return data | ||
219 | + | ||
220 | + | ||
221 | +def confirm_contract(contract_id): | ||
222 | + data = { | ||
223 | + "data": { | ||
224 | + "id": contract_id, | ||
225 | + "status": "active" | ||
226 | + } | ||
227 | + } | ||
228 | + return data | ||
229 | + | ||
230 | + | ||
182 | # GUI Frontends common | 231 | # GUI Frontends common |
183 | def add_data_for_gui_frontends(tender_data): | 232 | def add_data_for_gui_frontends(tender_data): |
184 | now = get_now() | 233 | now = get_now() |
Please
register
or
login
to post a comment