Commit a313d39eac011b3b5f7313836c257ce60893d384

Authored by Oleksandr Iskryzhytskyi
1 parent 20aac0bb

corrected code + wrote some remarks

... ... @@ -94,10 +94,12 @@ Resource playtender_tende
94 94 save plan form and wait synchronization
95 95
96 96 Отримати інформацію із плану
97   - [Arguments] ${username} ${tender_uaid} ${field_name}
  97 + [Arguments] ${username} ${plan_uaid} ${field_name}
98 98 [Documentation] Отримати інформацію із плану, користуючись ідентіфікатором плану та назвою поля ${field_name}.
99 99
100   - get information from the plan ${tender_uaid} ${field_name}
  100 + open plan page by uaid ${plan_uaid}
  101 + ${value} = get plan field value by name ${field_name}
  102 + [Return] ${value}
101 103
102 104 ########################################################################################################################
103 105 ################################################### TENDER KEYWORDS ####################################################
... ... @@ -115,5 +117,4 @@ Resource playtender_tende
115 117 submit form and check result ${tender_form_submit_btn_locator} ${tender_form_submit_success_msg} ${tender_created_checker_element_locator}
116 118 wait until page does not contain element with reloading ${tender_sync_element_locator}
117 119 ${tender_uaid} = get text ${tender_uaid_text_locator}
118   - [Return] ${tender_uaid}
119   -
  120 + [Return] ${tender_uaid}
