Commit e2f23a58940cd7f34558812f370fe001ef639a51
1 parent
225e7826
Read some dates from tender_owner's initial_data
This is needed for backward compatibility only. Partially reverts to old behaviour.
Showing
1 changed file
with
21 additions
and
2 deletions
... | ... | @@ -267,18 +267,37 @@ SwitchState |
267 | 267 | Дочекатись дати початку прийому пропозицій |
268 | 268 | [Arguments] ${username} |
269 | 269 | Log ${username} |
270 | - Дочекатись дати ${USERS.users['${username}'].tender_data.data.tenderPeriod.startDate} | |
270 | + # This tries to get the date from current user's procurement data cache. | |
271 | + # On failure, it reads from tender_owner's cached initial_data. | |
272 | + # XXX: This is a dirty hack! | |
273 | + # HACK: It was left here only for backward compatibiliy. | |
274 | + # HACK: Before caching was implemented, this keyword used to look into | |
275 | + # HACK: tender_owner's initial_data. | |
276 | + # HACK: This should be cleaned up as soon as each broker implements reading | |
277 | + # HACK: of the needed dates from tender's page. | |
278 | + Run Keyword And Ignore Error | |
279 | + ... ${date}= ${USERS.users['${username}'].tender_data.data.tenderPeriod.startDate} | |
280 | + Run Keyword Unless ${date} | |
281 | + ... ${date}= ${USERS.users['${tender_owner}'].initial_data.data.tenderPeriod.startDate} | |
282 | + Дочекатись дати ${date} | |
271 | 283 | |
272 | 284 | |
273 | 285 | Дочекатись дати закінчення прийому пропозицій |
274 | 286 | [Arguments] ${username} |
275 | 287 | Log ${username} |
276 | - Дочекатись дати ${USERS.users['${username}'].tender_data.data.tenderPeriod.endDate} | |
288 | + # XXX: HACK: Same as above | |
289 | + Run Keyword And Ignore Error | |
290 | + ... ${date}= ${USERS.users['${username}'].tender_data.data.tenderPeriod.endDate} | |
291 | + Run Keyword Unless ${date} | |
292 | + ... ${date}= ${USERS.users['${tender_owner}'].initial_data.data.tenderPeriod.endDate} | |
293 | + Дочекатись дати ${date} | |
277 | 294 | |
278 | 295 | |
279 | 296 | Дочекатись дати початку аукціону |
280 | 297 | [Arguments] ${username} |
281 | 298 | Log ${username} |
299 | + # Can't use that dirty hack here since we don't know | |
300 | + # the date of auction when creating the procurement :) | |
282 | 301 | Дочекатись дати ${USERS.users['${username}'].tender_data.data.auctionPeriod.startDate} |
283 | 302 | |
284 | 303 | ... | ... |
Please
register
or
login
to post a comment