Showing
7 changed files
with
30 additions
and
9 deletions
| @@ -46,7 +46,7 @@ Resource resource.robot | @@ -46,7 +46,7 @@ Resource resource.robot | ||
| 46 | ... item_meat=${${ITEM_MEAT}} | 46 | ... item_meat=${${ITEM_MEAT}} |
| 47 | ${DIALOGUE_TYPE}= Get Variable Value ${DIALOGUE_TYPE} | 47 | ${DIALOGUE_TYPE}= Get Variable Value ${DIALOGUE_TYPE} |
| 48 | Run keyword if '${DIALOGUE_TYPE}' != '${None}' Set to dictionary ${tender_parameters} dialogue_type=${DIALOGUE_TYPE} | 48 | Run keyword if '${DIALOGUE_TYPE}' != '${None}' Set to dictionary ${tender_parameters} dialogue_type=${DIALOGUE_TYPE} |
| 49 | - ${tender_data}= Підготувати дані для створення тендера ${tender_parameters} | 49 | + ${tender_data}= Підготувати дані для створення плану ${tender_parameters} |
| 50 | ${adapted_data}= Адаптувати дані для оголошення тендера ${tender_data} | 50 | ${adapted_data}= Адаптувати дані для оголошення тендера ${tender_data} |
| 51 | ${TENDER_UAID}= Run As ${tender_owner} Створити план ${adapted_data} | 51 | ${TENDER_UAID}= Run As ${tender_owner} Створити план ${adapted_data} |
| 52 | Set To Dictionary ${USERS.users['${tender_owner}']} initial_data=${adapted_data} | 52 | Set To Dictionary ${USERS.users['${tender_owner}']} initial_data=${adapted_data} |
| @@ -45,7 +45,7 @@ Library openprocurement_client.utils | @@ -45,7 +45,7 @@ Library openprocurement_client.utils | ||
| 45 | # Uncomment this line if there is need to process files operations without DS. | 45 | # Uncomment this line if there is need to process files operations without DS. |
| 46 | # ${ds_api_wraper}= set variable ${None} | 46 | # ${ds_api_wraper}= set variable ${None} |
| 47 | ${ds_api_wraper}= prepare_ds_api_wrapper ${DS_HOST_URL} ${auth_ds} | 47 | ${ds_api_wraper}= prepare_ds_api_wrapper ${DS_HOST_URL} ${auth_ds} |
| 48 | - ${api_wrapper}= Run Keyword If '${MODE}' == 'planning' | 48 | + ${api_wrapper}= Run Keyword If '${RESOURCE}' == 'plans' |
| 49 | ... prepare_plan_api_wrapper ${USERS.users['${username}'].api_key} ${API_HOST_URL} ${API_VERSION} | 49 | ... prepare_plan_api_wrapper ${USERS.users['${username}'].api_key} ${API_HOST_URL} ${API_VERSION} |
| 50 | ... ELSE prepare_api_wrapper ${USERS.users['${username}'].api_key} ${RESOURCE} ${API_HOST_URL} ${API_VERSION} ${ds_api_wraper} | 50 | ... ELSE prepare_api_wrapper ${USERS.users['${username}'].api_key} ${RESOURCE} ${API_HOST_URL} ${API_VERSION} ${ds_api_wraper} |
| 51 | Set To Dictionary ${USERS.users['${username}']} client=${api_wrapper} | 51 | Set To Dictionary ${USERS.users['${username}']} client=${api_wrapper} |
| @@ -2,6 +2,7 @@ users: | @@ -2,6 +2,7 @@ users: | ||
| 2 | Tender_Owner: | 2 | Tender_Owner: |
| 3 | auth_ds: | 3 | auth_ds: |
| 4 | tenders: [test.quintagroup.com, test.quintagroup.com] | 4 | tenders: [test.quintagroup.com, test.quintagroup.com] |
| 5 | + plans: [test.quintagroup.com, test.quintagroup.com] | ||
| 5 | auctions: [test.quintagroup.com, bc698baa8b814908bc75405ed3d63548] | 6 | auctions: [test.quintagroup.com, bc698baa8b814908bc75405ed3d63548] |
| 6 | api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 | 7 | api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 |
| 7 | broker: Quinta | 8 | broker: Quinta |
| @@ -12,6 +13,7 @@ users: | @@ -12,6 +13,7 @@ users: | ||
| 12 | Tender_User: | 13 | Tender_User: |
| 13 | auth_ds: | 14 | auth_ds: |
| 14 | tenders: [test.quintagroup.com, test.quintagroup.com] | 15 | tenders: [test.quintagroup.com, test.quintagroup.com] |
| 16 | + plans: [test.quintagroup.com, test.quintagroup.com] | ||
| 15 | auctions: [test.quintagroup.com, bc698baa8b814908bc75405ed3d63548] | 17 | auctions: [test.quintagroup.com, bc698baa8b814908bc75405ed3d63548] |
| 16 | api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 | 18 | api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 |
| 17 | broker: Quinta | 19 | broker: Quinta |
| @@ -22,6 +24,7 @@ users: | @@ -22,6 +24,7 @@ users: | ||
| 22 | Tender_User1: | 24 | Tender_User1: |
| 23 | auth_ds: | 25 | auth_ds: |
| 24 | tenders: [test.quintagroup.com, test.quintagroup.com] | 26 | tenders: [test.quintagroup.com, test.quintagroup.com] |
| 27 | + plans: [test.quintagroup.com, test.quintagroup.com] | ||
| 25 | auctions: [test.quintagroup.com, bc698baa8b814908bc75405ed3d63548] | 28 | auctions: [test.quintagroup.com, bc698baa8b814908bc75405ed3d63548] |
| 26 | api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 | 29 | api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 |
| 27 | broker: Quinta | 30 | broker: Quinta |
| @@ -32,6 +35,7 @@ users: | @@ -32,6 +35,7 @@ users: | ||
| 32 | Tender_User2: | 35 | Tender_User2: |
| 33 | auth_ds: | 36 | auth_ds: |
| 34 | tenders: [test.quintagroup.com, test.quintagroup.com] | 37 | tenders: [test.quintagroup.com, test.quintagroup.com] |
| 38 | + plans: [test.quintagroup.com, test.quintagroup.com] | ||
| 35 | auctions: [test.quintagroup.com, bc698baa8b814908bc75405ed3d63548] | 39 | auctions: [test.quintagroup.com, bc698baa8b814908bc75405ed3d63548] |
| 36 | api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 | 40 | api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 |
| 37 | broker: Quinta | 41 | broker: Quinta |
| @@ -42,6 +46,7 @@ users: | @@ -42,6 +46,7 @@ users: | ||
| 42 | Tender_Viewer: | 46 | Tender_Viewer: |
| 43 | auth_ds: | 47 | auth_ds: |
| 44 | tenders: [test.quintagroup.com, test.quintagroup.com] | 48 | tenders: [test.quintagroup.com, test.quintagroup.com] |
| 49 | + plans: [test.quintagroup.com, test.quintagroup.com] | ||
| 45 | auctions: [test.quintagroup.com, bc698baa8b814908bc75405ed3d63548] | 50 | auctions: [test.quintagroup.com, bc698baa8b814908bc75405ed3d63548] |
| 46 | api_key: "" | 51 | api_key: "" |
| 47 | broker: Quinta | 52 | broker: Quinta |
| @@ -19,6 +19,10 @@ fake_uk = Factory.create(locale='uk_UA') | @@ -19,6 +19,10 @@ fake_uk = Factory.create(locale='uk_UA') | ||
| 19 | fake_uk.add_provider(OP_Provider) | 19 | fake_uk.add_provider(OP_Provider) |
| 20 | fake = fake_uk | 20 | fake = fake_uk |
| 21 | used_identifier_id = [] | 21 | used_identifier_id = [] |
| 22 | +mode_open = ["belowThreshold", "aboveThresholdUA", "aboveThresholdEU", | ||
| 23 | + "aboveThresholdUA.defense", "competitiveDialogueUA", "competitiveDialogueEU", "esco"] | ||
| 24 | +mode_limited = ["reporting", "negotiation.quick", "negotiation"] | ||
| 25 | + | ||
| 22 | # This workaround fixes an error caused by missing "catch_phrase" class method | 26 | # This workaround fixes an error caused by missing "catch_phrase" class method |
| 23 | # for the "ru_RU" locale in Faker >= 0.7.4 | 27 | # for the "ru_RU" locale in Faker >= 0.7.4 |
| 24 | fake_ru.add_provider(CompanyProviderEnUs) | 28 | fake_ru.add_provider(CompanyProviderEnUs) |
| @@ -197,8 +201,8 @@ def test_tender_data_planning(params): | @@ -197,8 +201,8 @@ def test_tender_data_planning(params): | ||
| 197 | "name": fake.description(), | 201 | "name": fake.description(), |
| 198 | }, | 202 | }, |
| 199 | "tender": { | 203 | "tender": { |
| 200 | - "procurementMethod": "open", | ||
| 201 | - "procurementMethodType": "belowThreshold", | 204 | + "procurementMethod": "", |
| 205 | + "procurementMethodType": params['mode'], | ||
| 202 | "tenderPeriod": { | 206 | "tenderPeriod": { |
| 203 | "startDate": (get_now().isoformat()) | 207 | "startDate": (get_now().isoformat()) |
| 204 | } | 208 | } |
| @@ -222,6 +226,10 @@ def test_tender_data_planning(params): | @@ -222,6 +226,10 @@ def test_tender_data_planning(params): | ||
| 222 | del item_data['deliveryLocation'] | 226 | del item_data['deliveryLocation'] |
| 223 | del item_data['deliveryDate']['startDate'] | 227 | del item_data['deliveryDate']['startDate'] |
| 224 | data['items'].append(item_data) | 228 | data['items'].append(item_data) |
| 229 | + if params['mode'] in mode_open: | ||
| 230 | + data["tender"]["procurementMethod"] = "open" | ||
| 231 | + if params['mode'] in mode_limited: | ||
| 232 | + data["tender"]["procurementMethod"] = "limited" | ||
| 225 | return munchify(data) | 233 | return munchify(data) |
| 226 | 234 | ||
| 227 | 235 |
| @@ -222,6 +222,16 @@ Get Broker Property By Username | @@ -222,6 +222,16 @@ Get Broker Property By Username | ||
| 222 | [return] ${tender_data} | 222 | [return] ${tender_data} |
| 223 | 223 | ||
| 224 | 224 | ||
| 225 | +Підготувати дані для створення плану | ||
| 226 | + [Arguments] ${tender_parameters} | ||
| 227 | + ${data}= test_tender_data_planning ${tender_parameters} | ||
| 228 | + ${tender_data}= Create Dictionary data=${data} | ||
| 229 | + ${TENDER}= Create Dictionary | ||
| 230 | + Set Global Variable ${TENDER} | ||
| 231 | + Log ${tender_data} | ||
| 232 | + [return] ${tender_data} | ||
| 233 | + | ||
| 234 | + | ||
| 225 | Підготувати дані для створення предмету закупівлі | 235 | Підготувати дані для створення предмету закупівлі |
| 226 | [Arguments] ${cpv} | 236 | [Arguments] ${cpv} |
| 227 | ${item}= test_item_data ${cpv[0:4]} | 237 | ${item}= test_item_data ${cpv[0:4]} |
| @@ -439,7 +449,7 @@ Log differences between dicts | @@ -439,7 +449,7 @@ Log differences between dicts | ||
| 439 | 449 | ||
| 440 | Оновити сторінку | 450 | Оновити сторінку |
| 441 | [Arguments] ${username} | 451 | [Arguments] ${username} |
| 442 | - Run Keyword If '${MODE}' == 'planning' Run As ${username} Оновити сторінку з планом ${TENDER['TENDER_UAID']} | 452 | + Run Keyword If '${RESOURCE}' == 'plans' Run As ${username} Оновити сторінку з планом ${TENDER['TENDER_UAID']} |
| 443 | ... ELSE Run As ${username} Оновити сторінку з тендером ${TENDER['TENDER_UAID']} | 453 | ... ELSE Run As ${username} Оновити сторінку з тендером ${TENDER['TENDER_UAID']} |
| 444 | 454 | ||
| 445 | 455 |
| @@ -4,7 +4,8 @@ Suite Setup Test Suite Setup | @@ -4,7 +4,8 @@ Suite Setup Test Suite Setup | ||
| 4 | Suite Teardown Test Suite Teardown | 4 | Suite Teardown Test Suite Teardown |
| 5 | 5 | ||
| 6 | *** Variables *** | 6 | *** Variables *** |
| 7 | -${MODE} planning | 7 | +${RESOURCE} plans |
| 8 | +${MODE} belowThreshold | ||
| 8 | @{USED_ROLES} tender_owner viewer | 9 | @{USED_ROLES} tender_owner viewer |
| 9 | 10 | ||
| 10 | ${NUMBER_OF_ITEMS} ${2} | 11 | ${NUMBER_OF_ITEMS} ${2} |
| @@ -333,9 +333,6 @@ def prepare_test_tender_data(procedure_intervals, | @@ -333,9 +333,6 @@ def prepare_test_tender_data(procedure_intervals, | ||
| 333 | tender_parameters, | 333 | tender_parameters, |
| 334 | submissionMethodDetails=submissionMethodDetails, | 334 | submissionMethodDetails=submissionMethodDetails, |
| 335 | accelerator=accelerator)}) | 335 | accelerator=accelerator)}) |
| 336 | - elif mode == 'planning': | ||
| 337 | - return munchify({'data': test_tender_data_planning( | ||
| 338 | - tender_parameters)}) | ||
| 339 | # The previous line needs an explicit keyword argument because, | 336 | # The previous line needs an explicit keyword argument because, |
| 340 | # unlike previous functions, this one has three arguments. | 337 | # unlike previous functions, this one has three arguments. |
| 341 | raise ValueError("Invalid mode for prepare_test_tender_data") | 338 | raise ValueError("Invalid mode for prepare_test_tender_data") |
Please
register
or
login
to post a comment