\ No newline at end of file
... ...
... ... @@ -70,126 +70,6 @@ fill item form in opened popup
70 70 run keyword if condition is not none ${classification} select classification by code attributes ${item_form_popup_classification_edit_btn_locator} ${classification}
71 71 ${additional_classifications} = get from dictionary by keys ${data} additionalClassifications
72 72 run keyword if condition is not none ${additional_classifications} select classification by array of code attributes ${item_form_popup_additional_classification_edit_btn_locator} ${additional_classifications}
73   -#fill item for tender form in opened popup
74   -# [Arguments] ${data}
75   -# [Documentation] заповнює відкриту форму згідно вказаних даних
76   -
77   - ${region} = get from dictionary by keys ${data} deliveryAddress region
78   - run keyword if condition is not none ${region} select from visible list by label ${item_form_popup_delivery_region_id_input_locator} ${region}
79   - ${postal_code} = get from dictionary by keys ${data} deliveryAddress postalCode
80   - run keyword if condition is not none ${postal_code} input text to visible input ${item_form_popup_delivery_postal_code_input_locator} ${postal_code}
81   - ${locality} = get from dictionary by keys ${data} deliveryAddress locality
82   - run keyword if condition is not none ${locality} input text to visible input ${item_form_popup_delivery_locality_input_locator} ${locality}
83   - ${street_address} = get from dictionary by keys ${data} deliveryAddress streetAddress
84   - run keyword if condition is not none ${street_address} input text to visible input ${item_form_popup_delivery_street_address_input_locator} ${street_address}
85   - ${delivery_start_date} = get from dictionary by keys ${data} deliveryDate startDate
86   - run keyword if condition is not none ${delivery_start_date} run keyword and ignore error input datetime to exist visible input ${item_form_popup_delivery_start_date_input_locator} ${delivery_start_date}
87   - ${delivery_end_date} = get from dictionary by keys ${data} deliveryDate endDate
88   - run keyword if condition is not none ${delivery_end_date} run keyword and ignore error input datetime to exist visible input ${item_form_popup_delivery_end_date_input_locator} ${delivery_end_date}
89   -
90   - submit current visible popup
91   -
92   - # features
93   - ${features} = get from dictionary by keys ${data} features
94   - run keyword if condition is not none ${features} fill tender form features ${features} ${tender_form_item_panel_add_feature_btn_locator}
95   -
96   -fill buyer form in opened popup
97   - [Arguments] ${data}
98   - [Documentation] заповнює відкриту форму згідно вказаних даних про замовника
99   -
100   - ${legalName} = get from dictionary by keys ${data} identifier legalName
101   - run keyword if condition is not none ${legalName} input text to visible input ${plan_form_add_buyer_legalName_input_locator} ${legalName}
102   - ${id} = get from dictionary by keys ${data} identifier id
103   - run keyword if condition is not none ${id} input text to exist visible input ${plan_form_add_buyer_id_input_locator} ${id}
104   -
105   -fill milestone form in opened popup
106   - [Arguments] ${data}
107   - [Documentation] заповнює відкриту форму Умови оплати згідно вказаних даних
108   -
109   - Capture Page Screenshot
110   - click visible element ${tender_form_milestones_add_btn_locator}
111   - Capture Page Screenshot
112   - ${title} = get from dictionary by keys ${data} title
113   - run keyword if condition is not none ${title} select from visible list by value ${tender_form_milestones_title_locator} ${title}
114   - ${description} = get from dictionary by keys ${data} description
115   - run keyword if condition is not none ${description} input text to exist visible input ${tender_form_milestones_description_locator} ${description}
116   - ${percentage} = get from dictionary by keys ${data} percentage
117   - run keyword if condition is not none ${percentage} input text to exist visible input ${tender_form_milestones_percentage_locator} ${percentage}
118   - ${code} = get from dictionary by keys ${data} code
119   - run keyword if condition is not none ${code} select from visible list by value ${tender_form_milestones_code_locator} ${code}
120   - ${duration_days} = get from dictionary by keys ${data} duration days
121   - run keyword if condition is not none ${duration_days} input text to exist visible input ${tender_form_milestones_duration_days_locator} ${duration_days}
122   - ${duration_type} = get from dictionary by keys ${data} duration type
123   -
124   -fill feature form in opened popup
125   - [Arguments] ${data}
126   - [Documentation] заповнює відкриту форму Нецінові крітерії згідно вказаних даних
127   -
128   - click visible element ${tender_form_features_panel_edit_btn_locator}
129   - ${title} = get from dictionary by keys ${data} title
130   - run keyword if condition is not none ${title} input text to exist visible input ${tender_form_features_title_locator} ${title}
131   - ${description} = get from dictionary by keys ${data} description
132   - run keyword if condition is not none ${description} input text to exist visible input ${tender_form_features_description_locator} ${description}
133   - ${options} = Get From Dictionary ${data} enum
134   - ${count} = Get Length ${options}
135   - ${ex}= Evaluate ${count} - 1
136   - : FOR ${INDEX} IN RANGE 0 ${count}
137   - \ run keyword if condition is not none ${options[${INDEX}].title} input text to exist visible input ${tender_form_features_enum_title_locator} ${options[${INDEX}].title}
138   - \ Capture Page Screenshot
139   -# \ ${description} = get from dictionary by keys ${data} description
140   -# \ run keyword if condition is not none ${description} input text to exist visible input ${tender_form_features_description_locator} ${description}
141   - \ Capture Page Screenshot
142   - \ ${value} = convert_float_to_string ${options[${INDEX}].value}
143   - \ ${value} = Convert To Number ${value}
144   - \ ${value} = multiply_hundred ${value}
145   - \ ${value} = convert_float_to_string ${value}
146   - \ run keyword if condition is not none ${options[${INDEX}].value} input text to exist visible input ${tender_form_features_enum_value_locator} ${value}
147   - \ Capture Page Screenshot
148   - \ Continue For Loop If '${INDEX}' == '${ex}'
149   - \ Run Keyword If ${count} != 1 click visible element ${tender_form_features_add-enums_locator}
150   -
151   -fill lot form in opened popup
152   - [Arguments] ${data}
153   - [Documentation] заповнює відкриту форму згідно вказаних даних
154   -
155   - ${title} = get from dictionary by keys ${data} title
156   - run keyword if condition is not none ${title} input text to visible input ${tender_form_lots_title_locator} ${title}
157   - ${title_en} = get from dictionary by keys ${data} title_en
158   - run keyword if condition is not none ${title_en} input text to exist visible input ${tender_form_lots_title_en_locator} ${title_en}
159   - ${description} = get from dictionary by keys ${data} description
160   - run keyword if condition is not none ${description} input text to visible input ${tender_form_lots_description_locator} ${description}
161   - ${description_en} = get from dictionary by keys ${data} description_en
162   - run keyword if condition is not none ${description_en} input text to exist visible input ${tender_form_lots_description_locator} ${description_en}
163   - capture page screenshot
164   - ${description_ru} = get from dictionary by keys ${data} description_ru
165   - run keyword if condition is not none ${description_ru} input text to exist visible input ${item_form_popup_description_ru_input_locator} ${description_ru}
166   - ${amount} = get from dictionary by keys ${data} value amount
167   - run keyword if condition is not none ${amount} input number to exist visible input ${tender_form_lots_value_amount_input_locator} ${amount}
168   - submit current visible popup
169   -# ${currency} = get from dictionary by keys ${data} value currency
170   -# run keyword if condition is not none ${currency} select from visible list by value ${tender_form_lots_value_currency_input_locator} ${currency}
171   -# ${valueAddedTaxIncluded} = get from dictionary by keys ${data} value valueAddedTaxIncluded
172   -# run keyword if condition is not none ${valueAddedTaxIncluded} run keyword if ${valueAddedTaxIncluded} Click Element ${tender_form_lots_value_added_tax_input_locator}
173   - ${min_step_amount} = get from dictionary by keys ${data} minimalStep amount
174   - run keyword if condition is not none ${min_step_amount} input number to exist visible input ${tender_form_lots_minimalStep_amount_input_locator} ${min_step_amount}
175   - capture page screenshot
176   - # features
177   - ${features} = get from dictionary by keys ${data} features
178   - run keyword if condition is not none ${features} fill tender form features ${features} ${tender_form_lot_panel_add_feature_btn_locator}
179   -
180   - # milestones
181   - ${milestones} = get from dictionary by keys ${data} milestones
182   - run keyword if condition is not none ${milestones} fill tender form milestones ${milestones}
183   -
184   - # items
185   - ${items} = get from dictionary by keys ${data} items
186   - run keyword if condition is not none ${items} fill tender form items ${items}
187   -
188   -Створити FakeDocs
189   - ${file_path} ${file_name} ${file_content}= create_fake_doc
190   - click visible element ${tender_form_general_panel_add_document_btn_locator}
191   - Choose File xpath=//input[@type='file'] ${file_path}
192   - submit current visible popup
193 73
194 74 ########################################################################################################################
195 75 #################################################### COMMON HELPERS ####################################################
... ...
... ... @@ -45,7 +45,17 @@ open plan search form
45 45
46 46 fill plan form
47 47 [Arguments] ${data}
48   - [Documentation] заповнення форми з масива даних
  48 + [Documentation] заповнення відкритої форми з масива даних
  49 +
  50 + fill plan general info ${data}
  51 + ${items} = get from dictionary by keys ${data} items
  52 + run keyword if condition is not none ${items} fill plan form items ${items}
  53 + ${buyers} = get from dictionary by keys ${data} buyers
  54 + run keyword if condition is not none ${buyers} fill plan form buyers ${buyers}
  55 +
  56 +fill plan general info
  57 + [Arguments] ${data}
  58 + [Documentation] заповнює приховані поля + відкриває попап основних даних, заповнює його і закриває
