Commit bfa70cf21ec49bc65e471d5a8d21db5a6e38f312

Authored by Playtenders
1 parent 76c78c4a

create esco and bid

@@ -183,7 +183,8 @@ Resource playtender_tende @@ -183,7 +183,8 @@ Resource playtender_tende
183 [Documentation] Отримати значення поля field_name з предмету з item_id в описі для тендера tender_uaid. 183 [Documentation] Отримати значення поля field_name з предмету з item_id в описі для тендера tender_uaid.
184 184
185 open tender page by uaid ${tender_uaid} 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 [Return] ${value} 188 [Return] ${value}
188 189
189 Видалити предмет закупівлі 190 Видалити предмет закупівлі
@@ -210,7 +211,8 @@ Resource playtender_tende @@ -210,7 +211,8 @@ Resource playtender_tende
210 [Documentation] Отримати значення поля field_name з лоту з lot_id в описі для тендера tender_uaid. 211 [Documentation] Отримати значення поля field_name з лоту з lot_id в описі для тендера tender_uaid.
211 212
212 open tender page by uaid ${tender_uaid} 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 [Return] ${value} 216 [Return] ${value}
215 217
216 Завантажити документ в лот 218 Завантажити документ в лот
@@ -335,7 +337,7 @@ Resource playtender_tende @@ -335,7 +337,7 @@ Resource playtender_tende
335 ... на лоти lots_ids (якщо lots_ids != None) з неціновими 337 ... на лоти lots_ids (якщо lots_ids != None) з неціновими
336 ... показниками features_ids (якщо features_ids != None). 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 fill bid form ${tender_uaid} ${bid} ${lots_ids} ${features_ids} 341 fill bid form ${tender_uaid} ${bid} ${lots_ids} ${features_ids}
340 submit form and check result ${bid_form_submit_btn_locator} ${bid_form_submit_success_msg} ${tender_created_checker_element_locator} 342 submit form and check result ${bid_form_submit_btn_locator} ${bid_form_submit_success_msg} ${tender_created_checker_element_locator}
341 wait until page does not contain element with reloading ${tender_sync_element_locator} 343 wait until page does not contain element with reloading ${tender_sync_element_locator}
@@ -12,6 +12,7 @@ fill bid form @@ -12,6 +12,7 @@ fill bid form
12 [Documentation] Подати цінову пропозицію bid для тендера tender_uaid на лоти lots_ids (якщо lots_ids != None) з неціновими показниками features_ids (якщо features_ids != None). 12 [Documentation] Подати цінову пропозицію bid для тендера tender_uaid на лоти lots_ids (якщо lots_ids != None) з неціновими показниками features_ids (якщо features_ids != None).
13 13
14 click visible element ${bid_form_open_btn_locator} 14 click visible element ${bid_form_open_btn_locator}
  15 + capture page screenshot
15 wait until popup is visible 16 wait until popup is visible
16 ${value} = get from dictionary by keys ${bid} value amount 17 ${value} = get from dictionary by keys ${bid} value amount
17 ${amount} = run keyword if condition is not none ${value} convert_float_to_string ${bid.data.value.amount} 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,7 +63,7 @@ fill item form in opened popup
63 ${description_en} = get from dictionary by keys ${data} description_en 63 ${description_en} = get from dictionary by keys ${data} description_en
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} 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 ${quantity} = get from dictionary by keys ${data} quantity 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 ${unit} = get from dictionary by keys ${data} unit name 67 ${unit} = get from dictionary by keys ${data} unit name
68 run keyword if condition is not none ${unit} select from visible list by label ${item_form_popup_unit_input_locator} ${unit} 68 run keyword if condition is not none ${unit} select from visible list by label ${item_form_popup_unit_input_locator} ${unit}
69 ${classification} = get from dictionary by keys ${data} classification 69 ${classification} = get from dictionary by keys ${data} classification
@@ -78,7 +78,7 @@ fill plan general info @@ -78,7 +78,7 @@ fill plan general info
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} 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 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} 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 ${amount} = get from dictionary by keys ${data} budget amount 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 ${currency} = get from dictionary by keys ${data} budget currency 82 ${currency} = get from dictionary by keys ${data} budget currency
83 run keyword if condition is not none ${currency} select from visible list by value ${plan_form_value_currency_input_locator} ${currency} 83 run keyword if condition is not none ${currency} select from visible list by value ${plan_form_value_currency_input_locator} ${currency}
84 ${classification} = get from dictionary by keys ${data} classification 84 ${classification} = get from dictionary by keys ${data} classification
@@ -271,6 +271,8 @@ def prepare_tender_data(data): @@ -271,6 +271,8 @@ def prepare_tender_data(data):
271 271
272 del data['items'] 272 del data['items']
273 273
  274 + if 'milestones' not in data:
  275 + return data
