Commit b73ee7f1a28cf93eecea7c132671b112a20f2a81

Authored by Playtenders
1 parent 8f0c6a36

create tender

... ... @@ -112,9 +112,9 @@ Resource playtender_tende
112 112 ... uaid створеного тендера.
113 113
114 114 ${tender_prepared_data} = prepare tender data ${tender_data['data']}
115   - log ${tender_prepared_data}
  115 + ##### BOF - TMP for negotiation milestone 1 lot#####
116 116 Set Global Variable ${td_railway_crutch} ${tender_data}
117   - log many ${td_railway_crutch}
  117 + ##### EOF - TMP #####
118 118
119 119 open new tender form
120 120 fill tender form ${tender_prepared_data}
... ... @@ -145,7 +145,6 @@ Resource playtender_tende
145 145 wait until page does not contain element with reloading ${tender_sync_element_locator}
146 146 ${field_name} = set variable tender.${field_name}.value
147 147 ${value} = get field_value by field_name on opened page ${field_name}
148   -# ${value} = get tender field value by name ${field_name}
149 148 [Return] ${value}
150 149
151 150 Внести зміни в тендер
... ...
... ... @@ -331,51 +331,3 @@ def set_value_minimalStepPercentage(value):
331 331 def convert_esco__float_to_string(number):
332 332 return '{0:.5f}'.format(float(number))
333 333
334   -def generate_fake_award_data():
335   - myList = {}
336   -# myList = [('suppliers', 'address', 'countryName', u'Україна'), ('suppliers', 'address', 'locality', u'Переяслав-Хмельницький'), ('suppliers', 'address', 'postalCode', u'01111'), ('suppliers', 'address', 'region', u'Київська область'), ('suppliers', 'address', 'streetAddress', u'Тестова вулиця, 21-29'), ('suppliers', 'address', 'countryName', 'Україна'), ('suppliers', 'contactPoint', 'countryName', u'Україна'), ('suppliers', 'contactPoint', 'email', u'test_e_mail@ukr.net'), ('suppliers', 'contactPoint', 'faxNumber', u'9998877'), ('suppliers', 'contactPoint', 'name', u'ТЕСТ ФОП 1'), ('suppliers', 'address', 'telephone', u'+380997778899'), ('suppliers', 'contactPoint', 'url', 'http://www.page.gov.ua/'), ('suppliers', 'identifier', 'id', u'2833906462'), ('suppliers', 'identifier', 'legalName', u'Тестовий ФОП 1'), ('suppliers', 'contactPoint', 'faxNumber', u'9998877'), ('suppliers', 'identifier', 'scheme', u'UA-EDR'), ('suppliers', 'scale', 'sme'), ('value', 'amount', '5079'), ('value', 'currency', 'UAH'), ('value', 'valueAddedTaxIncluded', 'true')]
337   - print myList
338   -
339   - address = {}
340   - print myList
341   - myList["address"] = {
342   - "countryName": "Україна",
343   - "locality": "Переяслав - Хмельницький",
344   - "postalCode": "01111",
345   - "region": "Київська область",
346   - "streetAddress": "Тестова вулиця, 21 - 29"
347   - }
348   - print myList
349   -
350   - contactPoint = {}
351   - myList["contactPoint"] = {
352   - "email": "test_e_mail @ ukr.net",
353   - "faxNumber": "9998877",
354   - "name": "ТЕСТ ФОП 1",
355   - "telephone": "+380997778899",
356   - "url": "http: // www.page.gov.ua /"
357   - }
358   - print myList
359   - identifier = {}
360   - myList["identifier"] = {
361   - "id": "2833906462",
362   - "legalName": "Тестовий ФОП 1",
363   - "scheme": "UA-EDR"
364   - }
365   - value = {}
366   - myList["value"] = {
367   - "amount": "56333",
368   - "currency": "UAH",
369   - "valueAddedTaxIncluded": "true"
370   - }
371   - name = {}
372   - myList["name"] = {
373   - "amount": "56333",
374   - "currency": "UAH",
375   - "valueAddedTaxIncluded": "true"
376   - }
377   - print myList
378   -
379   - suppliers = {}
380   - suppliers = [address, contactPoint, identifier, value]
381   - return suppliers
... ...
... ... @@ -47,9 +47,6 @@ fill tender form
47 47 [Arguments] ${data}
48 48 [Documentation] заповнення форми з масива даних
49 49
50   - ${awards} = Run Keyword And Ignore Error playtender_service.Generate Fake Award Data
51   - #${awards} = Run Keyword And Ignore Error generate_fake_award_data()
52   - Run Keyword And Ignore Error fill award reporting form in opened popup ${awards}
53 50 fill tender general info ${data}
54 51 ${features} = get from dictionary by keys ${data} features
55 52 run keyword if condition is not none ${features} fill tender form features ${features} ${tender_form_general_panel_add_feature_btn_locator}
... ... @@ -59,9 +56,8 @@ fill tender form
59 56 run keyword and ignore error run keyword if condition is not none ${milestones} fill tender form milestones ${milestones}
60 57 ${lots} = get from dictionary by keys ${data} lots
61 58 run keyword if condition is not none ${lots} fill tender form lots ${lots}
62   - ${awards} = Run Keyword And Ignore Error playtender_service.Generate Fake Award Data
63   - #${awards} = Run Keyword And Ignore Error playtender_service.generate_fake_award_data()
64   - Run Keyword And Ignore Error fill award reporting form in opened popup ${awards}
  59 + ${supplier_data} = op_robot_tests.tests_files.service_keywords . Test Supplier Data
  60 + Run Keyword And Ignore Error fill tender from award reporting ${supplier_data.data.value.amount} ${supplier_data.data.suppliers[0]}
