Commit 61e9380fd9abec84d2842aea3b889148b3a62a24
1 parent
91f1705b
add negative tests "the tenderPeriod cannot end earlier than 2 business days after the start"
Showing
4 changed files
with
18 additions
and
0 deletions
... | ... | @@ -18,6 +18,7 @@ ${ERROR_PLAN_MESSAGE}= Calling method 'get_plan' failed: ResourceGone: {"status |
18 | 18 | ${NUMBER_OF_LOTS}= Convert To Integer ${NUMBER_OF_LOTS} |
19 | 19 | ${NUMBER_OF_ITEMS}= Convert To Integer ${NUMBER_OF_ITEMS} |
20 | 20 | ${NUMBER_OF_MILESTONES}= Convert To Integer ${NUMBER_OF_MILESTONES} |
21 | + ${WRONG_TENDER_DATE} Get Variable Value ${WRONG_TENDER_DATE} ${False} | |
21 | 22 | ${tender_parameters}= Create Dictionary |
22 | 23 | ... mode=${MODE} |
23 | 24 | ... number_of_items=${NUMBER_OF_ITEMS} |
... | ... | @@ -33,6 +34,7 @@ ${ERROR_PLAN_MESSAGE}= Calling method 'get_plan' failed: ResourceGone: {"status |
33 | 34 | ... gmdn_index=${${GMDN_INDEX}} |
34 | 35 | ... plan_tender=${${PLAN_TENDER}} |
35 | 36 | ... profile=${${PROFILE}} |
37 | + ... wrong_tender_date=${${WRONG_TENDER_DATE}} | |
36 | 38 | ${DIALOGUE_TYPE}= Get Variable Value ${DIALOGUE_TYPE} |
37 | 39 | ${FUNDING_KIND}= Get Variable Value ${FUNDING_KIND} |
38 | 40 | Run keyword if '${DIALOGUE_TYPE}' != '${None}' Set to dictionary ${tender_parameters} dialogue_type=${DIALOGUE_TYPE} | ... | ... |
... | ... | @@ -1011,6 +1011,10 @@ def test_tender_data_pq(params, submissionMethodDetails, plan_data): |
1011 | 1011 | data['profile'] = fake.valid_profile() |
1012 | 1012 | else: |
1013 | 1013 | data['profile'] = fake.invalid_profile() |
1014 | + if params['wrong_tender_date']: | |
1015 | + start_date = data['tenderPeriod']['startDate'] | |
1016 | + from op_robot_tests.tests_files.service_keywords import add_minutes_to_date | |
1017 | + data['tenderPeriod']['endDate'] = add_minutes_to_date(start_date, 1) | |
1014 | 1018 | return munchify(data) |
1015 | 1019 | |
1016 | 1020 | ... | ... |
... | ... | @@ -23,6 +23,17 @@ ${PLAN_TENDER} ${True} |
23 | 23 | ${PROFILE} ${True} |
24 | 24 | |
25 | 25 | *** Test Cases *** |
26 | +Неможливість оголосити тендер з tenderPeriod:endDate < 2 робочих дні | |
27 | + [Tags] ${USERS.users['${tender_owner}'].broker}: Оголошення тендера | |
28 | + ... tender_owner | |
29 | + ... ${USERS.users['${tender_owner}'].broker} | |
30 | + ... create_tender_wrong_date level1 | |
31 | + ... critical | |
32 | + [Teardown] Оновити LAST_MODIFICATION_DATE | |
33 | + Set Test Variable ${WRONG_TENDER_DATE} ${True} | |
34 | + Run Keyword And Expect Error * Можливість оголосити тендер | |
35 | + | |
36 | + | |
26 | 37 | Можливість оголосити тендер |
27 | 38 | [Tags] ${USERS.users['${tender_owner}'].broker}: Оголошення тендера |
28 | 39 | ... tender_owner | ... | ... |
Please
register
or
login
to post a comment