274 # moves milestones to its related lots 276 # moves milestones to its related lots
275 i = 0 277 i = 0
276 l = len(data['milestones']) 278 l = len(data['milestones'])
@@ -304,3 +306,14 @@ def convert_date_to_string_contr(date): @@ -304,3 +306,14 @@ def convert_date_to_string_contr(date):
304 date = dateutil.parser.parse(date) 306 date = dateutil.parser.parse(date)
305 date = date.strftime("%d.%m.%Y %H:%M:%S") 307 date = date.strftime("%d.%m.%Y %H:%M:%S")
306 return date 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,6 +73,9 @@ fill tender general info
73 run keyword if condition is not none ${lots} Run Keyword And Ignore Error Click Element ${tender_multilot_locator} 73 run keyword if condition is not none ${lots} Run Keyword And Ignore Error Click Element ${tender_multilot_locator}
74 74
75 open popup by btn locator ${plan_form_general_panel_edit_btn_locator} 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 ${title} = get from dictionary by keys ${data} title 79 ${title} = get from dictionary by keys ${data} title
77 run keyword if condition is not none ${title} input text to visible input ${tender_form_general_tender_title_locator} ${title} 80 run keyword if condition is not none ${title} input text to visible input ${tender_form_general_tender_title_locator} ${title}
78 ${title_en} = get from dictionary by keys ${data} title_en 81 ${title_en} = get from dictionary by keys ${data} title_en
@@ -85,7 +88,7 @@ fill tender general info @@ -85,7 +88,7 @@ fill tender general info
85 run keyword if condition is not none ${funders} Click Element ${tender_form_general_tender_funder_locator} 88 run keyword if condition is not none ${funders} Click Element ${tender_form_general_tender_funder_locator}
86 run keyword if condition is not none ${funders} fill tender form funders ${funders} 89 run keyword if condition is not none ${funders} fill tender form funders ${funders}
87 ${amount} = get from dictionary by keys ${data} value amount 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 ${currency} = get from dictionary by keys ${data} value currency 92 ${currency} = get from dictionary by keys ${data} value currency
90 run keyword if condition is not none ${currency} select from visible list by value ${tender_form_general_value_currency_input_locator} ${currency} 93 run keyword if condition is not none ${currency} select from visible list by value ${tender_form_general_value_currency_input_locator} ${currency}
91 ${value_added_tax_included} = get from dictionary by keys ${data} value valueAddedTaxIncluded 94 ${value_added_tax_included} = get from dictionary by keys ${data} value valueAddedTaxIncluded
@@ -112,8 +115,11 @@ fill tender general info @@ -112,8 +115,11 @@ fill tender general info
112 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} 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 ${funding_kind} = get from dictionary by keys ${data} fundingKind 116 ${funding_kind} = get from dictionary by keys ${data} fundingKind
114 run keyword if condition is not none ${funding_kind} select from visible list by value ${tender_form_general_funding_kind_input_locator} ${funding_kind} 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 ${nbu_discount_rate} = get from dictionary by keys ${data} NBUdiscountRate 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 #closeframework 123 #closeframework
118 ${max_awards_count} = get from dictionary by keys ${data} maxAwardsCount 124 ${max_awards_count} = get from dictionary by keys ${data} maxAwardsCount
119 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} 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,6 +272,14 @@ fill lot form in opened popup
266 ${min_step_percentage} = get from dictionary by keys ${data} minimalStepPercentage 272 ${min_step_percentage} = get from dictionary by keys ${data} minimalStepPercentage
267 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} 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 # ${currency} = get from dictionary by keys ${data} value currency 283 # ${currency} = get from dictionary by keys ${data} value currency
270 # run keyword if condition is not none ${currency} select from visible list by value ${tender_form_lots_value_currency_input_locator} ${currency} 284 # run keyword if condition is not none ${currency} select from visible list by value ${tender_form_lots_value_currency_input_locator} ${currency}
271 # ${valueAddedTaxIncluded} = get from dictionary by keys ${data} value valueAddedTaxIncluded 285 # ${valueAddedTaxIncluded} = get from dictionary by keys ${data} value valueAddedTaxIncluded
@@ -63,6 +63,7 @@ ${tender_form_locator} = id=tender-fo @@ -63,6 +63,7 @@ ${tender_form_locator} = id=tender-fo
63 ${tender_form_procurement_method_type_input_locator} = jquery=[id$="form-procurement_method_type"] 63 ${tender_form_procurement_method_type_input_locator} = jquery=[id$="form-procurement_method_type"]
64 ${tender_multilot_locator} = jquery=[id$="form-is_multilot"] 64 ${tender_multilot_locator} = jquery=[id$="form-is_multilot"]
65 ${tender_form_general_panel_edit_btn_locator} = jquery=#General #headingGeneral .actions-wrapper .js-form-popup-update 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 ${tender_form_general_tender_title_locator} = jquery=[id$="form-title"] 67 ${tender_form_general_tender_title_locator} = jquery=[id$="form-title"]
67 ${tender_form_general_tender_title_en_locator} = jquery=[id$="form-title_en"] 68 ${tender_form_general_tender_title_en_locator} = jquery=[id$="form-title_en"]
68 ${tender_form_general_tender_description_locator} = jquery=[id$="form-description"] 69 ${tender_form_general_tender_description_locator} = jquery=[id$="form-description"]
@@ -82,6 +83,8 @@ ${tender_tender_quick_mode_locator} = jquery=[id$= @@ -82,6 +83,8 @@ ${tender_tender_quick_mode_locator} = jquery=[id$=
82 #esco 83 #esco
83 ${tender_form_general_funding_kind_input_locator} = id=tenderescoform-funding_kind 84 ${tender_form_general_funding_kind_input_locator} = id=tenderescoform-funding_kind
84 ${tender_form_general_nbu_discount_rate_input_locator} = id=tenderescoform-nbu_discount_rate 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 #closeframework 88 #closeframework
86 ${tender_form_general_max_awards_count_input_locator} = jquery=[id$="form-max_awards_count"] 89 ${tender_form_general_max_awards_count_input_locator} = jquery=[id$="form-max_awards_count"]
87 ${tender_form_general_agreement_duration_years_input_locator} = jquery=[id$="form-agreement_duration_years"] 90 ${tender_form_general_agreement_duration_years_input_locator} = jquery=[id$="form-agreement_duration_years"]
Please register or login to post a comment