49 59
50 60 # hidden inputs
51 61 ${budget_id} = get from dictionary by keys ${data} budget id
... ... @@ -75,14 +85,6 @@ fill plan form
75 85 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}
76 86 submit current visible popup
77 87
78   - # items
79   - ${items} = get from dictionary by keys ${data} items
80   - run keyword if condition is not none ${items} fill plan form items ${items}
81   -
82   - # buyers
83   - ${buyers} = get from dictionary by keys ${data} buyers
84   - run keyword if condition is not none ${buyers} fill plan form buyers ${buyers}
85   -
86 88 fill plan form items
87 89 [Arguments] ${item_attributes_array}
88 90 [Documentation] заповнення номенклатури плану
... ... @@ -102,10 +104,19 @@ fill plan form buyers
102 104 [Documentation] заповнення замовника плану
103 105
104 106 :FOR ${buyer_attributes} IN @{buyer_attributes_array}
105   - \ click visible element ${plan_form_add_buyer_btn_locator}
  107 + \ click visible element ${plan_form_update_buyer_btn_locator}
106 108 \ wait until popup is visible
107   - \ fill buyer form in opened popup ${buyer_attributes}
108   - \ run keyword and ignore error submit current visible popup
  109 + \ fill buyer form in opened popup ${buyer_attributes}
  110 + \ submit current visible popup
  111 +
  112 +fill buyer form in opened popup
  113 + [Arguments] ${data}
  114 + [Documentation] заповнює відкриту форму згідно вказаних даних про замовника
  115 +
  116 + ${legal_name} = get from dictionary by keys ${data} identifier legalName
  117 + run keyword if condition is not none ${legal_name} input text to visible input ${buyer_form_popup_legal_name_input_locator} ${legal_name}
  118 + ${identifier_id} = get from dictionary by keys ${data} identifier id
  119 + run keyword if condition is not none ${identifier_id} input text to visible input ${buyer_form_popup_identifier_id_input_locator} ${identifier_id}
