Commit 2acc8049337b120241b4d61ca1eddf08092e43eb
Committed by
OrysiaDrabych
1 parent
1cfc68cc
Add new keywords to keywords.robot
Namely to have possibility to work with contract data display checking tests
Showing
1 changed file
with
31 additions
and
0 deletions
... | ... | @@ -455,6 +455,19 @@ Log differences between dicts |
455 | 455 | Порівняти об'єкти ${left} ${right} |
456 | 456 | |
457 | 457 | |
458 | +Звірити поле зміни до договору | |
459 | + [Arguments] ${username} ${contract_uaid} ${change_data} ${field} | |
460 | + ${left}= get_from_object ${change_data.data} ${field} | |
461 | + Звірити поле зміни до договору із значенням ${username} ${contract_uaid} ${left} ${field} | |
462 | + | |
463 | + | |
464 | +Звірити поле зміни до договору із значенням | |
465 | + [Arguments] ${username} ${contract_uaid} ${left} ${field} | |
466 | + ${field}= Evaluate "{}{}".format('changes[0].', '${field}') | |
467 | + ${right}= Отримати дані із договору ${username} ${contract_uaid} ${field} | |
468 | + Порівняти об'єкти ${left} ${right} | |
469 | + | |
470 | + | |
458 | 471 | Порівняти об'єкти |
459 | 472 | [Arguments] ${left} ${right} |
460 | 473 | Log ${left} |
... | ... | @@ -583,6 +596,24 @@ Log differences between dicts |
583 | 596 | [return] ${field_value} |
584 | 597 | |
585 | 598 | |
599 | +Отримати дані із договору | |
600 | + [Arguments] ${username} ${contract_uaid} ${field} | |
601 | + ${status} ${field_value}= Run keyword and ignore error | |
602 | + ... get_from_object | |
603 | + ... ${USERS.users['${username}'].contract_data.data} | |
604 | + ... ${field} | |
605 | + # If field in cache, return its value | |
606 | + Run Keyword if '${status}' == 'PASS' Return from keyword ${field_value} | |
607 | + # Else call broker to find field | |
608 | + ${field_value}= Run As ${username} Отримати інформацію із договору ${contract_uaid} ${field} | |
609 | + # And caching its value before return | |
610 | + Set_To_Object ${USERS.users['${username}'].contract_data.data} ${field} ${field_value} | |
611 | + ${data}= munch_dict arg=${USERS.users['${username}'].contract_data.data} | |
612 | + Set To Dictionary ${USERS.users['${username}'].contract_data} data=${data} | |
613 | + Log ${USERS.users['${username}'].contract_data.data} | |
614 | + [return] ${field_value} | |
615 | + | |
616 | + | |
586 | 617 | Отримати шлях до поля об’єкта |
587 | 618 | [Arguments] ${username} ${field_name} ${object_id} |
588 | 619 | ${object_type}= get_object_type_by_id ${object_id} | ... | ... |
Please
register
or
login
to post a comment