Commit 3d696af4254f50925662998c26d603ca0d5a2a78
1 parent
8d221d8a
complaint_tender_declined_openEU__owner__all - declined tender. retirn cancellations
Showing
2 changed files
with
60 additions
and
51 deletions
@@ -452,3 +452,34 @@ def getTenderDataByTenderUaId(apiBaseUrl, tenderUaId): | @@ -452,3 +452,34 @@ def getTenderDataByTenderUaId(apiBaseUrl, tenderUaId): | ||
452 | tenderDataResponse = doGetRequest(apiBaseUrl.strip("/") + "/tenders/" + tenderId, data={}) | 452 | tenderDataResponse = doGetRequest(apiBaseUrl.strip("/") + "/tenders/" + tenderId, data={}) |
453 | tenderDataJson = tenderDataResponse['json'] | 453 | tenderDataJson = tenderDataResponse['json'] |
454 | return tenderDataJson | 454 | return tenderDataJson |
455 | + | ||
456 | + | ||
457 | +# prepares data for filling form in easiest way | ||
458 | +def prepare_tender_data_cancellation(data_original): | ||
459 | + # preventing change data in global view | ||
460 | + data = copy.deepcopy(data_original) | ||
461 | + print(data) | ||
462 | + b = [] | ||
463 | + b.append(data['cancellations']) | ||
464 | + | ||
465 | + return b | ||
466 | + | ||
467 | +def getTenderDataByTenderCancellationsUaId(apiBaseUrl, tenderUaId): | ||
468 | + requestData = {"opt_fields": "tenderID", "descending": "1", "mode": "_all_"} | ||
469 | + updatesResponse = doGetRequest(apiBaseUrl.strip("/") + "/tenders", data=requestData) | ||
470 | + if "json" not in updatesResponse: | ||
471 | + print('json key not found') | ||
472 | + return {} | ||
473 | + tenderId = None | ||
474 | + print("lastTenders:") | ||
475 | + print(updatesResponse['json']['data']) | ||
476 | + for item in updatesResponse['json']['data']: | ||
477 | + if tenderUaId == item['tenderID']: | ||
478 | + tenderId = item['id'] | ||
479 | + break | ||
480 | + if tenderId is None: | ||
481 | + return {} | ||
482 | + tenderDataResponse = doGetRequest(apiBaseUrl.strip("/") + "/tenders/" + tenderId + "/cancellations", data={}) | ||
483 | + tenderDataJson = tenderDataResponse['json'] | ||
484 | + return tenderDataJson | ||
485 | + |
@@ -708,71 +708,49 @@ decline tender | @@ -708,71 +708,49 @@ decline tender | ||
708 | submit form and check result ${bid_form_refresh_btn_locator} ${bid_form_refresh_success_msg} ${tender_created_checker_element_locator} ${true} | 708 | submit form and check result ${bid_form_refresh_btn_locator} ${bid_form_refresh_success_msg} ${tender_created_checker_element_locator} ${true} |
709 | ${cancellation_id} = get value by locator on opened page jquery=.cancellation-without-pseudo-table .cancellation-info-wrapper .info-row.opid .value | 709 | ${cancellation_id} = get value by locator on opened page jquery=.cancellation-without-pseudo-table .cancellation-info-wrapper .info-row.opid .value |
710 | ${cancellation} = playtender_tender.Перевести скасування закупівлі в період очікування ${username} ${tender_uaid} ${cancellation_id} | 710 | ${cancellation} = playtender_tender.Перевести скасування закупівлі в період очікування ${username} ${tender_uaid} ${cancellation_id} |
711 | +# ${cancellation} = prepare tender data cancellation ${tender_data['data']} | ||
711 | # ${cancellation} = openprocurement_client.Перевести скасування закупівлі в період очікування ${username} ${tender_uaid} ${cancellation_id} | 712 | # ${cancellation} = openprocurement_client.Перевести скасування закупівлі в період очікування ${username} ${tender_uaid} ${cancellation_id} |
712 | Set To Dictionary ${USERS.users['${tender_owner}']} cancellation_data=${cancellation} | 713 | Set To Dictionary ${USERS.users['${tender_owner}']} cancellation_data=${cancellation} |
713 | 714 | ||
714 | Перевести скасування закупівлі в період очікування | 715 | Перевести скасування закупівлі в період очікування |
715 | - [Documentation] | ||
716 | - ... [Arguments] Username, tender uaid, cancellation number | ||
717 | - ... Find tender using uaid, get cancellation test_confirmation data and call patch_cancellation | ||
718 | - ... [Return] Nothing | ||
719 | - [Arguments] ${username} ${tender_uaid} ${cancel_id} | 716 | + [Documentation] |
717 | + ... [Arguments] Username, tender uaid, cancellation number | ||
718 | + ... Find tender using uaid, get cancellation test_confirmation data and call patch_cancellation | ||
719 | + ... [Return] Nothing | ||
720 | + [Arguments] ${username} ${tender_uaid} ${cancel_id} | ||
720 | # ${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid} | 721 | # ${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid} |
721 | ${internalid} = get value by locator on opened page jquery=#tender-general-info .info-row.opid .value | 722 | ${internalid} = get value by locator on opened page jquery=#tender-general-info .info-row.opid .value |
722 | - Log ${username} | ||
723 | - ${tender}= getTenderDataByTenderUaId ${API_HOST_URL}/api/${API_VERSION} ${tender_uaid} | ||
724 | - ${tender}= op_robot_tests.tests_files.service_keywords.Munchify ${tender} | 723 | + Log ${username} |
724 | + ${tender}= getTenderDataByTenderUaId ${API_HOST_URL}/api/${API_VERSION} ${tender_uaid} | ||
725 | + ${tender}= op_robot_tests.tests_files.service_keywords.Munchify ${tender} | ||
725 | 726 | ||
727 | + Log ${tender} | ||
726 | # ${tender}= playtender_tender.Отримати тендер по внутрішньому ідентифікатору ${username} ${internalid} | 728 | # ${tender}= playtender_tender.Отримати тендер по внутрішньому ідентифікатору ${username} ${internalid} |
727 | # ${tender}= openprocurement_client.Отримати тендер по внутрішньому ідентифікатору ${username} ${internalid} | 729 | # ${tender}= openprocurement_client.Отримати тендер по внутрішньому ідентифікатору ${username} ${internalid} |
728 | ${data}= test_cancel_pending_data ${cancel_id} | 730 | ${data}= test_cancel_pending_data ${cancel_id} |
729 | - Log ${data} | 731 | + Log ${data} |
730 | 732 | ||
733 | + ${tender_с}= getTenderDataByTenderCancellationsUaId ${API_HOST_URL}/api/${API_VERSION} ${tender_uaid} | ||
734 | + ${tender_с}= op_robot_tests.tests_files.service_keywords.Munchify ${tender_с} | ||
735 | + | ||
736 | + Log ${tender_с} | ||
731 | # ${reply}= Call Method ${USERS.users['${username}'].client} patch_cancellation | 737 | # ${reply}= Call Method ${USERS.users['${username}'].client} patch_cancellation |
732 | - ${reply}= Call Method ${USERS.users['${username}']} patch_cancellation | ||
733 | - ... ${tender.data.id} | ||
734 | - ... ${data} | ||
735 | - ... ${data.data.id} | 738 | +## ${reply}= prepare tender data cancellation ${tender} |
739 | +# ${reply}= Call Method ${USERS.users['${username}']} patch_cancellation | ||
740 | +# ... ${tender.data.id} | ||
741 | +# ... ${data} | ||
742 | +# ... ${data.data.id} | ||
736 | # ... access_token=${tender.access.token} | 743 | # ... access_token=${tender.access.token} |
737 | - Log ${reply} | ||
738 | - [Return] ${reply} | 744 | +# Log ${reply} |
745 | + [Return] ${tender_с} | ||
739 | 746 | ||
740 | Отримати тендер по внутрішньому ідентифікатору | 747 | Отримати тендер по внутрішньому ідентифікатору |
741 | - [Arguments] ${username} ${internalid} ${save_key}=tender_data | ||
742 | - ${tender}= Call Method ${USERS.users['${username}']} get_tender ${internalid} | ||
743 | - ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token} | ||
744 | - Set To Dictionary ${USERS.users['${username}']} ${save_key}=${tender} | ||
745 | - ${tender}= munch_dict arg=${tender} | ||
746 | - Log ${tender} | ||
747 | - [return] ${tender} | ||
748 | - | 748 | + [Arguments] ${username} ${internalid} ${save_key}=tender_data |
749 | + ${tender}= Call Method ${USERS.users['${username}']} get_tender ${internalid} | ||
750 | + ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token} | ||
751 | + Set To Dictionary ${USERS.users['${username}']} ${save_key}=${tender} | ||
752 | + ${tender}= munch_dict arg=${tender} | ||
753 | + Log ${tender} | ||
754 | + [return] ${tender} | ||
749 | 755 | ||
750 | -Other | ||
751 | - input text to exist visible input ${claim_form_complaintform_description_input_locator} ${claim.data.description} | ||
752 | - capture page screenshot | ||
753 | - Run Keyword And Ignore Error Run Keyword If '${type}' == 'tender' Select From List By Label ${claim_form_complaintform_related_of_input_locator} Закупівля | ||
754 | - capture page screenshot | ||
755 | - Run Keyword And Ignore Error Run Keyword If '${type}' == 'lot' Select From List By Label ${claim_form_complaintform_related_of_input_locator} Лот | ||
756 | - capture page screenshot | ||
757 | - Run Keyword And Ignore Error Run Keyword If '${type}' == 'lot' Click Element ${claim_form_complaintform_related_lot_input_locator} | ||
758 | - ${claim_form_complaintform_related_lot_select_locator} = Run Keyword If '${type}' == 'lot' replace string ${claim_form_complaintform_related_lot_input_locator_tpl} %type_id% ${type_id} | ||
759 | - Run Keyword And Ignore Error Run Keyword If '${type}' == 'lot' Click Element ${claim_form_complaintform_related_lot_select_locator} | ||
760 | - capture page screenshot | ||
761 | - Run Keyword And Ignore Error Select From List By Label ${claim_form_complaintform_complaintform_type_input_locator} Вимога | ||
762 | - Run Keyword And Ignore Error Run Keyword If '${type}' == 'winner_complaint' or '${claim.data.type}' == 'complaint' Select From List By Label ${claim_form_complaintform_complaintform_type_input_locator} Скарга | ||
763 | - | ||
764 | - capture page screenshot | ||
765 | -### Run Keyword If '${doc_name}' != 'null' click visible element ${claim_form_complaintform_document_btn_locator} | ||
766 | - capture page screenshot | ||
767 | - Run Keyword If '${doc_name}' != 'null' choose file ${add_file_to_form_locator} ${doc_name} | ||
768 | - capture page screenshot | ||
769 | - Run Keyword If '${doc_name}' != 'null' wait until page does not contain element ${popup_dynamic_form_loading_element_locator} | ||
770 | - capture page screenshot | ||
771 | -# Run Keyword If '${doc_name}' != 'null' submit current visible popup | ||
772 | - submit form and check result ${claim_form_complaintform_submit_btn_locator} ${claim_form_submit_success_msg} ${tender_created_checker_element_locator} | ||
773 | -# Функция ожидания claim_uaid_text_locator соответствующей вимоги | ||
774 | -# click visible element ${claim_form_open_btn_locator} | ||
775 | - reload page | ||
776 | - wait until page does not contain element with reloading ${claim_sync_element_locator} 60 | ||
777 | - wait until page contains element with reloading ${claim_uaid_text_locator} | ||
778 | 756 |
Please
register
or
login
to post a comment