Showing
7 changed files
with
40 additions
and
7 deletions
| ... | ... | @@ -183,7 +183,8 @@ Resource playtender_tende |
| 183 | 183 | [Documentation] Отримати значення поля field_name з предмету з item_id в описі для тендера tender_uaid. |
| 184 | 184 | |
| 185 | 185 | open tender page by uaid ${tender_uaid} |
| 186 | - ${value} = get item field value by name ${field_name} | |
| 186 | + ${field_name} = set variable if ${NUMBER_OF_LOTS} == 0 tender.item.${field_name}.value tender.lot.item.${field_name}.value | |
| 187 | + ${value} = get field_value by field_name on opened page ${field_name} | |
| 187 | 188 | [Return] ${value} |
| 188 | 189 | |
| 189 | 190 | Видалити предмет закупівлі |
| ... | ... | @@ -210,7 +211,8 @@ Resource playtender_tende |
| 210 | 211 | [Documentation] Отримати значення поля field_name з лоту з lot_id в описі для тендера tender_uaid. |
| 211 | 212 | |
| 212 | 213 | open tender page by uaid ${tender_uaid} |
| 213 | - ${value} = get lot field value by name ${field_name} | |
| 214 | + ${field_name} = set variable tender.lot.${field_name}.value | |
| 215 | + ${value} = get field_value by field_name on opened page ${field_name} | |
| 214 | 216 | [Return] ${value} |
| 215 | 217 | |
| 216 | 218 | Завантажити документ в лот |
| ... | ... | @@ -335,7 +337,7 @@ Resource playtender_tende |
| 335 | 337 | ... на лоти lots_ids (якщо lots_ids != None) з неціновими |
| 336 | 338 | ... показниками features_ids (якщо features_ids != None). |
| 337 | 339 | |
| 338 | - open tender form by uaid ${tender_uaid} | |
| 340 | + open tender page by uaid ${tender_uaid} | |
| 339 | 341 | fill bid form ${tender_uaid} ${bid} ${lots_ids} ${features_ids} |
| 340 | 342 | submit form and check result ${bid_form_submit_btn_locator} ${bid_form_submit_success_msg} ${tender_created_checker_element_locator} |
| 341 | 343 | wait until page does not contain element with reloading ${tender_sync_element_locator} | ... | ... |
| ... | ... | @@ -12,6 +12,7 @@ fill bid form |
| 12 | 12 | [Documentation] Подати цінову пропозицію bid для тендера tender_uaid на лоти lots_ids (якщо lots_ids != None) з неціновими показниками features_ids (якщо features_ids != None). |
| 13 | 13 | |
| 14 | 14 | click visible element ${bid_form_open_btn_locator} |
| 15 | + capture page screenshot | |
| 15 | 16 | wait until popup is visible |
| 16 | 17 | ${value} = get from dictionary by keys ${bid} value amount |
| 17 | 18 | ${amount} = run keyword if condition is not none ${value} convert_float_to_string ${bid.data.value.amount} | ... | ... |
| ... | ... | @@ -63,7 +63,7 @@ fill item form in opened popup |
| 63 | 63 | ${description_en} = get from dictionary by keys ${data} description_en |
| 64 | 64 | run keyword if condition is not none ${description_en} input text to exist visible input ${item_form_popup_description_en_input_locator} ${description_en} |
| 65 | 65 | ${quantity} = get from dictionary by keys ${data} quantity |
| 66 | - run keyword if condition is not none ${quantity} input number3 to visible input ${item_form_popup_quantity_input_locator} ${quantity} | |
| 66 | + run keyword and ignore error run keyword if condition is not none ${quantity} input number3 to visible input ${item_form_popup_quantity_input_locator} ${quantity} | |
| 67 | 67 | ${unit} = get from dictionary by keys ${data} unit name |
| 68 | 68 | run keyword if condition is not none ${unit} select from visible list by label ${item_form_popup_unit_input_locator} ${unit} |
| 69 | 69 | ${classification} = get from dictionary by keys ${data} classification | ... | ... |
| ... | ... | @@ -78,7 +78,7 @@ fill plan general info |
| 78 | 78 | run keyword if condition is not none ${tender_start_date} select from visible list by year of date ${plan_form_year_input_locator} ${tender_start_date} |
| 79 | 79 | run keyword if condition is not none ${tender_start_date} input month.year of date to visible input ${plan_form_tender_start_date_input_locator} ${tender_start_date} |
| 80 | 80 | ${amount} = get from dictionary by keys ${data} budget amount |
| 81 | - run keyword if condition is not none ${amount} input number to visible input ${plan_form_value_amount_input_locator} ${amount} | |
| 81 | + run keyword and ignore error run keyword if condition is not none ${amount} input number to visible input ${plan_form_value_amount_input_locator} ${amount} | |
| 82 | 82 | ${currency} = get from dictionary by keys ${data} budget currency |
| 83 | 83 | run keyword if condition is not none ${currency} select from visible list by value ${plan_form_value_currency_input_locator} ${currency} |
| 84 | 84 | ${classification} = get from dictionary by keys ${data} classification | ... | ... |
| ... | ... | @@ -271,6 +271,8 @@ def prepare_tender_data(data): |
| 271 | 271 | |
| 272 | 272 | del data['items'] |
| 273 | 273 | |
| 274 | + if 'milestones' not in data: | |
| 275 | + return data | |
| 274 | 276 | # moves milestones to its related lots |
| 275 | 277 | i = 0 |
| 276 | 278 | l = len(data['milestones']) |
| ... | ... | @@ -304,3 +306,14 @@ def convert_date_to_string_contr(date): |
| 304 | 306 | date = dateutil.parser.parse(date) |
| 305 | 307 | date = date.strftime("%d.%m.%Y %H:%M:%S") |
| 306 | 308 | return date |
| 309 | + | |
| 310 | +def get_value_minimalStepPercentage(value): | |
| 311 | + value = value / 100 | |
| 312 | + return value | |
| 313 | + | |
| 314 | +def set_value_minimalStepPercentage(value): | |
| 315 | + value = value * 100 | |
| 316 | + return value | |
| 317 | + | |
| 318 | +def convert_esco__float_to_string(number): | |
| 319 | + return '{0:.5f}'.format(float(number)) | ... | ... |
| ... | ... | @@ -73,6 +73,9 @@ fill tender general info |
| 73 | 73 | run keyword if condition is not none ${lots} Run Keyword And Ignore Error Click Element ${tender_multilot_locator} |
| 74 | 74 | |
| 75 | 75 | open popup by btn locator ${plan_form_general_panel_edit_btn_locator} |
| 76 | + ${plan_path} = Get Variable Value ${ARTIFACT_FILE} artifact.yaml | |
| 77 | + ${ARTIFACT} = load_data_from ${plan_path} | |
| 78 | + run keyword if condition is not none ${ARTIFACT.tender_uaid} input text to visible input ${tender_form_general_tender_plan_id_locator} ${ARTIFACT.tender_uaid} | |
| 76 | 79 | ${title} = get from dictionary by keys ${data} title |
| 77 | 80 | run keyword if condition is not none ${title} input text to visible input ${tender_form_general_tender_title_locator} ${title} |
| 78 | 81 | ${title_en} = get from dictionary by keys ${data} title_en |
| ... | ... | @@ -85,7 +88,7 @@ fill tender general info |
| 85 | 88 | run keyword if condition is not none ${funders} Click Element ${tender_form_general_tender_funder_locator} |
| 86 | 89 | run keyword if condition is not none ${funders} fill tender form funders ${funders} |
| 87 | 90 | ${amount} = get from dictionary by keys ${data} value amount |
| 88 | - run keyword if condition is not none ${amount} run keyword and ignore error input number to exist visible input ${tender_form_general_value_amount_input_locator} ${amount} | |
| 91 | + run keyword and ignore error run keyword if condition is not none ${amount} run keyword and ignore error input number to exist visible input ${tender_form_general_value_amount_input_locator} ${amount} | |
| 89 | 92 | ${currency} = get from dictionary by keys ${data} value currency |
| 90 | 93 | run keyword if condition is not none ${currency} select from visible list by value ${tender_form_general_value_currency_input_locator} ${currency} |
| 91 | 94 | ${value_added_tax_included} = get from dictionary by keys ${data} value valueAddedTaxIncluded |
| ... | ... | @@ -112,8 +115,11 @@ fill tender general info |
| 112 | 115 | run keyword if condition is not none ${additional_classifications} select classification by array of code attributes ${plan_form_kekv_classification_edit_btn_locator} ${additional_classifications} ${kekv_schemes} |
| 113 | 116 | ${funding_kind} = get from dictionary by keys ${data} fundingKind |
| 114 | 117 | run keyword if condition is not none ${funding_kind} select from visible list by value ${tender_form_general_funding_kind_input_locator} ${funding_kind} |
| 118 | +#esco | |
| 115 | 119 | ${nbu_discount_rate} = get from dictionary by keys ${data} NBUdiscountRate |
| 116 | - run keyword if condition is not none ${nbu_discount_rate} input number to exist visible input ${tender_form_general_nbu_discount_rate_input_locator} ${nbu_discount_rate} | |
| 120 | + ${nbu_discount_rate} = Run keyword If '${nbu_discount_rate}' != '${None}' set_value_minimalStepPercentage ${nbu_discount_rate} | |
| 121 | + ${nbu_discount_rate} = Run keyword If '${nbu_discount_rate}' != '${None}' convert_esco__float_to_string ${nbu_discount_rate} | |
| 122 | + run keyword and ignore error run keyword if condition is not none ${nbu_discount_rate} input number to exist visible input ${tender_form_general_nbu_discount_rate_input_locator} ${nbu_discount_rate} | |
| 117 | 123 | #closeframework |
| 118 | 124 | ${max_awards_count} = get from dictionary by keys ${data} maxAwardsCount |
| 119 | 125 | run keyword if condition is not none ${max_awards_count} input text to exist visible input ${tender_form_general_max_awards_count_input_locator} ${max_awards_count} |
| ... | ... | @@ -266,6 +272,14 @@ fill lot form in opened popup |
| 266 | 272 | ${min_step_percentage} = get from dictionary by keys ${data} minimalStepPercentage |
| 267 | 273 | run keyword if condition is not none ${min_step_percentage} input number to exist visible input ${lot_form_popup_min_step_percentage_amount_input_locator} ${min_step_percentage} |
| 268 | 274 | |
| 275 | + ${yearly_payments_percentage_range} = get from dictionary by keys ${data} yearlyPaymentsPercentageRange | |
| 276 | + ${yearly_payments_percentage_range} = Run keyword If '${yearly_payments_percentage_range}' != '${None}' set_value_minimalStepPercentage ${yearly_payments_percentage_range} | |
| 277 | + ${yearly_payments_percentage_range} = Run keyword If '${yearly_payments_percentage_range}' != '${None}' convert_esco__float_to_string ${yearly_payments_percentage_range} | |
| 278 | + run keyword if condition is not none ${yearly_payments_percentage_range} input number to exist visible input ${tender_form_general_yearly_payments_percentage_range_input_locator} ${yearly_payments_percentage_range} | |
| 279 | + ${minimal_step_percentage} = get from dictionary by keys ${data} minimalStepPercentage | |
| 280 | + ${minimal_step_percentage} = Run keyword If '${minimal_step_percentage}' != '${None}' set_value_minimalStepPercentage ${minimal_step_percentage} | |
| 281 | + ${minimal_step_percentage} = Run keyword If '${minimal_step_percentage}' != '${None}' convert_esco__float_to_string ${minimal_step_percentage} | |
| 282 | + run keyword if condition is not none ${minimal_step_percentage} input number to exist visible input ${tender_form_general_minimal_step_percentage_input_locator} ${minimal_step_percentage} | |
| 269 | 283 | # ${currency} = get from dictionary by keys ${data} value currency |
| 270 | 284 | # run keyword if condition is not none ${currency} select from visible list by value ${tender_form_lots_value_currency_input_locator} ${currency} |
| 271 | 285 | # ${valueAddedTaxIncluded} = get from dictionary by keys ${data} value valueAddedTaxIncluded | ... | ... |
| ... | ... | @@ -63,6 +63,7 @@ ${tender_form_locator} = id=tender-fo |
| 63 | 63 | ${tender_form_procurement_method_type_input_locator} = jquery=[id$="form-procurement_method_type"] |
| 64 | 64 | ${tender_multilot_locator} = jquery=[id$="form-is_multilot"] |
| 65 | 65 | ${tender_form_general_panel_edit_btn_locator} = jquery=#General #headingGeneral .actions-wrapper .js-form-popup-update |
| 66 | +${tender_form_general_tender_plan_id_locator} = jquery=[id$="form-plan_id"] | |
| 66 | 67 | ${tender_form_general_tender_title_locator} = jquery=[id$="form-title"] |
| 67 | 68 | ${tender_form_general_tender_title_en_locator} = jquery=[id$="form-title_en"] |
| 68 | 69 | ${tender_form_general_tender_description_locator} = jquery=[id$="form-description"] |
| ... | ... | @@ -82,6 +83,8 @@ ${tender_tender_quick_mode_locator} = jquery=[id$= |
| 82 | 83 | #esco |
| 83 | 84 | ${tender_form_general_funding_kind_input_locator} = id=tenderescoform-funding_kind |
| 84 | 85 | ${tender_form_general_nbu_discount_rate_input_locator} = id=tenderescoform-nbu_discount_rate |
| 86 | +${tender_form_general_minimal_step_percentage_input_locator} = id=tenderescoform-min_step_percentage | |
| 87 | +${tender_form_general_yearly_payments_percentage_range_input_locator} = id=tenderescoform-yearly_payments_percentage_range | |
| 85 | 88 | #closeframework |
| 86 | 89 | ${tender_form_general_max_awards_count_input_locator} = jquery=[id$="form-max_awards_count"] |
| 87 | 90 | ${tender_form_general_agreement_duration_years_input_locator} = jquery=[id$="form-agreement_duration_years"] | ... | ... |
Please
register
or
login
to post a comment