Commit ec41f869d35ffcb5f44ab0845417d64006c6fc1b
Committed by
OrysiaDrabych
1 parent
1c290d6c
Add `Відображення причини зміни договору` testcase
And `compare_rationale_types` to service_keywords.py
Showing
2 changed files
with
45 additions
and
0 deletions
... | ... | @@ -54,6 +54,19 @@ Suite Teardown Test Suite Teardown |
54 | 54 | Звірити відображення поля rationale зміни до договору для користувача ${viewer} |
55 | 55 | |
56 | 56 | |
57 | +Відображення причин зміни договору | |
58 | + [Tags] ${USERS.users['${tender_owner}'].broker}: Відображення зміни договору | |
59 | + ... tender_owner | |
60 | + ... ${USERS.users['${tender_owner}'].broker} | |
61 | + # here we need to receive list of rationale types from broker | |
62 | + ${rationale_types_from_broker}= Run as ${viewer} Отримати інформацію із договору ${CONTRACT_UAID} changes[0].rationaleTypes | |
63 | + ${rationale_types_from_robot}= Get variable value ${USERS.users['${tender_owner}'].change_data.data.rationaleTypes} | |
64 | + Log ${rationale_types_from_broker} | |
65 | + Log ${rationale_types_from_robot} | |
66 | + ${result}= compare_rationale_types ${rationale_types_from_broker} ${rationale_types_from_robot} | |
67 | + Run keyword if ${result} == ${False} Fail Rationale types are not equal | |
68 | + | |
69 | + | |
57 | 70 | Можливість додати документацію до зміни в договорі |
58 | 71 | [Tags] ${USERS.users['${tender_owner}'].broker}: Редагування договору |
59 | 72 | ... tender_owner | ... | ... |
... | ... | @@ -558,5 +558,37 @@ def generate_test_bid_data_second_stage(tender_data, index='0'): |
558 | 558 | bid.data.parameters.append(parameter) |
559 | 559 | return bid |
560 | 560 | |
561 | + | |
561 | 562 | def convert_amount_string_to_float(amount_string): |
562 | 563 | return float(amount_string.replace(' ', '').replace(',', '.')) |
564 | + | |
565 | + | |
566 | +# GUI Frontends common | |
567 | +def add_data_for_gui_frontends(tender_data): | |
568 | + now = get_now() | |
569 | + # tender_data.data.enquiryPeriod['startDate'] = (now + timedelta(minutes=2)).isoformat() | |
570 | + tender_data.data.enquiryPeriod['endDate'] = (now + timedelta(minutes=6)).isoformat() | |
571 | + tender_data.data.tenderPeriod['startDate'] = (now + timedelta(minutes=7)).isoformat() | |
572 | + tender_data.data.tenderPeriod['endDate'] = (now + timedelta(minutes=11)).isoformat() | |
573 | + return tender_data | |
574 | + | |
575 | + | |
576 | +def convert_date_to_slash_format(isodate): | |
577 | + iso_dt = parse_date(isodate) | |
578 | + date_string = iso_dt.strftime("%d/%m/%Y") | |
579 | + return date_string | |
580 | + | |
581 | + | |
582 | +def convert_datetime_to_dot_format(isodate): | |
583 | + iso_dt = parse_date(isodate) | |
584 | + day_string = iso_dt.strftime("%d.%m.%Y %H:%M") | |
585 | + return day_string | |
586 | + | |
587 | + | |
588 | +def local_path_to_file(file_name): | |
589 | + return os.path.join(os.path.dirname(__file__), 'documents', file_name) | |
590 | + | |
591 | + | |
592 | +def compare_rationale_types(type1, type2): | |
593 | + return set(type1) == set(type2) | |
594 | + | ... | ... |
Please
register
or
login
to post a comment