65 61 Run Keyword And Ignore Error fill tender required documents
66 62
67 63 fill tender general info
... ... @@ -69,15 +65,22 @@ fill tender general info
69 65 [Documentation] обирає потрібний тип закупівлі, чекає оновлення форми, вказує мультилотовість, заповнює
70 66 ... приховані поля + відкриває попап основних даних, заповнює його і закриває
71 67
  68 + LOG MANY ${data}
72 69 Execute Javascript $(window).scrollTop(0)
73   - wait until page does not contain element ${popup_dynamic_form_loading_element_locator}
  70 + wait until page does not contain element ${tender_load_form_after_mode_locator}
  71 + capture page screenshot
74 72 wait until page contains element ${tender_form_procurement_method_type_input_locator}
  73 + capture page screenshot
75 74 ${procurement_method_type} = get from dictionary by keys ${data} procurementMethodType
76   - run keyword if condition is not none ${procurement_method_type} select from visible list by value ${tender_form_procurement_method_type_input_locator} ${procurement_method_type}
77   - wait until page does not contain element ${popup_dynamic_form_loading_element_locator}
  75 + capture page screenshot
  76 + run keyword if condition is not none ${procurement_method_type} select from list by value ${tender_form_procurement_method_type_input_locator} ${procurement_method_type}
  77 + #run keyword if condition is not none ${procurement_method_type} select from visible list by value ${tender_form_procurement_method_type_input_locator} ${procurement_method_type}
  78 + capture page screenshot
  79 + wait until page does not contain element ${tender_load_form_after_mode_locator}
78 80
79 81 ${lots} = get from dictionary by keys ${data} lots
80 82 run keyword if condition is not none ${lots} Run Keyword And Ignore Error Click Element ${tender_multilot_locator}
  83 + wait until page does not contain element ${tender_load_form_after_mode_locator}
