Commit c49092f998331c18a3ef5655b3a9da0abd500442

Authored by Playtenders
1 parent 74c47789

frameworkagreement

@@ -197,6 +197,7 @@ Resource playtender_agree @@ -197,6 +197,7 @@ Resource playtender_agree
197 197
198 # Run Keyword If '${TEST_NAME}' == 'Можливість знайти звіт про укладений договір по ідентифікатору' sleep 1200 198 # Run Keyword If '${TEST_NAME}' == 'Можливість знайти звіт про укладений договір по ідентифікатору' sleep 1200
199 open tender search form 199 open tender search form
  200 + Run Keyword And Return If '${SUITE_NAME}' == 'Tests Files.Contract Signing' and '${mode}' in 'open_framework' GetTenderContract ${tender_uaid}
200 go to ${broker_baseurl}/?query%5B%5D=${tender_uaid} 201 go to ${broker_baseurl}/?query%5B%5D=${tender_uaid}
201 input to search form and wait results ${tender_search_form_query_input_locator} ${tender_uaid} ${tender_search_form_result_locator_tpl} 202 input to search form and wait results ${tender_search_form_query_input_locator} ${tender_uaid} ${tender_search_form_result_locator_tpl}
202 203
@@ -1253,7 +1254,9 @@ Resource playtender_agree @@ -1253,7 +1254,9 @@ Resource playtender_agree
1253 [Documentation] Знайти угоду з uaid рівним tender_uaid. 1254 [Documentation] Знайти угоду з uaid рівним tender_uaid.
1254 1255
1255 open agreement search form 1256 open agreement search form
  1257 + capture page screenshot
1256 go to ${broker_baseurl}/agreement/?query%5B%5D=${agreement_uaid} 1258 go to ${broker_baseurl}/agreement/?query%5B%5D=${agreement_uaid}
  1259 + capture page screenshot
1257 input to search form and wait results ${agreement_search_form_query_input_locator} ${agreement_uaid} ${agreement_search_form_result_locator_tpl} 1260 input to search form and wait results ${agreement_search_form_query_input_locator} ${agreement_uaid} ${agreement_search_form_result_locator_tpl}
1258 1261
1259 Отримати доступ до угоди 1262 Отримати доступ до угоди
@@ -1306,11 +1309,7 @@ Resource playtender_agree @@ -1306,11 +1309,7 @@ Resource playtender_agree
1306 ... ELSE Run Keyword If '${field_name}' == 'changes[3].modifications[0].factor' get value by locator on opened page ${agreement_changes_3_modifications_0_factor_value_locator} ${agreement_changes_3_modifications_0_factor_value_type} 1309 ... ELSE Run Keyword If '${field_name}' == 'changes[3].modifications[0].factor' get value by locator on opened page ${agreement_changes_3_modifications_0_factor_value_locator} ${agreement_changes_3_modifications_0_factor_value_type}
1307 ... ELSE Run Keyword If '${field_name}' == 'changes[3].modifications[0].contractId' get value by locator on opened page ${} 1310 ... ELSE Run Keyword If '${field_name}' == 'changes[3].modifications[0].contractId' get value by locator on opened page ${}
1308 ... ELSE Run Keyword If '${field_name}' == 'changes[3].status' get value by locator on opened page ${agreement_changes_3_status_value_locator} 1311 ... ELSE Run Keyword If '${field_name}' == 'changes[3].status' get value by locator on opened page ${agreement_changes_3_status_value_locator}
1309 - Run Keyword If 'rationaleType' in '${field_name}' Run Keywords  
1310 - ... run keyword if "${return_value}" == "Зміна ціни за одиницю товару" ${return_value} = set variable itemPriceVariation  
1311 - ... AND run keyword if "${return_value}" == "Зміна ціни у зв’язку із зміною ставок податків і зборів" ${return_value} = set variable taxRate  
1312 - ... AND run keyword if "${return_value}" == "Зміна сторонніх показників (курсу, тарифів...)" ${return_value} = set variable thirdParty  
1313 - ... AND run keyword if "${return_value}" == "Припинення участі у рамковій угоді учасника" ${return_value} = set variable partyWithdrawal 1312 + Run Keyword If 'rationaleType' in '${field_name}' Отримати інформацію із поля rationaleType ${field_name}
1314 [Return] ${return_value} 1313 [Return] ${return_value}
1315 1314
1316 ######################################################################################################################## 1315 ########################################################################################################################
@@ -229,7 +229,9 @@ input to search form and wait results @@ -229,7 +229,9 @@ input to search form and wait results
229 229
230 # input text to visible input and press enter ${query_input_locator} ${query} 230 # input text to visible input and press enter ${query_input_locator} ${query}
231 ${result_locator} = replace string ${result_locator_tpl} %query% ${query} 231 ${result_locator} = replace string ${result_locator_tpl} %query% ${query}
  232 + capture page screenshot
232 wait until page contains search ${result_locator} 233 wait until page contains search ${result_locator}
  234 + capture page screenshot