109 120
110 121 save plan form and wait synchronization
111 122 [Documentation] натискає кнопку "Зберегти" і чекає синхронізації плану
... ... @@ -113,11 +124,10 @@ save plan form and wait synchronization
113 124 submit form and check result ${plan_form_submit_btn_locator} ${plan_form_submit_success_msg} ${plan_created_checker_element_locator}
114 125 wait until page does not contain element with reloading ${plan_sync_element_locator}
115 126
116   -get information from the plan
117   - [Arguments] ${tender_uaid} ${key}
118   - [Documentation] Отримати інформацію із плану, користуючись ідентіфікатором плану та назвою поля ${field_name}.
  127 +get plan field value by name
  128 + [Arguments] ${key}
  129 + [Documentation] Отримати інформацію із плану, користуючись ідентіфікатором плану та назвою поля ${key}.
119 130
120   - open plan page by uaid ${tender_uaid}
121 131 ${budget}= get_invisible_text jquery=#general-info .budget-amount
122 132 Run Keyword And Return If '${key}' == 'tender.procurementMethodType' get_invisible_text jquery=#general-info .procurement-method-type
123 133 Run Keyword And Return If '${key}' == 'budget.amount' Convert To Number ${budget}
... ...
... ... @@ -19,14 +19,29 @@ fill tender form
19 19 [Arguments] ${data}
20 20 [Documentation] заповнення форми з масива даних
21 21
22   - # hidden inputs
23   - Log Many ${data}
  22 + fill tender general info
  23 + ${features} = get from dictionary by keys ${data} features
  24 + run keyword if condition is not none ${features} fill tender form features ${features} ${tender_form_general_panel_add_feature_btn_locator}
  25 + ${items} = get from dictionary by keys ${data} items
  26 + run keyword if condition is not none ${items} fill tender form items ${items}
  27 + ${milestones} = get from dictionary by keys ${data} milestones
  28 + run keyword if condition is not none ${milestones} fill tender form milestones ${milestones}
  29 + ${lots} = get from dictionary by keys ${data} lots
  30 + run keyword if condition is not none ${lots} fill tender form lots ${lots}
  31 + fill tender required documents
  32 +
  33 +fill tender general info
  34 + [Arguments] ${data}
  35 + [Documentation] обирає потрібний тип закупівлі, чекає оновлення форми, вказує мультилотовість, заповнює
  36 + ... приховані поля + відкриває попап основних даних, заповнює його і закриває
24 37
25   - # general info
26 38 ${procurement_method_type} = get from dictionary by keys ${data} procurementMethodType
27 39 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}
  40 + # @todo дочекатися поки завантажиться форма
  41 +
28 42 ${lots} = get from dictionary by keys ${data} lots
29 43 run keyword if condition is not none ${lots} Run Keyword And Ignore Error Click Element ${tender_multilot_locator}
  44 +