81 84
82 85 open popup by btn locator ${plan_form_general_panel_edit_btn_locator}
83 86 ${plan_path} = Get Variable Value ${ARTIFACT_FILE} artifact.yaml
... ... @@ -261,38 +264,14 @@ fill feature form in opened popup
261 264 \ Run Keyword If ${count} != 1 click visible element ${feature_form_popup_add-enums_btn_locator}
262 265 \ wait until page does not contain element ${popup_dynamic_form_loading_element_locator}
263 266
264   -fill feature form in opened popup2
265   - [Arguments] ${data}
266   - [Documentation] заповнює відкриту форму в активній вкладці згідно вказаних даних
267   -
268   - ${title} = get from dictionary by keys ${data} title
269   - run keyword if condition is not none ${title} input text to exist visible input ${feature_form_popup_title_input_locator} ${title}
270   - ${description} = get from dictionary by keys ${data} description
271   - run keyword if condition is not none ${description} input text to exist visible input ${feature_form_popup_description_input_locator} ${description}
272   - ${title_en} = get from dictionary by keys ${data} title_en
273   - run keyword if condition is not none ${title_en} input text to exist visible input ${feature_form_popup_title_en_input_locator} ${title_en}
274   - ${description_en} = get from dictionary by keys ${data} description
275   - run keyword if condition is not none ${description_en} input text to exist visible input ${feature_form_popup_description_en_input_locator} ${description_en}
276   - ${options} = Get From Dictionary ${data} enum
277   - ${count} = Get Length ${options}
278   - ${ex}= Evaluate ${count} - 1
279   - : FOR ${INDEX} IN RANGE 0 ${count}
280   - \ run keyword if condition is not none ${options[${INDEX}].title} input text to exist visible input ${feature_form_popup_enum_title_input_locator} ${options[${INDEX}].title}
281   - \ run keyword and ignore error input text to exist visible input ${feature_form_popup_enum_title_en_input_locator} test2
282   -# \ run keyword if condition is not none ${options[${INDEX}].title_en} input text to exist visible input ${feature_form_popup_enum_title_en_input_locator} ${options[${INDEX}].title_en}
283   - \ ${value} = convert_float_to_string ${options[${INDEX}].value}
284   - \ ${value} = Convert To Number ${value}
285   - \ ${value} = multiply_hundred ${value}
286   - \ ${value} = convert_float_to_string ${value}
287   - \ run keyword if condition is not none ${options[${INDEX}].value} input text to exist visible input ${feature_form_popup_enum_value_input_locator} ${value}
288   - \ Continue For Loop If '${INDEX}' == '${ex}'
289   - \ Run Keyword If ${count} != 1 click visible element ${feature_form_popup_add-enums_btn_locator}
290   - \ wait until page does not contain element ${popup_dynamic_form_loading_element_locator}
291   -
292 267 fill tender form lots
293 268 [Arguments] ${lot_attributes_array}
294 269 [Documentation] заповнення номенклатури тендеру
295 270
  271 + ##### BOF - TMP for negotiation milestone 1 lot#####
  272 + ${prepared_tender_data} = Get From Dictionary ${td_railway_crutch} data
  273 + ${milestones1} = Run Keyword If "${mode}" in "negotiation" Get From Dictionary ${prepared_tender_data} milestones
  274 + ##### EOF - TMP #####
296 275 :FOR ${lot_attributes} IN @{lot_attributes_array}
297 276 \ click visible element ${tender_form_lots_panel_edit_btn_locator}
298 277 \ wait until popup is visible
... ... @@ -302,6 +281,7 @@ fill tender form lots
302 281 \ run keyword if condition is not none ${features} fill tender form features ${features} ${tender_form_lot_panel_add_feature_btn_locator}
303 282 \ ${milestones} = get from dictionary by keys ${lot_attributes} milestones
304 283 \ run keyword if condition is not none ${milestones} fill tender form milestones ${milestones}
  284 + \ run keyword if condition is none ${milestones} run keyword if "${mode}" in "negotiation" fill tender form milestones ${milestones1}
305 285 \ ${items} = get from dictionary by keys ${lot_attributes} items
306 286 \ run keyword if condition is not none ${items} fill tender form items ${items}
307 287
... ... @@ -325,8 +305,6 @@ fill lot form in opened popup
325 305 run keyword if condition is not none ${amount} input number to exist visible input ${lot_form_popup_value_amount_input_locator} ${amount}
326 306 ${min_step_amount} = get from dictionary by keys ${data} minimalStep amount
327 307 run keyword if condition is not none ${min_step_amount} input number to exist visible input ${lot_form_popup_minimalstep_amount_input_locator} ${min_step_amount}
328   -# ${min_step_percentage} = get from dictionary by keys ${data} minimalStepPercentage
329   -# 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}
330 308
331 309 ${yearly_payments_percentage_range} = get from dictionary by keys ${data} yearlyPaymentsPercentageRange
332 310 ${yearly_payments_percentage_range} = Run keyword If '${yearly_payments_percentage_range}' != '${None}' set_value_minimalStepPercentage ${yearly_payments_percentage_range}
... ... @@ -358,23 +336,42 @@ fill tender required documents
358 336 wait until page does not contain element ${popup_dynamic_form_loading_element_locator}
359 337 submit current visible popup
360 338
  339 +fill tender from award reporting
  340 + [Arguments] ${budget} ${award_attributes_array}
  341 + [Documentation] заповнення номенклатури тендеру
  342 +
  343 + run keyword and ignore error click visible element ${tender_form_general_panel_update_award_reporting_btn_locator}
  344 + wait until popup is visible
  345 + fill award reporting form in opened popup ${budget} ${award_attributes_array}
  346 + submit current visible popup
  347 +
