Commit 7292a02c18938e1718b937e8fbcf0198d24823db
1 parent
8494c6f0
Edit openUAdefense_one_bid and single_item_tender scenarios
Showing
3 changed files
with
7 additions
and
1042 deletions
1 | -*** Settings *** | |
2 | -Library op_robot_tests.tests_files.service_keywords | |
3 | -Library String | |
4 | -Library Collections | |
5 | -Library Selenium2Library | |
6 | -Library OperatingSystem | |
7 | -Library DateTime | |
8 | -Library DebugLibrary | |
9 | - | |
10 | - | |
11 | -Documentation | |
12 | -... This resource file contains keywords that are used directly by | |
13 | -... test suites or by brokers' keyword libraries (also known as drivers). | |
14 | - | |
15 | - | |
16 | -*** Keywords *** | |
17 | -Test Suite Setup | |
18 | - Set Suite Variable ${WARN_RUN_AS} ${False} | |
19 | - Set Selenium Implicit Wait 5 s | |
20 | - Set Selenium Timeout 10 s | |
21 | - Залогувати git-дані | |
22 | - Порівняти системний і серверний час | |
23 | - Завантажуємо дані про користувачів і майданчики | |
24 | - | |
25 | - | |
26 | -Test Suite Teardown | |
27 | - Close all browsers | |
28 | - Run Keyword And Ignore Error Створити артефакт | |
29 | - | |
30 | - | |
31 | -Set Suite Variable With Default Value | |
32 | - [Arguments] ${suite_var} ${def_value} | |
33 | - ${tmp}= Get Variable Value ${${suite_var}} ${def_value} | |
34 | - Set Suite Variable ${${suite_var}} ${tmp} | |
35 | - | |
36 | - | |
37 | -Порівняти системний і серверний час | |
38 | - ${server_time}= request ${API_HOST_URL} HEAD | |
39 | - ${local_time}= Get current TZdate | |
40 | - Log ${server_time.headers['date']} | |
41 | - Log ${local_time} | |
42 | - ${status}= compare_date ${server_time.headers['date']} ${local_time} 5 | |
43 | - Run keyword if ${status} == ${False} | |
44 | - ... Log Час на сервері відрізняється від локального більше ніж на 5 секунд WARN | |
45 | - | |
46 | - | |
47 | -Залогувати git-дані | |
48 | - ${commit}= Run git log --graph --pretty --abbrev-commit --date=relative -n 30 | |
49 | - ${repo}= Run git remote -v | |
50 | - ${branch}= Run git branch -vva | |
51 | - ${status}= Run git status | |
52 | - ${diff}= Run git diff | |
53 | - ${reflog}= Run git reflog | |
54 | - Log ${commit} | |
55 | - Log ${repo} | |
56 | - Log ${branch} | |
57 | - Log ${status} | |
58 | - Log ${diff} | |
59 | - Log ${reflog} | |
60 | - | |
61 | - | |
62 | -Завантажуємо дані про користувачів і майданчики | |
63 | - Log ${BROKER} | |
64 | - Log ${ROLE} | |
65 | - # Suite variable; should be present in every test suite | |
66 | - # in `*** Variables ***` section | |
67 | - Log Many @{USED_ROLES} | |
68 | - | |
69 | - # Load brokers data | |
70 | - ${file_path}= Get Variable Value ${BROKERS_FILE} brokers.yaml | |
71 | - ${BROKERS_PARAMS}= Get Variable Value ${BROKERS_PARAMS} | |
72 | - ${BROKERS}= load_data_from ${file_path} mode=brokers external_params_name=BROKERS_PARAMS | |
73 | - Log ${BROKERS} | |
74 | - Set Suite Variable ${BROKERS} | |
75 | - # List of currently used brokers | |
76 | - ${used_brokers}= Create List | |
77 | - | |
78 | - # Load users data | |
79 | - ${file_path}= Get Variable Value ${USERS_FILE} users.yaml | |
80 | - ${USERS_PARAMS}= Get Variable Value ${USERS_PARAMS} | |
81 | - ${USERS}= load_data_from ${file_path} users.yaml external_params_name=USERS_PARAMS | |
82 | - Log ${USERS.users} | |
83 | - Set Suite Variable ${USERS} | |
84 | - # List of currently used users | |
85 | - ${used_users}= Create List | |
86 | - | |
87 | - # Handle `-v role:something` | |
88 | - Run Keyword Unless '${ROLE}' in @{USED_ROLES} | |
89 | - ... Log | |
90 | - ... Role ${ROLE} is not used in this test suite. | |
91 | - ... WARN | |
92 | - Set Suite Variable With Default Value | |
93 | - ... ${ROLE} | |
94 | - ... ${BROKERS['${BROKER}'].roles.${ROLE}} | |
95 | - | |
96 | - # Set default value for each role if it is not set yet; | |
97 | - # fill `used_users`; | |
98 | - # fill `used_brokers`. | |
99 | - # | |
100 | - # Don't even ask how this works! | |
101 | - :FOR ${tmp_role} IN @{USED_ROLES} | |
102 | - \ Set Suite Variable With Default Value | |
103 | - \ ... ${tmp_role} | |
104 | - \ ... ${BROKERS['Quinta'].roles.${tmp_role}} | |
105 | - \ Append To List ${used_users} ${${tmp_role}} | |
106 | - \ Append To List ${used_brokers} ${USERS.users.${${tmp_role}}.broker} | |
107 | - # Since `@{USED_ROLES}` is already a suite variable, | |
108 | - # let's make `@{used_brokers}` alike. | |
109 | - ${used_brokers}= Remove Duplicates ${used_brokers} | |
110 | - Set Suite Variable ${used_brokers} | |
111 | - # We need to create two lists since Robot Framework doesn't support | |
112 | - # dicts in `:FOR` loops. | |
113 | - Log Many @{used_users} | |
114 | - Log Many @{used_brokers} | |
115 | - | |
116 | - # A list of all users in users file | |
117 | - ${known_users}= Get Dictionary Keys ${USERS.users} | |
118 | - | |
119 | - # Check whether users file contains an entry for each | |
120 | - # selected user before preparing any clients | |
121 | - :FOR ${username} IN @{used_users} | |
122 | - \ List Should Contain Value | |
123 | - \ ... ${known_users} | |
124 | - \ ... ${username} | |
125 | - \ ... msg=User ${username} not found in users file! | |
126 | - | |
127 | - # Prepare a client for each user | |
128 | - :FOR ${username} IN @{used_users} | |
129 | - \ ${munch_dict}= munch_dict data=${True} | |
130 | - \ ${keywords_file}= Get Broker Property ${USERS.users.${username}.broker} keywords_file | |
131 | - \ Завантажуємо бібліотеку з реалізацією для майданчика ${keywords_file} | |
132 | - \ Run As ${username} Підготувати клієнт для користувача | |
133 | - \ ${LAST_REFRESH_DATE}= Get Current TZdate | |
134 | - \ Set To Dictionary ${USERS} ${username}=${USERS.users.${username}} | |
135 | - \ Set To Dictionary ${USERS.${username}} tender_data=${munch_dict} | |
136 | - \ Set To Dictionary ${USERS.${username}} LAST_REFRESH_DATE ${LAST_REFRESH_DATE} | |
137 | - | |
138 | - # Drop all unused users | |
139 | - Keep In Dictionary ${USERS.users} @{used_users} | |
140 | - Log Many @{USERS} | |
141 | - | |
142 | - | |
143 | -Get Broker Property | |
144 | - [Arguments] ${broker_name} ${property} | |
145 | - [Documentation] | |
146 | - ... This keyword returns a property of specified broker | |
147 | - ... if that property exists, otherwise, it returns a | |
148 | - ... default value. | |
149 | - Run Keyword If '${broker_name}'=='${None}' Fail \${broker_name} is NoneType | |
150 | - Should Contain ${BROKERS['${broker_name}']} ${property} | |
151 | - Return From Keyword ${BROKERS['${broker_name}'].${property}} | |
152 | - | |
153 | - | |
154 | -Get Broker Property By Username | |
155 | - [Documentation] | |
156 | - ... This keyword gets the corresponding broker name | |
157 | - ... for a specified username and then calls | |
158 | - ... "Get Broker Property" | |
159 | - [Arguments] ${username} ${property} | |
160 | - ${broker_name}= Get Variable Value ${USERS.users['${username}'].broker} | |
161 | - Run Keyword And Return Get Broker Property ${broker_name} ${property} | |
162 | - | |
163 | - | |
164 | -Створити артефакт | |
165 | - ${artifact}= Create Dictionary | |
166 | - ... api_version=${API_VERSION} | |
167 | - ... tender_uaid=${TENDER['TENDER_UAID']} | |
168 | - ... last_modification_date=${TENDER['LAST_MODIFICATION_DATE']} | |
169 | - ... mode=${MODE} | |
170 | - Run Keyword And Ignore Error Set To Dictionary ${artifact} | |
171 | - ... tender_owner=${USERS.users['${tender_owner}'].broker} | |
172 | - ... access_token=${USERS.users['${tender_owner}'].access_token} | |
173 | - ... tender_id=${USERS.users['${tender_owner}'].tender_data.data.id} | |
174 | - Run Keyword And Ignore Error Set To Dictionary ${artifact} tender_owner_access_token=${USERS.users['${tender_owner}'].access_token} | |
175 | - Run Keyword And Ignore Error Set To Dictionary ${artifact} provider_access_token=${USERS.users['${provider}'].access_token} | |
176 | - Run Keyword And Ignore Error Set To Dictionary ${artifact} provider1_access_token=${USERS.users['${provider1}'].access_token} | |
177 | - Run Keyword And Ignore Error Set To Dictionary ${artifact} provider_bid_id=${USERS.users['${provider}'].bid_id} | |
178 | - Run Keyword And Ignore Error Set To Dictionary ${artifact} provider1_bid_id=${USERS.users['${provider1}'].bid_id} | |
179 | - Run Keyword And Ignore Error Set To Dictionary ${artifact} | |
180 | - ... tender_file_properties=${USERS.users['${tender_owner}'].tender_document.file_properties} | |
181 | - ... lot_file_properties=${USERS.users['${tender_owner}'].lots_documents[0].file_properties} | |
182 | - ${status} ${lots_ids}= Run Keyword And Ignore Error Отримати ідентифікатори об’єктів ${viewer} lots | |
183 | - Run Keyword If '${status}'=='PASS' | |
184 | - ... Set To Dictionary ${artifact} lots=${lots_ids} | |
185 | - Log ${artifact} | |
186 | - log_object_data ${artifact} file_name=artifact update=${True} artifact=${True} | |
187 | - | |
188 | - | |
189 | -Завантажити дані про тендер | |
190 | - ${file_path}= Get Variable Value ${ARTIFACT_FILE} artifact.yaml | |
191 | - ${ARTIFACT}= load_data_from ${file_path} | |
192 | - Run Keyword And Ignore Error Set To Dictionary ${USERS.users['${tender_owner}']} access_token=${ARTIFACT.access_token} | |
193 | - ${TENDER}= Create Dictionary | |
194 | - ... TENDER_UAID=${ARTIFACT.tender_uaid} | |
195 | - ... LAST_MODIFICATION_DATE=${ARTIFACT.last_modification_date} | |
196 | - ... LOT_ID=${Empty} | |
197 | - ${lot_index}= Get Variable Value ${lot_index} 0 | |
198 | - Run Keyword And Ignore Error Set To Dictionary ${TENDER} LOT_ID=${ARTIFACT.lots[${lot_index}]} | |
199 | - ${MODE}= Get Variable Value ${MODE} ${ARTIFACT.mode} | |
200 | - Run Keyword And Ignore Error Set To Dictionary ${USERS.users['${tender_owner}']} access_token=${ARTIFACT.tender_owner_access_token} | |
201 | - Run Keyword And Ignore Error Set To Dictionary ${USERS.users['${viewer}']} tender_file_properties=${ARTIFACT.tender_file_properties} | |
202 | - Run Keyword And Ignore Error Set To Dictionary ${USERS.users['${viewer}']} lot_file_properties=${ARTIFACT.lot_file_properties} | |
203 | - Run Keyword And Ignore Error Set To Dictionary ${USERS.users['${provider}']} access_token=${ARTIFACT.provider_access_token} | |
204 | - Run Keyword And Ignore Error Set To Dictionary ${USERS.users['${provider1}']} access_token=${ARTIFACT.provider1_access_token} | |
205 | - Run Keyword And Ignore Error Set To Dictionary ${USERS.users['${provider}']} bid_id=${ARTIFACT.provider_bid_id} | |
206 | - Run Keyword And Ignore Error Set To Dictionary ${USERS.users['${provider1}']} bid_id=${ARTIFACT.provider1_bid_id} | |
207 | - Set Suite Variable ${MODE} | |
208 | - Set Suite Variable ${lot_index} | |
209 | - Set Suite Variable ${TENDER} | |
210 | - log_object_data ${ARTIFACT} file_name=artifact update=${True} artifact=${True} | |
211 | - | |
212 | - | |
213 | -Підготувати дані для створення тендера | |
214 | - [Arguments] ${tender_parameters} | |
215 | - ${period_intervals}= compute_intrs ${BROKERS} ${used_brokers} | |
216 | - ${submissionMethodDetails}= Get Variable Value ${submissionMethodDetails} | |
217 | - ${accelerator}= Get Variable Value ${accelerator} | |
218 | - ${funders}= Get Variable Value ${FUNDERS} | |
219 | - ${tender_data}= prepare_test_tender_data ${period_intervals} ${tender_parameters} ${submissionMethodDetails} ${accelerator} ${funders} | |
220 | - ${TENDER}= Create Dictionary | |
221 | - Set Global Variable ${TENDER} | |
222 | - Log ${tender_data} | |
223 | - [return] ${tender_data} | |
224 | - | |
225 | - | |
226 | -Підготувати дані для створення плану | |
227 | - [Arguments] ${tender_parameters} | |
228 | - ${data}= test_tender_data_planning ${tender_parameters} | |
229 | - ${tender_data}= Create Dictionary data=${data} | |
230 | - ${TENDER}= Create Dictionary | |
231 | - Set Global Variable ${TENDER} | |
232 | - Log ${tender_data} | |
233 | - [return] ${tender_data} | |
234 | - | |
235 | - | |
236 | -Підготувати дані для створення предмету закупівлі | |
237 | - [Arguments] ${cpv} | |
238 | - ${index}= Set variable if ${moz_integration} 3 4 | |
239 | - ${item}= test_item_data ${cpv[:${index}]} | |
240 | - [Return] ${item} | |
241 | - | |
242 | - | |
243 | -Підготувати дані для створення предмету закупівлі плану | |
244 | - [Arguments] ${cpv} | |
245 | - ${item}= test_item_data ${cpv[0:4]} | |
246 | - Remove From Dictionary ${item} deliveryAddress | |
247 | - Remove From Dictionary ${item} deliveryLocation | |
248 | - Remove From Dictionary ${item} deliveryDate.startDate | |
249 | - [Return] ${item} | |
250 | - | |
251 | - | |
252 | -Підготувати дані для створення лоту | |
253 | - [Arguments] ${max_lot_value_amount} | |
254 | - ${lot}= test_lot_data ${max_lot_value_amount} | |
255 | - ${reply}= Create Dictionary data=${lot} | |
256 | - [Return] ${reply} | |
257 | - | |
258 | -Підготувати дані для створення нецінового показника | |
259 | - ${reply}= test_feature_data | |
260 | - [Return] ${reply} | |
261 | - | |
262 | -Підготувати дані для подання вимоги | |
263 | - ${claim}= test_claim_data | |
264 | - [Return] ${claim} | |
265 | - | |
266 | - | |
267 | -Підготувати дані для подання скарги | |
268 | - [Arguments] ${lot}=${False} | |
269 | - ${complaint}= test_complaint_data ${lot} | |
270 | - [Return] ${complaint} | |
271 | - | |
272 | - | |
273 | -Підготувати дані для відповіді на скаргу | |
274 | - ${reply}= test_complaint_reply_data | |
275 | - [Return] ${reply} | |
276 | - | |
277 | - | |
278 | -Підготувати дані для запитання | |
279 | - ${question}= test_question_data | |
280 | - [Return] ${question} | |
281 | - | |
282 | - | |
283 | -Підготувати дані для відповіді на запитання | |
284 | - ${answer}= test_question_answer_data | |
285 | - [Return] ${answer} | |
286 | - | |
287 | - | |
288 | -Підготувати дані для подання пропозиції | |
289 | - [Arguments] | |
290 | - ${bid}= generate_test_bid_data ${USERS.users['${tender_owner}'].initial_data.data} | |
291 | - [Return] ${bid} | |
292 | - | |
293 | - | |
294 | -Підготувати дані для подання пропозиції для другого етапу | |
295 | - [Arguments] ${index}=0 | |
296 | - ${bid}= generate_test_bid_data_second_stage ${USERS.users['${tender_owner}'].tender_data.data} ${index} | |
297 | - [Return] ${bid} | |
298 | - | |
299 | - | |
300 | -Підготувати дані про постачальника | |
301 | - [Arguments] ${username} ${lotIndex}=${-1} | |
302 | - ${lotIndex}= Convert To Integer ${lotIndex} | |
303 | - ${supplier_data}= test_supplier_data | |
304 | - Run Keyword If ${lotIndex} > -1 Set To Dictionary ${supplier_data.data} lotID=${USERS.users['${tender_owner}'].initial_data.data['lots'][${lotIndex}]['id']} | |
305 | - Set To Dictionary ${USERS.users['${tender_owner}']} supplier_data=${supplier_data} | |
306 | - Log ${supplier_data} | |
307 | - [Return] ${supplier_data} | |
308 | - | |
309 | - | |
310 | -Підготувати дані про скасування | |
311 | - ${cancellation_reason}= create_fake_sentence | |
312 | - ${cancellation_reason}= field_with_id c ${cancellation_reason} | |
313 | - ${cancellation_id}= get_id_from_string ${cancellation_reason} | |
314 | - ${file_path} ${file_name} ${file_content}= create_fake_doc | |
315 | - ${doc_id}= get_id_from_string ${file_name} | |
316 | - ${document}= Create Dictionary | |
317 | - ... doc_path=${file_path} | |
318 | - ... doc_name=${file_name} | |
319 | - ... doc_content=${file_content} | |
320 | - ... doc_id=${doc_id} | |
321 | - ${new_description}= create_fake_sentence | |
322 | - ${cancellation_data}= Create Dictionary | |
323 | - ... cancellation_reason=${cancellation_reason} | |
324 | - ... cancellation_id=${cancellation_id} | |
325 | - ... document=${document} | |
326 | - ... description=${new_description} | |
327 | - ${cancellation_data}= munchify ${cancellation_data} | |
328 | - [Return] ${cancellation_data} | |
329 | - | |
330 | - | |
331 | -Підготувати дані про зміну до договору | |
332 | - [Arguments] ${username} | |
333 | - ${change_data}= test_change_data | |
334 | - Set To Dictionary ${USERS.users['${username}']} change_data=${change_data} | |
335 | - Log ${change_data} | |
336 | - [Return] ${change_data} | |
337 | - | |
338 | - | |
339 | -Адаптувати дані для оголошення тендера | |
340 | - [Arguments] ${tender_data} | |
341 | - # munchify is used to make deep copy of ${tender_data} | |
342 | - ${adapted_data}= munchify ${tender_data} | |
343 | - :FOR ${username} IN @{USED_ROLES} | |
344 | - # munchify is used to make deep copy of ${adapted_data} | |
345 | - \ ${adapted_data_copy}= munchify ${adapted_data} | |
346 | - \ ${status} ${adapted_data_from_broker}= Run keyword and ignore error Run As ${${username}} Підготувати дані для оголошення тендера ${adapted_data_copy} ${username} | |
347 | - \ Log ${adapted_data_from_broker} | |
348 | - # Need this in case ``${${username}}`` doesn't have `Підготувати дані для оголошення | |
349 | - # тендера користувачем` keyword, so after `Run keyword and ignore error` call | |
350 | - # ``${adapted_data_from_broker}`` will be ``${None}``. Else - nothing changes. | |
351 | - \ ${adapted_data_from_broker}= Set variable if '${status}' == 'FAIL' ${adapted_data} ${adapted_data_from_broker} | |
352 | - \ Log differences between dicts ${adapted_data.data} ${adapted_data_from_broker.data} ${username} has changed initial data! | |
353 | - # Update (or not, if nothing changed) ``${adapted_data}``. | |
354 | - \ ${adapted_data}= munchify ${adapted_data_from_broker} | |
355 | - \ Log ${adapted_data} | |
356 | - Log ${adapted_data} | |
357 | - Log ${tender_data} | |
358 | - [Return] ${adapted_data} | |
359 | - | |
360 | - | |
361 | -Log differences between dicts | |
362 | - [Arguments] ${left} ${right} ${begin} ${end}=${Empty} | |
363 | - ${diff_status} ${diff_message}= Run Keyword And Ignore Error Dictionaries Should Be Equal ${left} ${right} | |
364 | - Run keyword if '${diff_status}' == 'FAIL' Log \n${begin}\n${diff_message}\n${end} WARN | |
365 | - [Return] ${diff_status} | |
366 | - | |
367 | - | |
368 | -Завантажуємо бібліотеку з реалізацією для майданчика ${keywords_file} | |
369 | - [Documentation] | |
370 | - ... Load broker's driver (keyword library). | |
371 | - ... | |
372 | - ... `Import Resource` is called twice: | |
373 | - ... | |
374 | - ... 1) It tries to read from ``brokers/`` directory | |
375 | - ... (located next to ``keywords.robot``). | |
376 | - ... This is an old feature which will be removed in the future. | |
377 | - ... | |
378 | - ... 2) It looks for a given filename in ``sys.path`` | |
379 | - ... (``PYTHONPATH`` environment variable). | |
380 | - ... | |
381 | - ... This keyword will fail if ``keywords_file`` was found | |
382 | - ... in both locations. | |
383 | - ${bundled_st}= Run Keyword And Return Status Import Resource ${CURDIR}${/}brokers${/}${keywords_file}.robot | |
384 | - ${external_st}= Run Keyword And Return Status Import Resource ${keywords_file}.robot | |
385 | - Run Keyword If ${bundled_st} == ${external_st} == ${False} Fail Resource file ${keywords_file}.robot not found | |
386 | - Run Keyword If ${bundled_st} == ${external_st} == ${True} Fail Resource file ${keywords_file}.robot found in both brokers${/} and src${/} | |
387 | - | |
388 | - | |
389 | -Дочекатись синхронізації з майданчиком | |
390 | - [Arguments] ${username} | |
391 | - [Documentation] | |
392 | - ... Synchronise with ``username`` and update cache | |
393 | - ... First section | |
394 | - ... Get `timeout_on_wait` for ``username`` | |
395 | - ... Add `timeout_on_wait` to `last_modification_date` in order to have | |
396 | - ... correct time of data modification in CDB(every broker has different | |
397 | - ... data synchronisation time with CDB). | |
398 | - ... Find diff between `last_mofidication_date_corrected` | |
399 | - ... and `now`. If that value is positive, sleep for `sleep` seconds, | |
400 | - ... else go to next section. | |
401 | - ... Thus, when this keyword is executed several times in a row, | |
402 | - ... it will wait for as long as really needed. | |
403 | - ... | |
404 | - ... Example: | |
405 | - ... | |
406 | - ... The procurement is modified. | |
407 | - ... In 5 seconds, this keyword is called for `viewer`. | |
408 | - ... Immediately, this keyword is called for `provider`. | |
409 | - ... Timeout for `viewer` is 60. | |
410 | - ... Timeout for `provider` is 300. | |
411 | - ... First call (for `viewer`) will trigger `Sleep 55`. | |
412 | - ... Second call (for `provider`) will trigger `Sleep 235`. | |
413 | - ... As a result, the delay will end in 300 seconds | |
414 | - ... since last modification date. | |
415 | - ... | |
416 | - ... Another example (a variation of previous one): | |
417 | - ... | |
418 | - ... Timeout for `viewer` is 120. | |
419 | - ... Timeout for `provider` is 30. | |
420 | - ... First call will trigger `Sleep 115`. | |
421 | - ... Second call will trigger `Sleep 0`, | |
422 | - ... since we have already slept for 120 seconds | |
423 | - ... and there is no need to sleep anymore. | |
424 | - ... | |
425 | - ... Second section | |
426 | - ... Find how much time passed from ``username``'s `last_refresh_date` | |
427 | - ... to `last_modification_date_corrected`. If that value is positive, then | |
428 | - ... cahce for ``username`` is not up-to-date. So, it will be refreshed and | |
429 | - ... `last_refresh_date` will be updated. | |
430 | - ... Else do nothing. | |
431 | - ${timeout_on_wait}= Get Broker Property By Username ${username} timeout_on_wait | |
432 | - ${last_modification_date_corrected}= Add Time To Date | |
433 | - ... ${TENDER['LAST_MODIFICATION_DATE']} | |
434 | - ... ${timeout_on_wait} s | |
435 | - ${now}= Get Current TZdate | |
436 | - ${sleep}= Subtract Date From Date | |
437 | - ... ${last_modification_date_corrected} | |
438 | - ... ${now} | |
439 | - Run Keyword If ${sleep} > 0 Sleep ${sleep} | |
440 | - | |
441 | - | |
442 | - ${time_diff}= Subtract Date From Date | |
443 | - ... ${last_modification_date_corrected} | |
444 | - ... ${USERS.users['${username}']['LAST_REFRESH_DATE']} | |
445 | - ${LAST_REFRESH_DATE}= Get Current TZdate | |
446 | - Run Keyword If ${time_diff} > 0 Run Keywords | |
447 | - ... Оновити сторінку ${username} | |
448 | - ... AND | |
449 | - ... Set To Dictionary ${USERS.users['${username}']} LAST_REFRESH_DATE=${LAST_REFRESH_DATE} | |
450 | - | |
451 | - | |
452 | -Оновити сторінку | |
453 | - [Arguments] ${username} | |
454 | - Run Keyword If '${RESOURCE}' == 'plans' Run As ${username} Оновити сторінку з планом ${TENDER['TENDER_UAID']} | |
455 | - ... ELSE Run As ${username} Оновити сторінку з тендером ${TENDER['TENDER_UAID']} | |
456 | - | |
457 | - | |
458 | -Звірити поле тендера | |
459 | - [Arguments] ${username} ${tender_uaid} ${tender_data} ${field} | |
460 | - ${left}= get_from_object ${tender_data.data} ${field} | |
461 | - Звірити поле тендера із значенням ${username} ${tender_uaid} ${left} ${field} | |
462 | - | |
463 | - | |
464 | -Звірити поле плану | |
465 | - [Arguments] ${username} ${tender_uaid} ${tender_data} ${field} | |
466 | - ${left}= get_from_object ${tender_data.data} ${field} | |
467 | - Звірити поле плану із значенням ${username} ${tender_uaid} ${left} ${field} | |
468 | - | |
469 | - | |
470 | -Звірити поле плану із значенням | |
471 | - [Arguments] ${username} ${tender_uaid} ${left} ${field} ${object_id}=${Empty} | |
472 | - ${right}= Отримати дані із плану ${username} ${tender_uaid} ${field} ${object_id} | |
473 | - Порівняти об'єкти ${left} ${right} | |
474 | - | |
475 | - | |
476 | -Звірити поле тендера із значенням | |
477 | - [Arguments] ${username} ${tender_uaid} ${left} ${field} ${object_id}=${Empty} | |
478 | - ${right}= Отримати дані із тендера ${username} ${tender_uaid} ${field} ${object_id} | |
479 | - Порівняти об'єкти ${left} ${right} | |
480 | - | |
481 | - | |
482 | -Звірити поле договору | |
483 | - [Arguments] ${username} ${contract_uaid} ${cotract_data} ${field} | |
484 | - ${left}= get_from_object ${contract_data.data} ${field} | |
485 | - Звірити поле договору із значенням ${username} ${contract_uaid} ${left} ${field} | |
486 | - | |
487 | - | |
488 | -Звірити поле договору із значенням | |
489 | - [Arguments] ${username} ${contract_uaid} ${left} ${field} | |
490 | - ${right}= Отримати дані із договору ${username} ${contract_uaid} ${field} | |
491 | - Порівняти об'єкти ${left} ${right} | |
492 | - | |
493 | - | |
494 | -Звірити поле зміни до договору | |
495 | - [Arguments] ${username} ${contract_uaid} ${change_data} ${field} | |
496 | - ${left}= get_from_object ${change_data.data} ${field} | |
497 | - Звірити поле зміни до договору із значенням ${username} ${contract_uaid} ${left} ${field} | |
498 | - | |
499 | - | |
500 | -Звірити поле зміни до договору із значенням | |
501 | - [Arguments] ${username} ${contract_uaid} ${left} ${field} | |
502 | - ${field}= Evaluate "{}{}".format('changes[0].', '${field}') | |
503 | - ${right}= Отримати дані із договору ${username} ${contract_uaid} ${field} | |
504 | - Порівняти об'єкти ${left} ${right} | |
505 | - | |
506 | - | |
507 | -Звірити поле донора | |
508 | - [Arguments] ${username} ${tender_uaid} ${tender_data} ${field} ${funders_index} | |
509 | - ${left}= get_from_object ${tender_data.data.funders[${funders_index}]} ${field} | |
510 | - Log ${left} | |
511 | - Звірити поле донора із значенням ${username} ${tender_uaid} ${left} ${field} ${funders_index} | |
512 | - | |
513 | - | |
514 | -Звірити поле донора із значенням | |
515 | - [Arguments] ${username} ${tender_uaid} ${left} ${field} ${funders_index} ${object_id}=${Empty} | |
516 | - ${right}= Отримати дані із тендера ${username} ${tender_uaid} funders[${funders_index}].${field} ${object_id} | |
517 | - Порівняти об'єкти ${left} ${right} | |
518 | - | |
519 | - | |
520 | -Звірити відображення типу запланованого тендера для ${username} | |
521 | - ${type}= Отримати дані із плану ${username} ${TENDER['TENDER_UAID']} tender.procurementMethodType | |
522 | - Звірити відображення поля tender.procurementMethodType плану для користувача ${username} | |
523 | - Run Keyword If '${type}' == '' Run As ${username} Перевірити наявність повідомлення "без застосування електронної системи" | |
524 | - | |
525 | - | |
526 | -Порівняти об'єкти | |
527 | - [Arguments] ${left} ${right} | |
528 | - Log ${left} | |
529 | - Log ${right} | |
530 | - Should Not Be Equal ${left} ${None} | |
531 | - Should Not Be Equal ${right} ${None} | |
532 | - Should Be Equal ${left} ${right} msg=Objects are not equal | |
533 | - | |
534 | - | |
535 | -Звірити дату тендера | |
536 | - [Arguments] ${username} ${tender_uaid} ${tender_data} ${field} ${accuracy}=60 ${absolute_delta}=${False} | |
537 | - ${left}= get_from_object ${tender_data.data} ${field} | |
538 | - Звірити дату тендера із значенням ${username} ${tender_uaid} ${left} ${field} accuracy=${accuracy} absolute_delta=${absolute_delta} | |
539 | - | |
540 | - | |
541 | -Звірити дату тендера із значенням | |
542 | - [Arguments] ${username} ${tender_uaid} ${left} ${field} ${object_id}=${Empty} ${accuracy}=60 ${absolute_delta}=${False} | |
543 | - ${right}= Отримати дані із тендера ${username} ${tender_uaid} ${field} ${object_id} | |
544 | - Порівняти дати ${left} ${right} accuracy=${accuracy} absolute_delta=${absolute_delta} | |
545 | - | |
546 | - | |
547 | -Порівняти дати | |
548 | - [Documentation] | |
549 | - ... Compare dates with specified ``accuracy`` (in seconds). | |
550 | - ... Default is `60`. | |
551 | - ... | |
552 | - ... The keyword will fail if the difference between | |
553 | - ... ``left`` and ``right`` dates is more than ``accuracy``, | |
554 | - ... otherwise it will pass. | |
555 | - [Arguments] ${left} ${right} ${accuracy}=90 ${absolute_delta}=${False} | |
556 | - Log ${left} | |
557 | - Log ${right} | |
558 | - Should Not Be Equal ${left} ${None} | |
559 | - Should Not Be Equal ${right} ${None} | |
560 | - ${status}= compare_date ${left} ${right} accuracy=${accuracy} absolute_delta=${absolute_delta} | |
561 | - Should Be True ${status} msg=Dates differ: ${left} != ${right} | |
562 | - | |
563 | - | |
564 | -Звірити координати доставки тендера | |
565 | - [Arguments] ${username} ${tender_uaid} ${tender_data} ${item_id} | |
566 | - ${item_index}= get_object_index_by_id ${tender_data.data['items']} ${item_id} | |
567 | - ${left_lat}= get_from_object ${tender_data.data} items[${item_index}].deliveryLocation.latitude | |
568 | - ${left_lon}= get_from_object ${tender_data.data} items[${item_index}].deliveryLocation.longitude | |
569 | - ${right_lat}= Отримати дані із тендера ${username} ${tender_uaid} deliveryLocation.latitude ${item_id} | |
570 | - ${right_lat}= Convert To Number ${right_lat} | |
571 | - ${right_lon}= Отримати дані із тендера ${username} ${tender_uaid} deliveryLocation.longitude ${item_id} | |
572 | - ${right_lon}= Convert To Number ${right_lon} | |
573 | - Порівняти координати ${left_lat} ${left_lon} ${right_lat} ${right_lon} | |
574 | - | |
575 | - | |
576 | -Порівняти координати | |
577 | - [Documentation] | |
578 | - ... Compare coordinates with specified ``accuracy`` (in km). | |
579 | - ... Default is `0.1`. | |
580 | - ... | |
581 | - ... The keyword will fail if the difference between | |
582 | - ... ``left`` and ``right`` is more than ``accuracy``, | |
583 | - ... otherwise it will pass. | |
584 | - [Arguments] ${left_lat} ${left_lon} ${right_lat} ${right_lon} ${accuracy}=0.1 | |
585 | - Should Not Be Equal ${left_lat} ${None} | |
586 | - Should Not Be Equal ${left_lon} ${None} | |
587 | - Should Not Be Equal ${right_lat} ${None} | |
588 | - Should Not Be Equal ${right_lon} ${None} | |
589 | - ${status}= compare_coordinates ${left_lat} ${left_lon} ${right_lat} ${right_lon} ${accuracy} | |
590 | - Should Be True ${status} msg=Coordinates differ: (${left_lat}, ${left_lon}) != (${right_lat}, ${right_lon}) | |
591 | - | |
592 | - | |
593 | -Звірити поля предметів закупівлі багатопредметного тендера | |
594 | - [Arguments] ${username} ${tender_data} ${field} | |
595 | - @{items}= get_from_object ${tender_data.data} items | |
596 | - ${len_of_items}= Get Length ${items} | |
597 | - :FOR ${index} IN RANGE ${len_of_items} | |
598 | - \ Звірити поле тендера ${viewer} ${tender_data} items[${index}].${field} | |
599 | - | |
600 | - | |
601 | -Звірити дату предметів закупівлі багатопредметного тендера | |
602 | - [Arguments] ${username} ${tender_data} ${field} ${accuracy}=60 ${absolute_delta}=${False} | |
603 | - @{items}= get_from_object ${tender_data.data} items | |
604 | - :FOR ${index} ${_} IN ENUMERATE @{items} | |
605 | - \ Звірити дату тендера ${viewer} ${TENDER['TENDER_UAID']} ${tender_data} items[${index}].${field} accuracy=${accuracy} absolute_delta=${absolute_delta} | |
606 | - | |
607 | - | |
608 | -Звірити координати доставки предметів закупівлі багатопредметного тендера | |
609 | - [Arguments] ${username} ${tender_data} | |
610 | - @{items}= get_from_object ${tender_data.data} items | |
611 | - :FOR ${index} ${_} IN ENUMERATE @{items} | |
612 | - \ Звірити координати тендера ${viewer} ${tender_data} items[${index}] | |
613 | - | |
614 | - | |
615 | -Отримати дані із тендера | |
616 | - [Arguments] ${username} ${tender_uaid} ${field_name} ${object_id}=${Empty} | |
617 | - ${field}= Run Keyword If '${object_id}' Отримати шлях до поля об’єкта ${username} ${field_name} ${object_id} | |
618 | - ... ELSE Set Variable ${field_name} | |
619 | - ${status} ${field_value}= Run keyword and ignore error | |
620 | - ... get_from_object | |
621 | - ... ${USERS.users['${username}'].tender_data.data} | |
622 | - ... ${field} | |
623 | - # If field in cache, return its value | |
624 | - Run Keyword if '${status}' == 'PASS' Return from keyword ${field_value} | |
625 | - # Else call broker to find field | |
626 | - ${field_value}= Run Keyword IF '${object_id}' Отримати дані із об’єкта тендера ${username} ${tender_uaid} ${object_id} ${field_name} | |
627 | - ... ELSE Run As ${username} Отримати інформацію із тендера ${tender_uaid} ${field} | |
628 | - # And caching its value before return | |
629 | - Set_To_Object ${USERS.users['${username}'].tender_data.data} ${field} ${field_value} | |
630 | - ${data}= munch_dict arg=${USERS.users['${username}'].tender_data.data} | |
631 | - Set To Dictionary ${USERS.users['${username}'].tender_data} data=${data} | |
632 | - Log ${USERS.users['${username}'].tender_data.data} | |
633 | - [return] ${field_value} | |
634 | - | |
635 | - | |
636 | -Отримати дані із плану | |
637 | - [Arguments] ${username} ${tender_uaid} ${field_name} ${object_id}=${Empty} | |
638 | - ${field}= Run Keyword If '${object_id}' Отримати шлях до поля об’єкта ${username} ${field_name} ${object_id} | |
639 | - ... ELSE Set Variable ${field_name} | |
640 | - ${status} ${field_value}= Run keyword and ignore error | |
641 | - ... get_from_object | |
642 | - ... ${USERS.users['${username}'].tender_data.data} | |
643 | - ... ${field} | |
644 | - # If field in cache, return its value | |
645 | - Run Keyword if '${status}' == 'PASS' Return from keyword ${field_value} | |
646 | - # Else call broker to find field | |
647 | - ${field_value}= Run As ${username} Отримати інформацію із плану ${tender_uaid} ${field} | |
648 | - # And caching its value before return | |
649 | - Set_To_Object ${USERS.users['${username}'].tender_data.data} ${field} ${field_value} | |
650 | - ${data}= munch_dict arg=${USERS.users['${username}'].tender_data.data} | |
651 | - Set To Dictionary ${USERS.users['${username}'].tender_data} data=${data} | |
652 | - Log ${USERS.users['${username}'].tender_data.data} | |
653 | - [return] ${field_value} | |
654 | - | |
655 | - | |
656 | -Отримати дані із договору | |
657 | - [Arguments] ${username} ${contract_uaid} ${field} | |
658 | - ${status} ${field_value}= Run keyword and ignore error | |
659 | - ... get_from_object | |
660 | - ... ${USERS.users['${username}'].contract_data.data} | |
661 | - ... ${field} | |
662 | - # If field in cache, return its value | |
663 | - Run Keyword if '${status}' == 'PASS' Return from keyword ${field_value} | |
664 | - # Else call broker to find field | |
665 | - ${field_value}= Run As ${username} Отримати інформацію із договору ${contract_uaid} ${field} | |
666 | - # And caching its value before return | |
667 | - Set_To_Object ${USERS.users['${username}'].contract_data.data} ${field} ${field_value} | |
668 | - ${data}= munch_dict arg=${USERS.users['${username}'].contract_data.data} | |
669 | - Set To Dictionary ${USERS.users['${username}'].contract_data} data=${data} | |
670 | - Log ${USERS.users['${username}'].contract_data.data} | |
671 | - [return] ${field_value} | |
672 | - | |
673 | - | |
674 | -Отримати шлях до поля об’єкта | |
675 | - [Arguments] ${username} ${field_name} ${object_id} | |
676 | - ${object_type}= get_object_type_by_id ${object_id} | |
677 | - ${objects}= Get Variable Value ${USERS.users['${username}'].tender_data.data['${object_type}']} ${None} | |
678 | - ${object_index}= get_object_index_by_id ${objects} ${object_id} | |
679 | - [return] ${object_type}[${object_index}].${field_name} | |
680 | - | |
681 | - | |
682 | -Отримати дані із об’єкта тендера | |
683 | - [Arguments] ${username} ${tender_uaid} ${object_id} ${field_name} | |
684 | - ${object_type}= get_object_type_by_id ${object_id} | |
685 | - ${status} ${value}= Run Keyword If '${object_type}'=='questions' | |
686 | - ... Run Keyword And Ignore Error Run As ${username} Отримати інформацію із запитання ${tender_uaid} ${object_id} ${field_name} | |
687 | - ... ELSE IF '${object_type}'=='lots' | |
688 | - ... Run Keyword And Ignore Error Run As ${username} Отримати інформацію із лоту ${tender_uaid} ${object_id} ${field_name} | |
689 | - ... ELSE IF '${object_type}'=='items' | |
690 | - ... Run Keyword And Ignore Error Run As ${username} Отримати інформацію із предмету ${tender_uaid} ${object_id} ${field_name} | |
691 | - ... ELSE IF '${object_type}'=='features' | |
692 | - ... Run Keyword And Ignore Error Run As ${username} Отримати інформацію із нецінового показника ${tender_uaid} ${object_id} ${field_name} | |
693 | - ${field}= Отримати шлях до поля об’єкта ${username} ${field_name} ${object_id} | |
694 | - ${field_value}= Run Keyword IF '${status}'=='PASS' Set Variable ${value} | |
695 | - ... ELSE Run As ${username} Отримати інформацію із тендера ${tender_uaid} ${field} | |
696 | - [return] ${field_value} | |
697 | - | |
698 | - | |
699 | -Отримати ідентифікатори об’єктів | |
700 | - [Arguments] ${username} ${objects_type} | |
701 | - @{objects_ids}= Create List | |
702 | - @{objects}= Get from object ${USERS.users['${username}'].tender_data.data} ${objects_type} | |
703 | - :FOR ${obj} IN @{objects} | |
704 | - \ ${obj_id}= get_id_from_object ${obj} | |
705 | - \ Append To List ${objects_ids} ${obj_id} | |
706 | - [return] ${objects_ids} | |
707 | - | |
708 | - | |
709 | -Звірити поле скарги із значенням | |
710 | - [Arguments] ${username} ${tender_uaid} ${given_value} ${field_name} ${complaintID} ${award_index}=${None} | |
711 | - ${received_value}= Run as ${username} Отримати інформацію із скарги ${tender_uaid} ${complaintID} ${field_name} ${award_index} | |
712 | - Порівняти об'єкти ${given_value} ${received_value} | |
713 | - | |
714 | - | |
715 | -Run As | |
716 | - [Arguments] ${username} ${command} @{arguments} | |
717 | - [Documentation] | |
718 | - ... Run the given keyword (``command``) with given ``arguments`` | |
719 | - ... using driver (keyword library) of user ``username``. | |
720 | - Log ${username} | |
721 | - Log ${command} | |
722 | - Log Many @{arguments} | |
723 | - ${keywords_file}= Get Broker Property By Username ${username} keywords_file | |
724 | - Run Keyword And Return ${keywords_file}.${command} ${username} @{arguments} | |
725 | - | |
726 | - | |
727 | -Require Failure | |
728 | - [Arguments] ${username} ${command} @{arguments} | |
729 | - [Documentation] | |
730 | - ... Sometimes we need to make sure that the given keyword fails. | |
731 | - ... | |
732 | - ... This keyword works just like `Run As`, but it passes only | |
733 | - ... if ``command`` with ``arguments`` fails and vice versa. | |
734 | - Log ${username} | |
735 | - Log ${command} | |
736 | - Log Many @{arguments} | |
737 | - ${keywords_file}= Get Broker Property By Username ${username} keywords_file | |
738 | - ${status} ${value}= Run keyword and ignore keyword definitions ${keywords_file}.${command} ${username} @{arguments} | |
739 | - Run keyword if '${status}' == 'PASS' Fail Користувач ${username} зміг виконати "${command}" | |
740 | - [return] ${value} | |
741 | - | |
742 | - | |
743 | - | |
744 | -Можливість отримати посилання на аукціон для глядача | |
745 | - ${timeout_on_wait}= Get Broker Property By Username ${viewer} timeout_on_wait | |
746 | - ${timeout_on_wait}= Set Variable If | |
747 | - ... ${timeout_on_wait} < ${120} | |
748 | - ... ${120} | |
749 | - ... ${timeout_on_wait} | |
750 | - ${url}= Wait Until Keyword Succeeds | |
751 | - ... ${timeout_on_wait} | |
752 | - ... 15 s | |
753 | - ... Run As ${viewer} Отримати посилання на аукціон для глядача ${TENDER['TENDER_UAID']} | |
754 | - Should Be True '${url}' | |
755 | - Should Match Regexp ${url} ^https?:\/\/auction(?:-sandbox)?\.openprocurement\.org\/tenders\/([0-9A-Fa-f]{32}) | |
756 | - Log URL аукціону для глядача: ${url} | |
757 | - | |
758 | - | |
759 | -Можливість отримати посилання на аукціон для учасника ${username} | |
760 | - ${timeout_on_wait}= Get Broker Property By Username ${username} timeout_on_wait | |
761 | - ${timeout_on_wait}= Set Variable If | |
762 | - ... ${timeout_on_wait} < ${120} | |
763 | - ... ${120} | |
764 | - ... ${timeout_on_wait} | |
765 | - ${url}= Wait Until Keyword Succeeds | |
766 | - ... ${timeout_on_wait} | |
767 | - ... 15 s | |
768 | - ... Run As ${username} Отримати посилання на аукціон для учасника ${TENDER['TENDER_UAID']} | |
769 | - Should Be True '${url}' | |
770 | - Should Match Regexp ${url} ^https?:\/\/auction(?:-sandbox)?\.openprocurement\.org\/tenders\/([0-9A-Fa-f]{32}) | |
771 | - Log URL аукціону для учасника: ${url} | |
772 | - | |
773 | - | |
774 | -Дочекатись дати | |
775 | - [Arguments] ${date} | |
776 | - ${sleep}= wait_to_date ${date} | |
777 | - Run Keyword If ${sleep} > 0 Sleep ${sleep} | |
778 | - | |
779 | - | |
780 | -Дочекатись дати початку періоду уточнень | |
781 | - [Arguments] ${username} ${tender_uaid} | |
782 | - # XXX: HACK: Same as below | |
783 | - ${status} ${date}= Run Keyword And Ignore Error | |
784 | - ... Set Variable | |
785 | - ... ${USERS.users['${username}'].tender_data.data.enquiryPeriod.startDate} | |
786 | - ${date}= Set Variable If | |
787 | - ... '${status}' == 'FAIL' | |
788 | - ... ${USERS.users['${tender_owner}'].initial_data.data.enquiryPeriod.startDate} | |
789 | - ... ${date} | |
790 | - Дочекатись дати ${date} | |
791 | - Оновити LAST_MODIFICATION_DATE | |
792 | - Дочекатись синхронізації з майданчиком ${username} | |
793 | - ${next_status}= Set variable if 'open' in '${MODE}' active.tendering active.enquiries | |
794 | - Wait until keyword succeeds | |
795 | - ... 5 min 15 sec | |
796 | - ... 15 sec | |
797 | - ... Звірити статус тендера | |
798 | - ... ${username} | |
799 | - ... ${tender_uaid} | |
800 | - ... ${next_status} | |
801 | - | |
802 | - | |
803 | -Дочекатись дати закінчення періоду уточнень | |
804 | - [Arguments] ${username} ${tender_uaid} | |
805 | - Дочекатись дати ${USERS.users['${username}'].tender_data.data.enquiryPeriod.endDate} | |
806 | - Оновити LAST_MODIFICATION_DATE | |
807 | - Дочекатись синхронізації з майданчиком ${username} | |
808 | - Wait until keyword succeeds | |
809 | - ... 10 min 15 sec | |
810 | - ... 15 sec | |
811 | - ... Звірити статус тендера | |
812 | - ... ${username} | |
813 | - ... ${tender_uaid} | |
814 | - ... active.tendering | |
815 | - | |
816 | - | |
817 | -Дочекатись дати закінчення періоду відповідей на запитання | |
818 | - [Arguments] ${username} | |
819 | - Дочекатись дати ${USERS.users['${username}'].tender_data.data.enquiryPeriod.clarificationsUntil} | |
820 | - Оновити LAST_MODIFICATION_DATE | |
821 | - Дочекатись синхронізації з майданчиком ${username} | |
822 | - | |
823 | - | |
824 | -Звірити статус тендера | |
825 | - [Arguments] ${username} ${tender_uaid} ${left} | |
826 | - ${right}= Run as ${username} Отримати інформацію із тендера ${tender_uaid} status | |
827 | - Порівняти об'єкти ${left} ${right} | |
828 | - | |
829 | - | |
830 | -Звірити статус вимоги/скарги | |
831 | - [Arguments] ${username} ${tender_uaid} ${complaintID} ${left} ${award_index}=${None} | |
832 | - ${right}= Run as ${username} Отримати інформацію із скарги ${tender_uaid} ${complaintID} status ${award_index} | |
833 | - Порівняти об'єкти ${left} ${right} | |
834 | - | |
835 | - | |
836 | -Дочекатись дати початку прийому пропозицій | |
837 | - [Arguments] ${username} ${tender_uaid} | |
838 | - # This tries to get the date from current user's procurement data cache. | |
839 | - # On failure, it reads from tender_owner's cached initial_data. | |
840 | - # XXX: This is a dirty hack! | |
841 | - # HACK: It was left here only for backward compatibiliy. | |
842 | - # HACK: Before caching was implemented, this keyword used to look into | |
843 | - # HACK: tender_owner's initial_data. | |
844 | - # HACK: This should be cleaned up as soon as each broker implements reading | |
845 | - # HACK: of the needed dates from tender's page. | |
846 | - ${status} ${date}= Run Keyword And Ignore Error | |
847 | - ... Set Variable | |
848 | - ... ${USERS.users['${username}'].tender_data.data.tenderPeriod.startDate} | |
849 | - # By default if condition is not satisfied, variable is set to None. | |
850 | - # The third argument sets the variable to itself instead of None. | |
851 | - ${date}= Set Variable If | |
852 | - ... '${status}' == 'FAIL' | |
853 | - ... ${USERS.users['${tender_owner}'].initial_data.data.tenderPeriod.startDate} | |
854 | - ... ${date} | |
855 | - Дочекатись дати ${date} | |
856 | - Оновити LAST_MODIFICATION_DATE | |
857 | - Дочекатись синхронізації з майданчиком ${username} | |
858 | - Wait until keyword succeeds | |
859 | - ... 30 min 15 sec | |
860 | - ... 15 sec | |
861 | - ... Звірити статус тендера | |
862 | - ... ${username} | |
863 | - ... ${tender_uaid} | |
864 | - ... active.tendering | |
865 | - | |
866 | - | |
867 | -Дочекатись дати закінчення прийому пропозицій | |
868 | - [Arguments] ${username} ${tender_uaid} | |
869 | - # XXX: HACK: Same as above | |
870 | - ${status} ${date}= Run Keyword And Ignore Error | |
871 | - ... Set Variable | |
872 | - ... ${USERS.users['${username}'].tender_data.data.tenderPeriod.endDate} | |
873 | - ${date}= Set Variable If | |
874 | - ... '${status}' == 'FAIL' | |
875 | - ... ${USERS.users['${tender_owner}'].initial_data.data.tenderPeriod.endDate} | |
876 | - ... ${date} | |
877 | - Дочекатись дати ${date} | |
878 | - Оновити LAST_MODIFICATION_DATE | |
879 | - Дочекатись синхронізації з майданчиком ${username} | |
880 | - Wait until keyword succeeds | |
881 | - ... 40 min 15 sec | |
882 | - ... 15 sec | |
883 | - ... Run Keyword And Expect Error * | |
884 | - ... Звірити статус тендера | |
885 | - ... ${username} | |
886 | - ... ${tender_uaid} | |
887 | - ... active.tendering | |
888 | - | |
889 | - | |
890 | -Дочекатись дати початку періоду прекваліфікації | |
891 | - [Arguments] ${username} ${tender_uaid} | |
892 | - # XXX: HACK: Same as above | |
893 | - ${status} ${date}= Run Keyword And Ignore Error | |
894 | - ... Set Variable | |
895 | - ... ${USERS.users['${username}'].tender_data.data.tenderPeriod.endDate} | |
896 | - ${date}= Set Variable If | |
897 | - ... '${status}' == 'FAIL' | |
898 | - ... ${USERS.users['${tender_owner}'].initial_data.data.tenderPeriod.endDate} | |
899 | - ... ${date} | |
900 | - Дочекатись дати ${date} | |
901 | - Оновити LAST_MODIFICATION_DATE | |
902 | - Дочекатись синхронізації з майданчиком ${username} | |
903 | - Wait until keyword succeeds | |
904 | - ... 20 min 15 sec | |
905 | - ... 15 sec | |
906 | - ... Звірити статус тендера | |
907 | - ... ${username} | |
908 | - ... ${tender_uaid} | |
909 | - ... active.pre-qualification | |
910 | - | |
911 | - | |
912 | -Дочекатись дати початку очікування | |
913 | - [Arguments] ${username} ${tender_uaid} | |
914 | - # XXX: HACK: Same as above | |
915 | - ${status} ${date}= Run Keyword And Ignore Error | |
916 | - ... Set Variable | |
917 | - ... ${USERS.users['${username}'].tender_data.data.tenderPeriod.endDate} | |
918 | - ${date}= Set Variable If | |
919 | - ... '${status}' == 'FAIL' | |
920 | - ... ${USERS.users['${tender_owner}'].initial_data.data.tenderPeriod.endDate} | |
921 | - ... ${date} | |
922 | - Дочекатись дати ${date} | |
923 | - Оновити LAST_MODIFICATION_DATE | |
924 | - Дочекатись синхронізації з майданчиком ${username} | |
925 | - Wait until keyword succeeds | |
926 | - ... 5 min 15 sec | |
927 | - ... 15 sec | |
928 | - ... Звірити статус тендера | |
929 | - ... ${username} | |
930 | - ... ${tender_uaid} | |
931 | - ... active.stage2.pending | |
932 | - | |
933 | - | |
934 | -Дочекатись дати закінчення періоду прекваліфікації | |
935 | - [Arguments] ${username} ${tender_uaid} | |
936 | - Дочекатись дати ${USERS.users['${username}'].tender_data.data.qualificationPeriod.endDate} | |
937 | - Оновити LAST_MODIFICATION_DATE | |
938 | - Дочекатись синхронізації з майданчиком ${username} | |
939 | - Wait until keyword succeeds | |
940 | - ... 5 min 15 sec | |
941 | - ... 15 sec | |
942 | - ... Run Keyword And Expect Error * | |
943 | - ... Звірити статус тендера | |
944 | - ... ${username} | |
945 | - ... ${tender_uaid} | |
946 | - ... active.pre-qualification.stand-still | |
947 | - | |
948 | - | |
949 | -Дочекатися створення нового етапу мостом | |
950 | - [Arguments] ${username} ${tender_uaid} | |
951 | - Оновити LAST_MODIFICATION_DATE | |
952 | - Дочекатись синхронізації з майданчиком ${username} | |
953 | - Wait until keyword succeeds | |
954 | - ... 10 min 15 sec | |
955 | - ... 15 sec | |
956 | - ... Звірити статус тендера | |
957 | - ... ${username} | |
958 | - ... ${tender_uaid} | |
959 | - ... complete | |
960 | - | |
961 | - | |
962 | -Дочекатись дати початку періоду аукціону | |
963 | - [Arguments] ${username} ${tender_uaid} | |
964 | - Оновити LAST_MODIFICATION_DATE | |
965 | - Дочекатись синхронізації з майданчиком ${username} | |
966 | - Wait until keyword succeeds | |
967 | - ... 40 min 15 sec | |
968 | - ... 15 sec | |
969 | - ... Звірити статус тендера | |
970 | - ... ${username} | |
971 | - ... ${tender_uaid} | |
972 | - ... active.auction | |
973 | - Sleep 120 # Auction sync | |
974 | - | |
975 | - | |
976 | -Дочекатись дати початку періоду кваліфікації | |
977 | - [Arguments] ${username} ${tender_uaid} | |
978 | - Оновити LAST_MODIFICATION_DATE | |
979 | - Дочекатись синхронізації з майданчиком ${username} | |
980 | - Wait until keyword succeeds | |
981 | - ... 40 min 15 sec | |
982 | - ... 15 sec | |
983 | - ... Звірити статус тендера | |
984 | - ... ${username} | |
985 | - ... ${tender_uaid} | |
986 | - ... active.qualification | |
987 | - | |
988 | - | |
989 | -Дочекатись дати закінчення періоду подання скарг | |
990 | - [Arguments] ${username} | |
991 | - Дочекатись дати ${USERS.users['${username}'].tender_data.data.complaintPeriod.endDate} | |
992 | - Оновити LAST_MODIFICATION_DATE | |
993 | - Дочекатись синхронізації з майданчиком ${username} | |
994 | - | |
995 | - | |
996 | -Дочекатись зміни статусу вимоги | |
997 | - [Arguments] ${username} ${status} ${complaintID} ${award_index}=${None} | |
998 | - Дочекатись синхронізації з майданчиком ${username} | |
999 | - Wait until keyword succeeds | |
1000 | - ... 40 min 15 sec | |
1001 | - ... 15 sec | |
1002 | - ... Звірити статус вимоги/скарги | |
1003 | - ... ${provider} | |
1004 | - ... ${TENDER['TENDER_UAID']} | |
1005 | - ... ${complaintID} | |
1006 | - ... ${status} | |
1007 | - ... ${award_index} | |
1008 | - | |
1009 | - | |
1010 | -Оновити LAST_MODIFICATION_DATE | |
1011 | - [Documentation] | |
1012 | - ... Variable ``${TEST_STATUS}`` is only available in test case teardown. | |
1013 | - ... When we call this keyword from elswere, we need to presume that | |
1014 | - ... test status is ``PASS`` (since previous keywords passed and this | |
1015 | - ... one was called). | |
1016 | - ${LAST_MODIFICATION_DATE}= Get Current TZdate | |
1017 | - ${status}= Get Variable Value ${TEST_STATUS} PASS | |
1018 | - Run Keyword If '${status}' == 'PASS' Set To Dictionary ${TENDER} LAST_MODIFICATION_DATE=${LAST_MODIFICATION_DATE} | |
1019 | - | |
1020 | - | |
1021 | -Отримати останній індекс | |
1022 | -<<<<<<< 757d74b2c6bfa0482907833dc95b64e414708a70 | |
1023 | - [Arguments] ${object} ${username} | |
1024 | - ${status}= Run Keyword And Return Status Dictionary Should Contain Key ${USERS.users['${username}'].tender_data.data} ${object} | |
1025 | - Run Keyword If '${status}' == 'False' Fail ${object} not found in \${USERS.users['${username}'].tender_data.data} | |
1026 | - ${len_of_object}= Get Length ${USERS.users['${username}'].tender_data.data.${object}} | |
1027 | - ${index}= subtraction ${len_of_object} 1 | |
1028 | - [Return] ${index} | |
1029 | -======= | |
1030 | - [Arguments] ${object} @{username} | |
1031 | - :FOR ${role} IN @{username} | |
1032 | - \ ${status} ${field_value}= Run Keyword And Ignore Error | |
1033 | - ... get_from_object | |
1034 | - ... ${USERS.users['${role}'].tender_data.data} | |
1035 | - ... ${object} | |
1036 | - \ Run Keyword If '${status}' == 'PASS' Exit For Loop | |
1037 | - ${len_of_object}= Run Keyword If '${status}' == 'PASS' Get Length ${USERS.users['${role}'].tender_data.data.${object}} | |
1038 | - ${index}= Run Keyword If '${status}' == 'PASS' subtraction ${len_of_object} 1 | |
1039 | - [Return] ${index} | |
1040 | ->>>>>>> Modify Отримати останній індекс keyword |
... | ... | @@ -46,13 +46,12 @@ |
46 | 46 | -i modify_bid_by_provider |
47 | 47 | -i add_doc_to_bid_by_provider |
48 | 48 | -i ask_question_after_enquiry_period |
49 | --i create_tender_complaint_after_complaint_period | |
50 | 49 | -i answer_question_after_clarifications_period |
51 | 50 | -i modify_tender_in_tendering_period |
52 | 51 | -i open_confirm_first_bid |
53 | 52 | -i bid_view_in_tendering_period |
54 | 53 | |
55 | --i add_bid_doc_after_tendering_period_by_provider | |
54 | +-i ask_question_to_tender_after_tendering_period | |
56 | 55 | |
57 | 56 | -i qualification_add_doc_to_first_award |
58 | 57 | -i qualification_approve_first_award | ... | ... |
Please
register
or
login
to post a comment