30 45 open popup by btn locator ${plan_form_general_panel_edit_btn_locator}
31 46 ${title} = get from dictionary by keys ${data} title
32 47 run keyword if condition is not none ${title} input text to visible input ${tender_form_general_tender_title_locator} ${title}
... ... @@ -49,12 +64,9 @@ fill tender form
49 64 run keyword if condition is not none ${min_step_amount} input number to exist visible input ${tender_form_general_minimalStep_amount_input_locator} ${min_step_amount}
50 65 ${mainProcurementCategory} = get from dictionary by keys ${data} mainProcurementCategory
51 66 run keyword if condition is not none ${mainProcurementCategory} select from visible list by value ${tender_form_general_main_procurement_category_input_locator} ${mainProcurementCategory}
52   - Capture Page Screenshot
53   -
54 67 ${tender_enquiry_period_start_date} = get from dictionary by keys ${data} enquiryPeriod startDate
55 68 # run keyword if condition is not none ${tender_enquiry_period_start_date} select from visible list by year of date ${tender_enquiry_period_start_date_input_locator} ${tender_enquiry_period_start_date}
56 69 run keyword if condition is not none ${tender_enquiry_period_start_date} input datetime to visible input ${tender_enquiry_period_start_date_input_locator} ${tender_enquiry_period_start_date}
57   - Capture Page Screenshot
58 70 ${tender_enquiry_period_end_date} = get from dictionary by keys ${data} enquiryPeriod endDate
59 71 # run keyword if condition is not none ${tender_enquiry_period_start_date} select from visible list by year of date ${tender_enquiry_period_start_date_input_locator} ${tender_enquiry_period_start_date}
60 72 run keyword if condition is not none ${tender_enquiry_period_end_date} input datetime to visible input ${tender_enquiry_period_end_date_input_locator} ${tender_enquiry_period_end_date}
... ... @@ -62,8 +74,7 @@ fill tender form
62 74 run keyword if condition is not none ${tender_start_date} run keyword and ignore error input datetime to visible input ${tender_tender_period_start_date_input_locator} ${tender_start_date}
63 75 ${tender_end_date} = get from dictionary by keys ${data} tenderPeriod endDate
64 76 run keyword if condition is not none ${tender_end_date} input datetime to visible input ${tender_tender_period_end_date_input_locator} ${tender_end_date}
65   - click element ${tender_tender_quick_mode_locator}
66   -
  77 + click element ${tender_tender_quick_mode_locator}
67 78 ${classification} = get from dictionary by keys ${data} classification
68 79 run keyword if condition is not none ${classification} select classification by code attributes ${plan_form_classification_edit_btn_locator} ${classification}
69 80 ${additional_classifications} = get from dictionary by keys ${data} additionalClassifications
... ... @@ -71,23 +82,6 @@ fill tender form
71 82 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}
72 83 submit current visible popup
73 84
74   - # features
75   - ${features} = get from dictionary by keys ${data} features
76   - run keyword if condition is not none ${features} fill tender form features ${features} ${tender_form_general_panel_add_feature_btn_locator}
77   -
78   - # items
79   - ${items} = get from dictionary by keys ${data} items
80   - run keyword if condition is not none ${items} fill tender form items ${items}
81   -
82   - # milestones
83   - ${milestones} = get from dictionary by keys ${data} milestones
84   - run keyword if condition is not none ${milestones} fill tender form milestones ${milestones}
85   - Створити FakeDocs
86   -
87   - #lots
88   - ${lots} = get from dictionary by keys ${data} lots
89   - run keyword if condition is not none ${lots} fill tender form lots ${lots}
90   -
91 85 fill tender form items
92 86 [Arguments] ${item_attributes_array}
93 87 [Documentation] заповнення номенклатури тендеру
... ... @@ -95,33 +89,98 @@ fill tender form items
95 89 :FOR ${item_attributes} IN @{item_attributes_array}
96 90 \ click visible element ${tender_form_item_add_edit_btn_locator}
97 91 \ wait until popup is visible
98   - \ fill item form in opened popup ${item_attributes}
99   -# \ fill item for tender form in opened popup ${item_attributes}
100   - \ run keyword and ignore error submit current visible popup
  92 + \ fill tender item form in opened popup ${item_attributes}
  93 + \ submit current visible popup
  94 + \ ${features} = get from dictionary by keys ${item_attributes} features
  95 + \ run keyword if condition is not none ${features} fill tender form features ${features} ${tender_form_item_panel_add_feature_btn_locator}
  96 +
  97 +fill tender item form in opened popup
  98 + [Arguments] ${data}
  99 + [Documentation] заповнює відкриту форму згідно вказаних даних
  100 +
  101 + fill item form in opened popup ${data}
  102 +
  103 + ${region} = get from dictionary by keys ${data} deliveryAddress region
  104 + run keyword if condition is not none ${region} select from visible list by label ${item_form_popup_delivery_region_id_input_locator} ${region}
  105 + ${postal_code} = get from dictionary by keys ${data} deliveryAddress postalCode
  106 + run keyword if condition is not none ${postal_code} input text to visible input ${item_form_popup_delivery_postal_code_input_locator} ${postal_code}
  107 + ${locality} = get from dictionary by keys ${data} deliveryAddress locality
  108 + run keyword if condition is not none ${locality} input text to visible input ${item_form_popup_delivery_locality_input_locator} ${locality}
  109 + ${street_address} = get from dictionary by keys ${data} deliveryAddress streetAddress
  110 + run keyword if condition is not none ${street_address} input text to visible input ${item_form_popup_delivery_street_address_input_locator} ${street_address}
  111 + ${delivery_start_date} = get from dictionary by keys ${data} deliveryDate startDate
  112 + run keyword if condition is not none ${delivery_start_date} run keyword and ignore error input datetime to exist visible input ${item_form_popup_delivery_start_date_input_locator} ${delivery_start_date}
  113 + ${delivery_end_date} = get from dictionary by keys ${data} deliveryDate endDate
  114 + run keyword if condition is not none ${delivery_end_date} run keyword and ignore error input datetime to exist visible input ${item_form_popup_delivery_end_date_input_locator} ${delivery_end_date}
