Commit 5f3fe40f6cc0c1c65db8ecd550e7cdb76d41dad9
1 parent
2b98ccd3
add tender form variables and start create tender
Showing
3 changed files
with
101 additions
and
2 deletions
| ... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 | |
| 3 | 3 | Resource playtender_common.robot |
| 4 | 4 | Resource playtender_plan.robot |
| 5 | +Resource playtender_tender.robot | |
| 5 | 6 | |
| 6 | 7 | *** Variables *** |
| 7 | 8 | |
| ... | ... | @@ -48,4 +49,16 @@ Resource playtender_plan. |
| 48 | 49 | [Arguments] ${username} ${plan_uaid} |
| 49 | 50 | [Documentation] Оновити сторінку з планом для отримання потенційно оновлених даних. |
| 50 | 51 | |
| 51 | - open plan page by uaid ${plan_uaid} | |
| \ No newline at end of file | ||
| 52 | + open plan page by uaid ${plan_uaid} | |
| 53 | + | |
| 54 | +Створити тендер | |
| 55 | + [Arguments] ${user} ${tender_data} | |
| 56 | + [Documentation] Створити тендер з початковими даними tender_data. Повернути uaid створеного тендера. | |
| 57 | + | |
| 58 | + config acceleration for new tender form ${tender_data['data']} | |
| 59 | + open new tender form | |
| 60 | + fill tender form ${tender_data['data']} | |
| 61 | + submit form and check result ${plan_form_submit_btn_locator} ${plan_form_submit_success_msg} ${plan_created_checker_element_locator} | |
| 62 | + wait until page does not contain element with reloading ${plan_sync_element_locator} | |
| 63 | + ${plan_uaid} = get text ${plan_uaid_text_locator} | |
| 64 | + [Return] ${plan_uaid} | ... | ... |
playtender_tender.robot
0 → 100644
| 1 | +*** Settings *** | |
| 2 | + | |
| 3 | +Resource playtender_common.robot | |
| 4 | + | |
| 5 | +*** Keywords *** | |
| 6 | + | |
| 7 | +open new tender form | |
| 8 | + [Documentation] відкриття сторінки створення тендеру | |
| 9 | + | |
| 10 | + open page and wait element by locator ${broker_baseurl}/tender/create ${tender_form_locator} | |
| 11 | + | |
| 12 | +config acceleration for new tender form | |
| 13 | + [Arguments] ${data} | |
| 14 | + [Documentation] задати акселератор створення тендеру | |
| 15 | + | |
| 16 | + ${procurement_method_type} = get from dictionary by keys ${data} tender procurementMethodType | |
| 17 | + Run Keyword If '${SUITE_NAME}' == 'Tests Files.Complaints' and '${procurement_method_type}' == 'belowThreshold' Go To ${broker_baseurl}/utils/config?tacceleration=360 | |
| 18 | + Run Keyword If '${procurement_method_type}' == 'negotiation' Go To ${broker_baseurl}/utils/config?tacceleration=1080 | |
| 19 | + Run Keyword If '${procurement_method_type}' == 'aboveThresholdUA.defense' Go To ${broker_baseurl}utils/config?tacceleration=720 | |
| 20 | + | |
| 21 | +open tender page by uaid | |
| 22 | + [Arguments] ${uaid} | |
| 23 | + [Documentation] відкриває сторінку з тендером | |
| 24 | + | |
| 25 | + open page and wait element by locator ${broker_baseurl}/tender/${uaid} ${tender_view_checker_element_locator} | |
| 26 | + | |
| 27 | +fill tender form | |
| 28 | + [Arguments] ${data} | |
| 29 | + [Documentation] заповнення форми з масива даних | |
| 30 | + | |
| 31 | + # hidden inputs | |
| 32 | + ${budget_id} = get from dictionary by keys ${data} budget id | |
| 33 | + run keyword if condition is not none ${budget_id} input text to hidden input ${plan_form_budget_id_input_locator} ${budget_id} | |
| 34 | + ${project_id} = get from dictionary by keys ${data} budget project id | |
| 35 | + run keyword if condition is not none ${project_id} input text to hidden input ${plan_form_project_id_input_locator} ${project_id} | |
| 36 | + ${project_name} = get from dictionary by keys ${data} budget project name | |
| 37 | + run keyword if condition is not none ${project_name} input text to hidden input ${plan_form_project_name_input_locator} ${project_name} | |
| 38 | + | |
| 39 | + # general info | |
| 40 | + open popup by btn locator ${plan_form_general_panel_edit_btn_locator} | |
| 41 | + ${procurement_method_type} = get from dictionary by keys ${data} tender procurementMethodType | |
| 42 | + run keyword if condition is not none ${procurement_method_type} select from visible list by value ${plan_form_procurement_method_type_input_locator} ${procurement_method_type} | |
| 43 | + ${budget_description} = get from dictionary by keys ${data} budget description | |
| 44 | + run keyword if condition is not none ${budget_description} input text to visible input ${plan_form_title_input_locator} ${budget_description} | |
| 45 | + ${tender_start_date} = get from dictionary by keys ${data} tender tenderPeriod startDate | |
| 46 | + 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} | |
| 47 | + 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} | |
| 48 | + ${amount} = get from dictionary by keys ${data} budget amount | |
| 49 | + run keyword if condition is not none ${amount} input number to visible input ${plan_form_value_amount_input_locator} ${amount} | |
| 50 | + ${currency} = get from dictionary by keys ${data} budget currency | |
| 51 | + run keyword if condition is not none ${currency} select from visible list by value ${plan_form_value_currency_input_locator} ${currency} | |
| 52 | + ${classification} = get from dictionary by keys ${data} classification | |
| 53 | + run keyword if condition is not none ${classification} select classification by code attributes ${plan_form_classification_edit_btn_locator} ${classification} | |
| 54 | + ${additional_classifications} = get from dictionary by keys ${data} additionalClassifications | |
| 55 | + run keyword if condition is not none ${additional_classifications} select classification by array of code attributes ${plan_form_additional_classification_edit_btn_locator} ${additional_classifications} ${None} ${kekv_schemes} | |
| 56 | + 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} | |
| 57 | + submit current visible popup | |
| 58 | + | |
| 59 | + # items | |
| 60 | + ${items} = get from dictionary by keys ${data} items | |
| 61 | + run keyword if condition is not none ${items} fill plan form items ${items} | |
| 62 | + | |
| 63 | +fill plan form items | |
| 64 | + [Arguments] ${item_attributes_array} | |
| 65 | + [Documentation] заповнення номенклатури плану | |
| 66 | + | |
| 67 | + :FOR ${item_attributes} IN @{item_attributes_array} | |
| 68 | + \ click visible element ${plan_form_add_item_btn_locator} | |
| 69 | + \ wait until popup is visible | |
| 70 | + \ fill item form in opened popup ${item_attributes} | |
| 71 | + \ submit current visible popup | |
| 72 | + | ... | ... |
| ... | ... | @@ -63,4 +63,18 @@ ${plan_created_checker_element_locator} = id=plan-part |
| 63 | 63 | # plan view |
| 64 | 64 | ${plan_view_checker_element_locator} = id=plan-general-info |
| 65 | 65 | ${plan_sync_element_locator} = jquery=#aside-part-pjax .status-label .fa-refresh |
| 66 | -${plan_uaid_text_locator} = jquery=#plan-general-info .plan-id .value | |
| \ No newline at end of file | ||
| 66 | +${plan_uaid_text_locator} = jquery=#plan-general-info .plan-id .value | |
| 67 | + | |
| 68 | +# tender form | |
| 69 | +${tender_form_submit_success_msg} = дочекайтесь опублікування на сайті уповноваженого органу | |
| 70 | +${tender_form_locator} = id=tender-form | |
| 71 | +${tender_form_procurement_method_type_input_locator} = id=tenderbelowthresholdform-procurement_method_type | |
| 72 | +${tender_multilot_locator} = id=tenderbelowthresholdform-is_multilot | |
| 73 | +${tender_form_general_panel_edit_btn_locator} = jquery=#General #headingGeneral .actions-wrapper .js-form-popup-update | |
| 74 | +${tender_form_general_panel_add_feature_btn_locator} = jquery=#collapseGeneral div.form-content.js-form-content div.actions-wrapper a:contains("Додати нецінові критерії") | |
| 75 | +${tender_form_general_panel_add_document_btn_locator} = jquery=#collapseGeneral div.form-content.js-form-content div.actions-wrapper a:contains("Додати документ") | |
| 76 | +${tender_form_milestones_panel_edit_btn_locator} = jquery=(#tender-form .panel.panel-default.form-popup-panel.js-form-popup-panel .panel-heading .actions-wrapper .js-form-popup-update)[3] | |
| 77 | +${tender_form_item_add_edit_btn_locator} = jquery=.js-form-group-popup-panel .panel-heading .actions-wrapper .js-form-popup-add | |
| 78 | +${tender_form_procuringEntity_contactPoint_edit_btn_locator} = jquery=(#tender-form .panel.panel-default.form-popup-panel.js-form-popup-panel .panel-heading .actions-wrapper .js-form-popup-update)[4] | |
| 79 | +${tender_form_submit_btn_locator} = jquery=#tender-form .js-submit-btn | |
| 80 | +${tender_created_checker_element_locator} = id=tender-part-pjax | ... | ... |
Please
register
or
login
to post a comment