361 348 fill award reporting form in opened popup
362   - [Arguments] ${data}
  349 + [Arguments] ${budget} ${data}
363 350 [Documentation] заповнює відкриту форму в активній вкладці згідно вказаних даних
364 351
365   - log many ${data}
366   - ${suppliers} = get from dictionary by keys ${data} suppliers address
367   - run keyword if condition is not none ${title} select from visible list by value ${milestone_form_popup_title_input_locator} ${title}
368   - ${description} = get from dictionary by keys ${data} description
369   - run keyword if condition is not none ${description} input text to exist visible input ${milestone_form_popup_description_input_locator} ${description}
370   - ${percentage} = get from dictionary by keys ${data} percentage
371   - run keyword if condition is not none ${percentage} input text to exist visible input ${milestone_form_popup_percentage_input_locator} ${percentage}
372   - ${code} = get from dictionary by keys ${data} code
373   - run keyword if condition is not none ${code} select from visible list by value ${milestone_form_popup_code_input_locator} ${code}
374   - ${duration_days} = get from dictionary by keys ${data} duration days
375   - run keyword if condition is not none ${duration_days} input text to exist visible input ${milestone_form_popup_duration_days_input_locator} ${duration_days}
376   - ${duration_type} = get from dictionary by keys ${data} duration type
377   - run keyword if condition is not none ${duration_type} select from visible list by value ${milestone_form_popup_duration_type_input_locator} ${duration_type}
  352 + ${org_name} = get from dictionary by keys ${data} identifier legalName
  353 + run keyword if condition is not none ${org_name} input text to exist visible input ${tender_form_award_organization_name_locator} ${org_name}
  354 + ${organization_identifier_code} = get from dictionary by keys ${data} identifier id
  355 + run keyword if condition is not none ${organization_identifier_code} input text to exist visible input ${tender_form_award_organization_identifier_code_locator} ${organization_identifier_code}
  356 + ${award_organization_scale} = get from dictionary by keys ${data} scale
  357 + run keyword if condition is not none ${award_organization_scale} select from visible list by value ${tender_form_award_organization_scale_locator} ${award_organization_scale}
  358 + ${region} = get from dictionary by keys ${data} address region
  359 + run keyword if condition is not none ${region} select from visible list by label ${tender_form_award_organization_region_id_locator} ${region}
  360 + ${postal_code} = get from dictionary by keys ${data} address postalCode
  361 + run keyword if condition is not none ${postal_code} input text to exist visible input ${tender_form_award_organization_postal_code_locator} ${postal_code}
  362 + ${locality} = get from dictionary by keys ${data} address locality
  363 + run keyword if condition is not none ${locality} input text to exist visible input ${tender_form_award_organization_locality_locator} ${locality}
  364 + ${street_address} = get from dictionary by keys ${data} address streetAddress
  365 + run keyword if condition is not none ${street_address} input text to exist visible input ${tender_form_award_organization_street_address_locator} ${street_address}
  366 + ${contact_point_name} = get from dictionary by keys ${data} contactPoint name
  367 + run keyword if condition is not none ${contact_point_name} input text to exist visible input ${tender_form_award_organization_contact_point_name_locator} ${contact_point_name}
  368 + ${contact_point_email} = get from dictionary by keys ${data} contactPoint email
  369 + run keyword if condition is not none ${contact_point_email} input text to exist visible input ${tender_form_award_organization_contact_point_email_locator} ${contact_point_email}
  370 + ${contact_point_phone} = get from dictionary by keys ${data} contactPoint telephone
  371 + run keyword if condition is not none ${contact_point_phone} input text to exist visible input ${tender_form_award_organization_contact_point_phone_locator} ${contact_point_phone}
  372 +# ${duration_days} = get from dictionary by keys ${data} contactPoint days
  373 +# run keyword if condition is not none ${duration_days} input text to exist visible input ${milestone_form_popup_duration_days_input_locator} ${duration_days}
  374 + input number to exist visible input ${tender_form_award_budget_locator} ${budget}