101 115
102 116 fill tender form milestones
103 117 [Arguments] ${milestone_attributes_array}
104 118 [Documentation] заповнення умов оплати тендеру
105 119
106   - Log Many ${milestone_attributes_array}
  120 + click visible element ${tender_form_milestones_panel_edit_btn_locator}
  121 + wait until popup is visible
107 122 :FOR ${milestone_attributes} IN @{milestone_attributes_array}
108   -# \ click visible element ${button_selector}
109   - \ click visible element ${tender_form_milestones_panel_edit_btn_locator}
110   - \ capture page screenshot
111   - \ wait until popup is visible
  123 + \ click visible element ${tender_form_milestones_add_btn_locator}
  124 + \ # @todo чекати поки форма не з'явиться
112 125 \ fill milestone form in opened popup ${milestone_attributes}
113   - \ submit current visible popup
  126 + submit current visible popup
  127 +
  128 +fill milestone form in opened popup
  129 + [Arguments] ${data}
  130 + [Documentation] заповнює відкриту форму в активній вкладці згідно вказаних даних
  131 +
  132 + # @todo переписати всі локатори з прив'язкою до попапа + форми milestone, зробити як в fill item form in opened popup
  133 + ${title} = get from dictionary by keys ${data} title
  134 + run keyword if condition is not none ${title} select from visible list by value ${tender_form_milestones_title_locator} ${title}
  135 + ${description} = get from dictionary by keys ${data} description
  136 + run keyword if condition is not none ${description} input text to exist visible input ${tender_form_milestones_description_locator} ${description}
  137 + ${percentage} = get from dictionary by keys ${data} percentage
  138 + run keyword if condition is not none ${percentage} input text to exist visible input ${tender_form_milestones_percentage_locator} ${percentage}
  139 + ${code} = get from dictionary by keys ${data} code
  140 + run keyword if condition is not none ${code} select from visible list by value ${tender_form_milestones_code_locator} ${code}
  141 + ${duration_days} = get from dictionary by keys ${data} duration days
  142 + run keyword if condition is not none ${duration_days} input text to exist visible input ${tender_form_milestones_duration_days_locator} ${duration_days}
  143 + ${duration_type} = get from dictionary by keys ${data} duration type
114 144
115 145 fill tender form features
116   - [Arguments] ${feature_attributes_array} ${button_add}
  146 + [Arguments] ${feature_attributes_array} ${add_btn_locator}
117 147 [Documentation] заповнення нецінові крітерії тендеру
118 148
  149 + click visible element ${add_btn_locator}
  150 + wait until popup is visible
119 151 :FOR ${feature_attributes} IN @{feature_attributes_array}
120   - \ click visible element ${button_add}
121   - #${tender_form_features_panel_edit_btn_locator}
122   - \ wait until popup is visible
  152 + \ click visible element ${tender_form_features_panel_edit_btn_locator}
  153 + \ # @todo чекати поки форма не з'явиться