233 # wait until page contains element with reloading ${result_locator} 235 # wait until page contains element with reloading ${result_locator}
234 236
235 select from visible list by value 237 select from visible list by value
@@ -449,6 +451,7 @@ reload page and fail if element does not exist on search @@ -449,6 +451,7 @@ reload page and fail if element does not exist on search
449 [Documentation] перезавантажує сторінку і фейлить тест якщо елемент відсутній в пошуку 451 [Documentation] перезавантажує сторінку і фейлить тест якщо елемент відсутній в пошуку
450 452
451 click visible element ${tender_form_search_btn_locator} 453 click visible element ${tender_form_search_btn_locator}
  454 + capture page screenshot
452 ${exists} = get is element exist ${locator} 455 ${exists} = get is element exist ${locator}
453 run keyword if ${exists} == ${False} fail 456 run keyword if ${exists} == ${False} fail
454 457
@@ -582,7 +582,7 @@ def getLastQualificationComplaintDataByTenderUaId(apiBaseUrl, tenderUaId): @@ -582,7 +582,7 @@ def getLastQualificationComplaintDataByTenderUaId(apiBaseUrl, tenderUaId):
582 tenderDataJson = tenderDataResponse['json']['data'][0] 582 tenderDataJson = tenderDataResponse['json']['data'][0]
583 return tenderDataJson 583 return tenderDataJson
584 584
585 -def getTenderDataByTenderContractUaId(apiBaseUrl, tenderUaId): 585 +def getTenderDataByTenderAgreementContractUaId(apiBaseUrl, tenderUaId):
586 requestData = {"opt_fields": "tenderID", "descending": "1", "mode": "_all_"} 586 requestData = {"opt_fields": "tenderID", "descending": "1", "mode": "_all_"}
587 updatesResponse = doGetRequest(apiBaseUrl.strip("/") + "/tenders", data=requestData) 587 updatesResponse = doGetRequest(apiBaseUrl.strip("/") + "/tenders", data=requestData)
588 if "json" not in updatesResponse: 588 if "json" not in updatesResponse:
@@ -598,6 +598,13 @@ def getTenderDataByTenderContractUaId(apiBaseUrl, tenderUaId): @@ -598,6 +598,13 @@ def getTenderDataByTenderContractUaId(apiBaseUrl, tenderUaId):
598 if tenderId is None: 598 if tenderId is None:
599 return {} 599 return {}
600 600
601 - tenderDataResponse = doGetRequest(apiBaseUrl.strip("/") + "/tenders/" + tenderId + "/contracts", data={}) 601 + tenderDataAgreement = doGetRequest(apiBaseUrl.strip("/") + "/tenders/" + tenderId + "/agreements", data={})
  602 + print("tenderDataAgreement:")
  603 + print(tenderDataAgreement['json']['data'])
  604 + tenderDataAgreementId = tenderDataAgreement['json']['data'][0]['id']
  605 + print("tenderDataAgreementId:")
  606 + print(tenderDataAgreementId)
  607 +
  608 + tenderDataResponse = doGetRequest(apiBaseUrl.strip("/") + "/tenders/" + tenderId + "/agreements/" + tenderDataAgreementId + "/contracts", data={})
602 tenderDataJson = tenderDataResponse['json']['data'][0] 609 tenderDataJson = tenderDataResponse['json']['data'][0]
603 return tenderDataJson 610 return tenderDataJson
@@ -765,7 +765,7 @@ GetTenderContract @@ -765,7 +765,7 @@ GetTenderContract
765 [Documentation] 765 [Documentation]
766 ... Username, tender uaid 766 ... Username, tender uaid
767 767
768 - ${contract}= getTenderDataByTenderContractUaId ${API_HOST_URL}/api/${API_VERSION} ${tender_uaid} 768 + ${contract}= getTenderDataByTenderAgreementContractUaId ${API_HOST_URL}/api/${API_VERSION} ${tender_uaid}
769 ${contract}= op_robot_tests.tests_files.service_keywords.Munchify ${contract} 769 ${contract}= op_robot_tests.tests_files.service_keywords.Munchify ${contract}
770 770
771 Log ${contract} 771 Log ${contract}
@@ -654,3 +654,13 @@ Wait date @@ -654,3 +654,13 @@ Wait date
654 ${return_value} = get value by locator on opened page ${tender_agreement_lots0_minimalStep_amount_value_locator} 654 ${return_value} = get value by locator on opened page ${tender_agreement_lots0_minimalStep_amount_value_locator}
655 [return] ${return_value} 655 [return] ${return_value}
656 656
  657 +Отримати інформацію із rationaleType
  658 + [Arguments] ${field_name}
  659 + [Documentation] Отримати значення поля rationaleType
  660 +
  661 + ${return_value} = Run Keyword If "${field_name}" == "Зміна ціни за одиницю товару" Set Variable itemPriceVariation
  662 + ... ELSE IF "${field_name}" == "Зміна ціни у зв’язку із зміною ставок податків і зборів" Set Variable taxRate
  663 + ... ELSE IF "${field_name}" == "Зміна сторонніх показників (курсу, тарифів...)" Set Variable thirdParty
  664 + ... ELSE IF "${field_name}" == "Припинення участі у рамковій угоді учасника" Set Variable partyWithdrawal
  665 + [return] ${return_value}
  666 +
Please register or login to post a comment