378 375
379 376 open tender search form
380 377 [Documentation] відкриває сторінку з пошуком тендерів
... ...
... ... @@ -58,9 +58,10 @@ ${buyer_form_popup_legal_name_input_locator} = jquery=.fanc
58 58 ${buyer_form_popup_identifier_id_input_locator} = jquery=.fancybox-is-open:last .fancybox-slide--current .fancybox-content [id$='-procuring_entity_identifier_code']
59 59
60 60 # tender form
  61 +${tender_load_form_after_mode_locator} = jquery=#tender-form-pjax.loading-wrapper
61 62 ${tender_form_submit_success_msg} = дочекайтесь опублікування на сайті уповноваженого органу.
62 63 ${tender_form_locator} = id=tender-form
63   -${tender_form_procurement_method_type_input_locator} = jquery=[id$="form-procurement_method_type"]
  64 +${tender_form_procurement_method_type_input_locator} = jquery=.form-inline [id$="form-procurement_method_type"]
64 65 ${tender_multilot_locator} = jquery=[id$="form-is_multilot"]
65 66 ${tender_form_general_panel_edit_btn_locator} = jquery=#General #headingGeneral .actions-wrapper .js-form-popup-update
66 67 ${tender_form_general_tender_plan_id_locator} = jquery=[id$="form-plan_id"]
... ... @@ -83,8 +84,8 @@ ${tender_tender_quick_mode_locator} = jquery=[id$=
83 84 #esco
84 85 ${tender_form_general_funding_kind_input_locator} = id=tenderescoform-funding_kind
85 86 ${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
  87 +${tender_form_general_minimal_step_percentage_input_locator} = jquery=[id$="-min_step_percentage"]
  88 +${tender_form_general_yearly_payments_percentage_range_input_locator} = jquery=[id$="-yearly_payments_percentage_range"]
88 89 #closeframework
89 90 ${tender_form_general_max_awards_count_input_locator} = jquery=[id$="form-max_awards_count"]
90 91 ${tender_form_general_agreement_duration_years_input_locator} = jquery=[id$="form-agreement_duration_years"]
... ... @@ -279,4 +280,17 @@ ${tender_feature_dell_submit_btn_locator} = jquery=.anim
279 280
280 281 ${tender_features_0_title_value_locator} = jquery=.row--value-list .value .underline__inner:nth(1)
281 282 ${tender_features_1_title_value_locator} = jquery=.row--value-list .value .underline__inner:nth(0)
282   -${tender_features_2_title_value_locator} = jquery=.row--value-list .value .underline__inner:nth(2)
\ No newline at end of file
  283 +${tender_features_2_title_value_locator} = jquery=.row--value-list .value .underline__inner:nth(2)${tender_form_general_tender_plan_id_locator} = jquery=[id$="form-plan_id"]
  284 +
  285 +#award reporting
  286 +${tender_form_award_organization_name_locator} = jquery=[id$="-award_organization_name"]
  287 +${tender_form_award_organization_identifier_code_locator} = jquery=[id$="-award_organization_identifier_code"]
  288 +${tender_form_award_organization_scale_locator} = jquery=[id$="-award_organization_scale"]
  289 +${tender_form_award_organization_region_id_locator} = jquery=[id$="-award_organization_region_id"]
  290 +${tender_form_award_organization_postal_code_locator} = jquery=[id$="-award_organization_postal_code"]
  291 +${tender_form_award_organization_locality_locator} = jquery=[id$="-award_organization_locality"]
  292 +${tender_form_award_organization_street_address_locator} = jquery=[id$="-award_organization_street_address"]
  293 +${tender_form_award_organization_contact_point_name_locator} = jquery=[id$="-award_organization_contact_point_name"]
  294 +${tender_form_award_organization_contact_point_email_locator} = jquery=[id$="-award_organization_contact_point_email"]
  295 +${tender_form_award_organization_contact_point_phone_locator} = jquery=[id$="-award_organization_contact_point_phone"]
  296 +${tender_form_award_budget_locator} = jquery=[id$="-award_value_amount"]
... ...
Please register or login to post a comment