123 154 \ fill feature form in opened popup ${feature_attributes}
124   - \ submit current visible popup
  155 + submit current visible popup
  156 +
  157 +fill feature form in opened popup
  158 + [Arguments] ${data}
  159 + [Documentation] заповнює відкриту форму в активній вкладці згідно вказаних даних
  160 +
  161 + # @todo переписати локатори для прив'язки чисто поточний попап + НК форм. краще у відкритій формі НК видалити відкру форму Опції і
  162 + # тоді к циклі додавати опції, візьми підчисть код бо купа коментарів і тяжко розбиратися, можеш додавання опції в окремий кейворд винести
  163 + ${title} = get from dictionary by keys ${data} title
  164 + run keyword if condition is not none ${title} input text to exist visible input ${tender_form_features_title_locator} ${title}
  165 + ${description} = get from dictionary by keys ${data} description
  166 + run keyword if condition is not none ${description} input text to exist visible input ${tender_form_features_description_locator} ${description}
  167 + ${options} = Get From Dictionary ${data} enum
  168 + ${count} = Get Length ${options}
  169 + ${ex}= Evaluate ${count} - 1
  170 + : FOR ${INDEX} IN RANGE 0 ${count}
  171 + \ run keyword if condition is not none ${options[${INDEX}].title} input text to exist visible input ${tender_form_features_enum_title_locator} ${options[${INDEX}].title}
  172 + \ Capture Page Screenshot
  173 +# \ ${description} = get from dictionary by keys ${data} description
  174 +# \ run keyword if condition is not none ${description} input text to exist visible input ${tender_form_features_description_locator} ${description}
  175 + \ Capture Page Screenshot
  176 + \ ${value} = convert_float_to_string ${options[${INDEX}].value}
  177 + \ ${value} = Convert To Number ${value}
  178 + \ ${value} = multiply_hundred ${value}
  179 + \ ${value} = convert_float_to_string ${value}
  180 + \ run keyword if condition is not none ${options[${INDEX}].value} input text to exist visible input ${tender_form_features_enum_value_locator} ${value}
  181 + \ Capture Page Screenshot
  182 + \ Continue For Loop If '${INDEX}' == '${ex}'
  183 + \ Run Keyword If ${count} != 1 click visible element ${tender_form_features_add-enums_locator}
