Showing
1 changed file
with
283 additions
and
0 deletions
publicbid_claim.robot
0 → 100644
1 | +*** Settings *** | ||
2 | + | ||
3 | +Resource playtender_common.robot | ||
4 | +Resource playtender_claim_variables.robot | ||
5 | + | ||
6 | +*** Keywords *** | ||
7 | + | ||
8 | + | ||
9 | +Створити вимогу | ||
10 | + [Arguments] ${username} ${tender_uaid} ${type} ${type_id} ${claim} ${doc_name} | ||
11 | + [Documentation] Створити вимогу з claim в описі для тендера tender_uaid. | ||
12 | + | ||
13 | + open tender page by uaid ${tender_uaid} | ||
14 | + click visible element ${claim_page_open_btn_locator} | ||
15 | + capture page screenshot | ||
16 | + wait until page contains element with reloading ${claim_form_open_btn_locator} | ||
17 | + open popup by btn locator ${claim_form_open_btn_locator} | ||
18 | + capture page screenshot | ||
19 | + input text to exist visible input ${claim_form_complaintform_title_input_locator} ${claim.data.title} | ||
20 | + capture page screenshot | ||
21 | + input text to exist visible input ${claim_form_complaintform_description_input_locator} ${claim.data.description} | ||
22 | + capture page screenshot | ||
23 | + Run Keyword And Ignore Error Run Keyword If '${type}' == 'tender' Select From List By Label ${claim_form_complaintform_related_of_input_locator} Закупівля | ||
24 | + capture page screenshot | ||
25 | + Run Keyword And Ignore Error Run Keyword If '${type}' == 'lot' Select From List By Label ${claim_form_complaintform_related_of_input_locator} Лот | ||
26 | + capture page screenshot | ||
27 | + Run Keyword And Ignore Error Run Keyword If '${type}' == 'lot' Click Element ${claim_form_complaintform_related_lot_input_locator} | ||
28 | + ${claim_form_complaintform_related_lot_select_locator} = Run Keyword If '${type}' == 'lot' replace string ${claim_form_complaintform_related_lot_input_locator_tpl} %type_id% ${type_id} | ||
29 | + Run Keyword And Ignore Error Run Keyword If '${type}' == 'lot' Click Element ${claim_form_complaintform_related_lot_select_locator} | ||
30 | + capture page screenshot | ||
31 | + Run Keyword And Ignore Error Select From List By Label ${claim_form_complaintform_complaintform_type_input_locator} Вимога | ||
32 | + Run Keyword And Ignore Error Run Keyword If '${type}' == 'winner_complaint' or '${claim.data.type}' == 'complaint' Select From List By Label ${claim_form_complaintform_complaintform_type_input_locator} Скарга | ||
33 | + | ||
34 | + capture page screenshot | ||
35 | +### Run Keyword If '${doc_name}' != 'null' click visible element ${claim_form_complaintform_document_btn_locator} | ||
36 | + capture page screenshot | ||
37 | + Run Keyword If '${doc_name}' != 'null' choose file ${add_file_to_form_locator} ${doc_name} | ||
38 | + capture page screenshot | ||
39 | + Run Keyword If '${doc_name}' != 'null' wait until page does not contain element ${popup_dynamic_form_loading_element_locator} | ||
40 | + capture page screenshot | ||
41 | +# Run Keyword If '${doc_name}' != 'null' submit current visible popup | ||
42 | + submit form and check result ${claim_form_complaintform_submit_btn_locator} ${claim_form_submit_success_msg} ${tender_created_checker_element_locator} | ||
43 | +# Функция ожидания claim_uaid_text_locator соответствующей вимоги | ||
44 | +# click visible element ${claim_form_open_btn_locator} | ||
45 | + reload page | ||
46 | + wait until page does not contain element with reloading ${claim_sync_element_locator} 60 | ||
47 | + wait until page contains element with reloading ${claim_uaid_text_locator} | ||
48 | + ${return_value}= get text ${claim_uaid_text_locator} | ||
49 | + ${return_value}= Convert To String ${return_value} | ||
50 | + [return] ${return_value} | ||
51 | + | ||
52 | +Скасувати вимогу | ||
53 | + [Arguments] ${username} ${tender_uaid} ${complaintID} ${cancellation_data} ${award_index} | ||
54 | + [Documentation] Перевести вимогу complaintID для тендера tender_uaid у статус cancelled, | ||
55 | + ... використовуючи при цьому дані confirmation_data. | ||
56 | + | ||
57 | + open tender page by uaid ${tender_uaid} | ||
58 | + click visible element and wait until page contains element ${claim_page_open_btn_locator} ${claim_form_open_btn_locator} | ||
59 | + ${claim_open_form_answer_locator} = replace string ${claim_open_form_answer_btn_locator_tpl} %title% ${complaintID} | ||
60 | + wait until page contains element with reloading ${claim_open_form_answer_locator} | ||
61 | + ${claim_form_cancel_open_btn_locator} = replace string ${claim_form_cancel_open_btn_locator_tpl} %complaint_id% ${complaintID} | ||
62 | + wait until page contains element with reloading ${claim_form_cancel_open_btn_locator} | ||
63 | + open popup by btn locator ${claim_form_cancel_open_btn_locator} | ||
64 | + capture page screenshot | ||
65 | + input text to exist visible input ${claim_form_cancellation_reason_input_locator} ${cancellation_data.data.cancellationReason} | ||
66 | + capture page screenshot | ||
67 | + submit form and check result ${claim_form_complaintform_submit_btn_locator} ${claim_cancel_submit_success_msg} ${tender_created_checker_element_locator} | ||
68 | + | ||
69 | +get claim information | ||
70 | + [Arguments] ${tender_uaid} ${complaintID} ${field_name} ${award_index}=${None} | ||
71 | + [Documentation] Отримати значення поля field_name скарги/вимоги complaintID про | ||
72 | + ... виправлення умов закупівлі/лоту для тендера tender_uaid (скарги/вимоги про | ||
73 | + ... виправлення визначення переможця під номером award_index, якщо award_index != None). | ||
74 | + | ||
75 | + open tender page by uaid ${tender_uaid} | ||
76 | + click visible element ${claim_page_open_btn_locator} | ||
77 | + capture page screenshot | ||
78 | + ${claim_open_form_answer_locator} = replace string ${claim_open_form_answer_btn_locator_tpl} %title% ${complaintID} | ||
79 | + wait until page contains element with reloading ${claim_open_form_answer_locator} | ||
80 | + capture page screenshot | ||
81 | + | ||
82 | + ${claim_wrapper_complain_id_value_locator} = set variable ${claim_open_form_answer_locator} | ||
83 | +# ${claim_wrapper_complaint_id_value_locator} = replace string ${claim_wrapper_complain_id_value_locator_tpl} %complain_id% ${complaintID} | ||
84 | + ${claim_description_value_locator} = Run Keyword If 'description' == '${field_name}' set variable ${claim_wrapper_complain_id_value_locator} ${claim_description_value_locator} | ||
85 | + ${claim_title_value_locator} = Run Keyword If 'title' == '${field_name}' set variable ${claim_wrapper_complain_id_value_locator} ${claim_title_value_locator} | ||
86 | + ${claim_complain_id_value_locator} = Run Keyword If 'complaintID' == '${field_name}' set variable ${claim_wrapper_complain_id_value_locator} ${claim_complain_id_value_locator} | ||
87 | + ${claim_status_value_locator} = Run Keyword If 'status' == '${field_name}' set variable ${claim_wrapper_complain_id_value_locator} ${claim_status_value_locator} | ||
88 | + ${claim_resolution_type_value_locator} = Run Keyword If 'resolutionType' == '${field_name}' set variable ${claim_wrapper_complain_id_value_locator} ${claim_resolution_type_value_locator} | ||
89 | + ${claim_resolution_value_locator} = Run Keyword If 'resolution' == '${field_name}' set variable ${claim_wrapper_complain_id_value_locator} ${claim_resolution_value_locator} | ||
90 | + ${claim_satisfied_value_locator} = Run Keyword If 'satisfied' == '${field_name}' set variable ${claim_wrapper_complain_id_value_locator} ${claim_satisfied_value_locator} | ||
91 | + ${claim_related_lot_value_locator} = Run Keyword If 'relatedLot' == '${field_name}' set variable ${claim_wrapper_complain_id_value_locator} ${claim_related_lot_value_locator} | ||
92 | + ${claim_cancellation_reason_value_locator} = Run Keyword If 'cancellationReason' == '${field_name}' set variable ${claim_wrapper_complain_id_value_locator} ${claim_cancellation_reason_value_locator} | ||
93 | + | ||
94 | + Run Keyword If "${TEST_NAME}" == "Можливість відповісти на вимогу про виправлення умов закупівлі" Wait Until Keyword Succeeds 420 s 15 s Wait For Answered ${complaintID} ${claim_wrapper_complain_id_value_locator} | ||
95 | + Run Keyword If "${TEST_NAME}" == "Можливість відповісти на вимогу про виправлення умов лоту" Wait Until Keyword Succeeds 420 s 15 s Wait For Answered ${complaintID} ${claim_wrapper_complain_id_value_locator} | ||
96 | + Run Keyword If "Відображення статусу 'answered'" in "${TEST_NAME}" Wait Until Keyword Succeeds 300 s 15 s Wait For Answered ${complaintID} ${claim_wrapper_complain_id_value_locator} | ||
97 | + Run Keyword If "${TEST_NAME}" == "Відображення задоволення вимоги" Wait Until Keyword Succeeds 300 s 15 s Wait For Satisfied ${complaintID} ${claim_wrapper_complain_id_value_locator} | ||
98 | + Run Keyword If "${TEST_NAME}" == "Відображення незадоволення вимоги" Wait Until Keyword Succeeds 300 s 15 s Wait For Satisfied ${complaintID} ${claim_wrapper_complain_id_value_locator} | ||
99 | + Run Keyword If "Відображення статусу 'resolved'" in "${TEST_NAME}" Wait Until Keyword Succeeds 300 s 15 s Wait For Resolved ${complaintID} ${claim_wrapper_complain_id_value_locator} | ||
100 | + Run Keyword If "Відображення статусу 'cancelled'" in "${TEST_NAME}" Wait Until Keyword Succeeds 300 s 15 s Wait For Cancelled ${complaintID} ${claim_wrapper_complain_id_value_locator} | ||
101 | + Run Keyword If "Відображення статусу 'ignored'" in "${TEST_NAME}" Wait Until Keyword Succeeds 300 s 15 s Wait For Ignored ${complaintID} ${claim_wrapper_complain_id_value_locator} | ||
102 | + Run Keyword If "Відображення статусу 'stopping'" in "${TEST_NAME}" Wait Until Keyword Succeeds 300 s 15 s Wait For Stopping ${complaintID} ${claim_wrapper_complain_id_value_locator} | ||
103 | + Run Keyword If "Відображення статусу 'pending'" in "${TEST_NAME}" Wait Until Keyword Succeeds 300 s 15 s Wait For Pending ${complaintID} ${claim_wrapper_complain_id_value_locator} | ||
104 | + Run Keyword And Ignore Error Run Keyword If "Відображення кінцевих статусів двох останніх вимог" in "${TEST_NAME}" Wait Until Keyword Succeeds 30 s 5 s Wait For Invalid ${complaintID} ${claim_wrapper_complain_id_value_locator} | ||
105 | + Run Keyword And Ignore Error Run Keyword If "Відображення кінцевих статусів двох останніх вимог" in "${TEST_NAME}" Wait Until Keyword Succeeds 30 s 5 s Wait For Declined ${complaintID} ${claim_wrapper_complain_id_value_locator} | ||
106 | + | ||
107 | + Run Keyword And Return If 'description' == '${field_name}' get value by locator on opened page ${claim_description_value_locator} | ||
108 | + Run Keyword And Return If 'complaintID' == '${field_name}' get value by locator on opened page ${claim_complain_id_value_locator} | ||
109 | + Run Keyword And Return If 'title' == '${field_name}' get value by locator on opened page ${claim_title_value_locator} | ||
110 | + Run Keyword And Return If 'status' == '${field_name}' get value by locator on opened page ${claim_status_value_locator} | ||
111 | + Run Keyword And Return If 'resolutionType' == '${field_name}' get value by locator on opened page ${claim_resolution_type_value_locator} | ||
112 | + Run Keyword And Return If 'resolution' == '${field_name}' get value by locator on opened page ${claim_resolution_value_locator} | ||
113 | + Run Keyword And Return If 'satisfied' == '${field_name}' Отримати інформацію із скарги satisfied ${claim_satisfied_value_locator} | ||
114 | + Run Keyword And Return If 'relatedLot' == '${field_name}' get value by locator on opened page ${claim_related_lot_value_locator} | ||
115 | + Run Keyword And Return If 'cancellationReason' == '${field_name}' get value by locator on opened page ${claim_cancellation_reason_value_locator} | ||
116 | + | ||
117 | +Отримати інформацію із документа скарги title | ||
118 | + [Arguments] ${complaintID} ${doc_id} | ||
119 | + [Documentation] Отримати значення поля title з документу з doc_id в описі для скарги для тендера. | ||
120 | + | ||
121 | + click visible element ${claim_page_open_btn_locator} | ||
122 | + ${claim_open_form_answer_locator} = replace string ${claim_open_form_answer_btn_locator_tpl} %title% ${complaintID} | ||
123 | + wait until page contains element with reloading ${claim_open_form_answer_locator} | ||
124 | + ${claim_file_name_input_locator} = replace string ${claim_file_name_input_locator_tpl} %complain_id% ${complaintID} | ||
125 | +# wait until page contains element with reloading ${claim_file_name_input_locator} | ||
126 | + | ||
127 | + ${return_value} = get text ${claim_file_name_input_locator} | ||
128 | + [return] ${return_value} | ||
129 | + | ||
130 | +get document complaint | ||
131 | + [Arguments] ${complaintID} ${doc_id} | ||
132 | + [Documentation] Завантажити файл doc_id до скарги complaintID для тендера tender_uaid | ||
133 | + ... в директорію ${OUTPUT_DIR} для перевірки вмісту цього файлу. | ||
134 | + | ||
135 | + ${claim_file_name_input_locator} = replace string ${claim_file_name_input_locator_tpl} %complain_id% ${complaintID} | ||
136 | + wait until page contains element with reloading ${claim_file_name_input_locator} | ||
137 | + ${claim_file_link_input_locator} = replace string ${claim_file_link_input_locator_tpl} %complain_id% ${complaintID} | ||
138 | + ${claim_file_name_input_locator} = replace string ${claim_file_name_input_locator_tpl} %complain_id% ${complaintID} | ||
139 | + wait until page contains element with reloading ${tender_new_doc_locator} | ||
140 | + | ||
141 | + ${file_link} = Execute Javascript ${claim_file_link_input_locator} | ||
142 | + ${file_name} = get text ${claim_file_name_input_locator} | ||
143 | + download_file ${file_link} ${file_name} ${OUTPUT_DIR} | ||
144 | + [return] ${file_name} | ||
145 | + | ||
146 | + | ||
147 | +Підтвердити вирішення вимоги | ||
148 | + [Arguments] ${username} ${tender_uaid} ${type} ${type_id} ${complaintID} ${data} ${award_index} | ||
149 | + [Documentation] Підтвердити вирішення вимоги | ||
150 | + | ||
151 | + open tender page by uaid ${tender_uaid} | ||
152 | + click visible element ${claim_page_open_btn_locator} | ||
153 | + click visible element and wait until page contains element ${claim_page_open_btn_locator} ${claim_form_open_btn_locator} | ||
154 | + ${claim_form_resolved_input_locator} = replace string ${claim_form_resolved_input_locator_tpl} %complaint_id% ${complaintID} | ||
155 | + open popup by btn locator ${claim_form_resolved_input_locator} | ||
156 | + ${value} = Set Variable If '${data.data.satisfied}' Задоволен Не задоволен | ||
157 | + run keyword and ignore error select from visible list by label ${claim_form_satisfied_input_locator} ${value} | ||
158 | + capture page screenshot | ||
159 | + submit form and check result ${claim_form_complaintform_submit_btn_locator} ${claim_form_satisfied_submit_success_msg} ${None} | ||
160 | + | ||
161 | + | ||
162 | +Відповісти на вимогу | ||
163 | + [Arguments] ${username} ${tender_uaid} ${complaintID} ${answer_data} ${award_index} | ||
164 | + [Documentation] Відповісти на вимогу complaintID | ||
165 | + ... для тендера tender_uaid, використовуючи при цьому дані answer_data. | ||
166 | + | ||
167 | + open tender page by uaid ${tender_uaid} | ||
168 | + click visible element ${claim_page_open_btn_locator} | ||
169 | + ${claim_open_form_answer_locator} = replace string ${claim_open_form_answer_btn_locator_tpl} %title% ${complaintID} | ||
170 | + wait until page contains element with reloading ${claim_open_form_answer_locator} | ||
171 | + ${claim_form_open_form_answer_btn_locator} = replace string ${claim_form_open_form_answer_btn_locator_tpl} %title% ${complaintID} | ||
172 | + wait until page contains element with reloading ${claim_form_open_form_answer_btn_locator} | ||
173 | + open popup by btn locator ${claim_form_open_form_answer_btn_locator} | ||
174 | + input text to exist visible input ${claim_form_answer_resolution_value_locator} ${answer_data.data.resolution} | ||
175 | + Run Keyword If '${answer_data.data.resolutionType}' == 'resolved' select from list by value ${claim_form_answer_resolution_type_value_locator} resolved | ||
176 | + Run Keyword If '${answer_data.data.resolutionType}' == 'declined' select from list by value ${claim_form_answer_resolution_type_value_locator} declined | ||
177 | + Run Keyword If '${answer_data.data.resolutionType}' == 'invalid' select from list by value ${claim_form_answer_resolution_type_value_locator} invalid | ||
178 | + Run Keyword And Ignore Error input text to exist visible input ${claim_form_answer_tenderer_action_value_locator} ${answer_data.data.tendererAction} | ||
179 | + submit form and check result ${claim_form_answer_success_btn_locator} ${claim_form_answer_submit_success_msg} | ||
180 | + | ||
181 | + | ||
182 | +Wait For Answered | ||
183 | + [Arguments] ${complaintID} ${wrapper} | ||
184 | + [Documentation] Очікування статусу Answered вимоги complaintID | ||
185 | + ... для тендера tender_uaid. | ||
186 | + | ||
187 | + Reload Page | ||
188 | + ${claim_form_status_locator} = replace string ${claim_form_status_locator_tpl} %query% answered | ||
189 | + ${claim_status_value_locator} = set variable ${wrapper} ${claim_form_status_locator} | ||
190 | + Page Should Contain Element ${claim_status_value_locator} | ||
191 | + | ||
192 | +Wait For Satisfied | ||
193 | + [Arguments] ${complaintID} ${wrapper} | ||
194 | + [Documentation] Очікування статусу Answered вимоги complaintID | ||
195 | + ... для тендера tender_uaid. | ||
196 | + | ||
197 | + Reload Page | ||
198 | + ${claim_form_satisfied_value_locator} = replace string ${claim_form_satisfied_value_locator_tpl} %query% Так | ||
199 | + ${claim_form_satisfied_value_locator_tmp} = set variable ${wrapper} ${claim_form_satisfied_value_locator} | ||
200 | + Page Should Contain Element ${claim_form_satisfied_value_locator_tmp} | ||
201 | + | ||
202 | +Wait For Resolved | ||
203 | + [Arguments] ${complaintID} ${wrapper} | ||
204 | + [Documentation] Очікування статусу Answered вимоги complaintID | ||
205 | + ... для тендера tender_uaid. | ||
206 | + | ||
207 | + Reload Page | ||
208 | + ${claim_form_resolved_value_locator} = replace string ${claim_form_status_locator_tpl} %query% resolved | ||
209 | + ${claim_form_resolved_value_locator_tmp} = set variable ${wrapper} ${claim_form_resolved_value_locator} | ||
210 | + Page Should Contain Element ${claim_form_resolved_value_locator_tmp} | ||
211 | + | ||
212 | +Wait For Cancelled | ||
213 | + [Arguments] ${complaintID} ${wrapper} | ||
214 | + [Documentation] Очікування статусу Answered вимоги complaintID | ||
215 | + ... для тендера tender_uaid. | ||
216 | + | ||
217 | + Reload Page | ||
218 | + ${claim_form_status_locator} = replace string ${claim_form_status_locator_tpl} %query% cancelled | ||
219 | + ${claim_status_value_locator} = set variable ${wrapper} ${claim_form_status_locator} | ||
220 | + Page Should Contain Element ${claim_status_value_locator} | ||
221 | + | ||
222 | +Wait For Ignored | ||
223 | + [Arguments] ${complaintID} ${wrapper} | ||
224 | + [Documentation] Очікування статусу Answered вимоги complaintID | ||
225 | + ... для тендера tender_uaid. | ||
226 | + | ||
227 | + Reload Page | ||
228 | + ${claim_form_status_locator} = replace string ${claim_form_status_locator_tpl} %query% ignored | ||
229 | + ${claim_status_value_locator} = set variable ${wrapper} ${claim_form_status_locator} | ||
230 | + Page Should Contain Element ${claim_status_value_locator} | ||
231 | + | ||
232 | +Wait For Stopping | ||
233 | + [Arguments] ${complaintID} ${wrapper} | ||
234 | + [Documentation] Очікування статусу Answered вимоги complaintID | ||
235 | + ... для тендера tender_uaid. | ||
236 | + | ||
237 | + Reload Page | ||
238 | + ${claim_form_status_locator} = replace string ${claim_form_status_locator_tpl} %query% stopping | ||
239 | + ${claim_status_value_locator} = set variable ${wrapper} ${claim_form_status_locator} | ||
240 | + Page Should Contain Element ${claim_status_value_locator} | ||
241 | + | ||
242 | +Wait For Pending | ||
243 | + [Arguments] ${complaintID} ${wrapper} | ||
244 | + [Documentation] Очікування статусу Pending вимоги complaintID | ||
245 | + ... для тендера tender_uaid. | ||
246 | + | ||
247 | + Reload Page | ||
248 | + ${claim_form_status_locator} = replace string ${claim_form_status_locator_tpl} %query% pending | ||
249 | + ${claim_status_value_locator} = set variable ${wrapper} ${claim_form_status_locator} | ||
250 | + Page Should Contain Element ${claim_status_value_locator} | ||
251 | + | ||
252 | +Отримати інформацію із скарги satisfied | ||
253 | + [Arguments] ${wrapper} | ||
254 | + [Documentation] Отримати інформацію із скарги satisfied | ||
255 | + | ||
256 | + | ||
257 | + ${return_value} = get value by locator on opened page ${wrapper} | ||
258 | + ${return_value} = Run Keyword If 'Так' == '${return_value}' Set Variable True | ||
259 | + ... ELSE Set Variable False | ||
260 | + ${return_value} = Convert To Boolean ${return_value} | ||
261 | + [return] ${return_value} | ||
262 | + | ||
263 | +Wait For Invalid | ||
264 | + [Arguments] ${complaintID} ${wrapper} | ||
265 | + [Documentation] Очікування статусу Invalid вимоги complaintID | ||
266 | + ... для тендера tender_uaid. | ||
267 | + | ||
268 | + Reload Page | ||
269 | + ${claim_form_status_locator} = replace string ${claim_form_status_locator_tpl} %query% invalid | ||
270 | + ${claim_status_value_locator} = set variable ${wrapper} ${claim_form_status_locator} | ||
271 | + Page Should Contain Element ${claim_status_value_locator} | ||
272 | + | ||
273 | +Wait For Declined | ||
274 | + [Arguments] ${complaintID} ${wrapper} | ||
275 | + [Documentation] Очікування статусу declined вимоги complaintID | ||
276 | + ... для тендера tender_uaid. | ||
277 | + | ||
278 | + Reload Page | ||
279 | + ${claim_form_status_locator} = replace string ${claim_form_status_locator_tpl} %query% declined | ||
280 | + ${claim_status_value_locator} = set variable ${wrapper} ${claim_form_status_locator} | ||
281 | + Page Should Contain Element ${claim_status_value_locator} | ||
282 | + | ||
283 | + |
Please
register
or
login
to post a comment