125 184
126 185 fill tender form lots
127 186 [Arguments] ${lot_attributes_array}
... ... @@ -130,5 +189,46 @@ fill tender form lots
130 189 :FOR ${lot_attributes} IN @{lot_attributes_array}
131 190 \ click visible element ${tender_form_lots_panel_edit_btn_locator}
132 191 \ wait until popup is visible
133   - \ fill lot form in opened popup ${lot_attributes}
134   - \ run keyword and ignore error submit current visible popup
  192 + \ fill lot form in opened popup ${lot_attributes}
  193 + \ submit current visible popup
  194 + \ ${features} = get from dictionary by keys ${data} features
  195 + \ run keyword if condition is not none ${features} fill tender form features ${features} ${tender_form_lot_panel_add_feature_btn_locator}
  196 + \ ${milestones} = get from dictionary by keys ${data} milestones
  197 + \ run keyword if condition is not none ${milestones} fill tender form milestones ${milestones}
  198 + \ ${items} = get from dictionary by keys ${data} items
  199 + \ run keyword if condition is not none ${items} fill tender form items ${items}
  200 +
  201 +fill lot form in opened popup
  202 + [Arguments] ${data}
  203 + [Documentation] заповнює відкриту форму згідно вказаних даних
  204 +
  205 + # @todo переписати локатори для прив'язки чисто поточний попап + лот форм
  206 + ${title} = get from dictionary by keys ${data} title
  207 + run keyword if condition is not none ${title} input text to visible input ${tender_form_lots_title_locator} ${title}
  208 + ${title_en} = get from dictionary by keys ${data} title_en
  209 + run keyword if condition is not none ${title_en} input text to exist visible input ${tender_form_lots_title_en_locator} ${title_en}
  210 + ${description} = get from dictionary by keys ${data} description
  211 + run keyword if condition is not none ${description} input text to visible input ${tender_form_lots_description_locator} ${description}
  212 + ${description_en} = get from dictionary by keys ${data} description_en
  213 + run keyword if condition is not none ${description_en} input text to exist visible input ${tender_form_lots_description_locator} ${description_en}
  214 + capture page screenshot
  215 + ${description_ru} = get from dictionary by keys ${data} description_ru
  216 + run keyword if condition is not none ${description_ru} input text to exist visible input ${item_form_popup_description_ru_input_locator} ${description_ru}
  217 + ${amount} = get from dictionary by keys ${data} value amount
  218 + run keyword if condition is not none ${amount} input number to exist visible input ${tender_form_lots_value_amount_input_locator} ${amount}
  219 + submit current visible popup
  220 +# ${currency} = get from dictionary by keys ${data} value currency
  221 +# run keyword if condition is not none ${currency} select from visible list by value ${tender_form_lots_value_currency_input_locator} ${currency}
  222 +# ${valueAddedTaxIncluded} = get from dictionary by keys ${data} value valueAddedTaxIncluded
  223 +# run keyword if condition is not none ${valueAddedTaxIncluded} run keyword if ${valueAddedTaxIncluded} Click Element ${tender_form_lots_value_added_tax_input_locator}
  224 + ${min_step_amount} = get from dictionary by keys ${data} minimalStep amount
  225 + run keyword if condition is not none ${min_step_amount} input number to exist visible input ${tender_form_lots_minimalStep_amount_input_locator} ${min_step_amount}
  226 +
  227 +fill tender required documents
  228 + [Documentation] додає документ до усієї закупівлі для успішної валідації форми
  229 +
  230 + ${file_path} ${file_name} ${file_content} = create_fake_doc
  231 + click visible element ${tender_form_general_panel_add_document_btn_locator}
  232 + choose file xpath=//input[@type='file'] ${file_path} # @todo винести локатор в variables + привязатися до відкритого попапу
  233 + # @todo чекати поки документ завантажиться
  234 + submit current visible popup
\ No newline at end of file
... ...
... ... @@ -53,6 +53,9 @@ ${item_form_popup_delivery_street_address_input_locator} = jquery=.fanc
53 53 ${item_form_popup_delivery_start_date_input_locator} = jquery=.fancybox-is-open:last .fancybox-slide--current .fancybox-content [id$='-delivery_start_date']
54 54 ${item_form_popup_delivery_end_date_input_locator} = jquery=.fancybox-is-open:last .fancybox-slide--current .fancybox-content [id$='-delivery_end_date']
55 55
  56 +# buyer form
  57 +${buyer_form_popup_legal_name_input_locator} = jquery=.fancybox-is-open:last .fancybox-slide--current .fancybox-content [id$='-procuring_entity_name']
  58 +${buyer_form_popup_identifier_id_input_locator} = jquery=.fancybox-is-open:last .fancybox-slide--current .fancybox-content [id$='-procuring_entity_identifier_code']
56 59
57 60 # plan form
58 61 ${plan_form_submit_success_msg} = дочекайтесь опублікування на сайті уповноваженого органу
... ... @@ -74,10 +77,8 @@ ${plan_form_add_item_btn_locator} = jquery=#Item
74 77 ${plan_form_update_item_btn_locator_tpl} = jquery=#Items .js-form-popup-panel:nth(%index%) .panel-heading .js-form-popup-update
75 78 ${plan_form_remove_item_btn_locator_tpl} = jquery=#Items .js-form-popup-panel[data-title*="%title%"] .panel-heading .js-form-popup-remove
76 79 ${plan_form_submit_btn_locator} = jquery=#plan-form .js-submit-btn
  80 +${plan_form_update_buyer_btn_locator} = jquery=#Buyer .js-form-popup-update
77 81 ${plan_created_checker_element_locator} = id=plan-part-pjax
78   -${plan_form_add_buyer_btn_locator} = jquery=#Buyer .js-form-popup-update
79   -${plan_form_add_buyer_legalName_input_locator} = jquery=#planform-procuring_entity_name
80   -${plan_form_add_buyer_id_input_locator} = jquery=#planform-procuring_entity_identifier_code
81 82
82 83 # plan view
83 84 ${plan_view_checker_element_locator} = id=plan-general-info
... ...
Please register or login to post a comment