Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions op_robot_tests/tests_files/awarding.robot
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,15 @@ ${NUMBER_OF_AWARDS} ${1}
Звірити відображення поля awards[0].status тендера із active для користувача ${viewer}


Можливість завантажити документ про дискваліфікацію
[Tags] ${USERS.users['${tender_owner}'].broker}: Додання документації
... tender_owner
... ${USERS.users['${tender_owner}'].broker}
... add_rejectionProtocol
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

мабуть варто додати сценарій, де б використовувався цей тест кейс

[Teardown] Оновити LAST_MODIFICATION_DATE
Можливість завантажити протокол скасування в авард 0 користувачем ${tender_owner}


Можливість дискваліфікувати першого кандидата
[Tags] ${USERS.users['${tender_owner}'].broker}: Процес кваліфікації
... tender_owner
Expand Down
28 changes: 28 additions & 0 deletions op_robot_tests/tests_files/base_keywords.robot
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Resource resource.robot
${DIALOGUE_TYPE}= Get Variable Value ${DIALOGUE_TYPE}
Run keyword if '${DIALOGUE_TYPE}' != '${None}' Set to dictionary ${tender_parameters} dialogue_type=${DIALOGUE_TYPE}
${tender_data}= Підготувати дані для створення тендера ${tender_parameters}
Log ${tender_data}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут можна не логувати дані

${adapted_data}= Адаптувати дані для оголошення тендера ${tender_data}
${TENDER_UAID}= Run As ${tender_owner} Створити тендер ${adapted_data}
Set To Dictionary ${USERS.users['${tender_owner}']} initial_data=${adapted_data}
Expand Down Expand Up @@ -99,6 +100,17 @@ Resource resource.robot
Порівняти об'єкти ${len_of_items_before_patch} ${len_of_items_after_patch}


Звірити відображення поля ${field} зміненого предмета ${index} із ${data} для користувача ${username}
${item_id}= get_id_from_object ${USERS.users['${tender_owner}'].initial_data.data['items'][${index}]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

чи є можливість змінювати description предмета?

Звірити поле тендера із значенням ${username} ${TENDER['TENDER_UAID']} ${data} ${field} ${item_id}


Можливість змінити поле ${field_name} предмета ${index} на ${field_value}
${item_id}= get_id_from_object ${USERS.users['${tender_owner}'].initial_data.data['items'][${index}]}
Set To Dictionary ${USERS.users['${tender_owner}']} item_id=${item_id}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

для чого зберігати item_id?

Run As ${tender_owner} Внести зміни в предмет ${item_id} ${TENDER['TENDER_UAID']} ${field_name} ${field_value}


Неможливість додати документацію до лоту
${len_of_documents_before_patch}= Run As ${tender_owner} Отримати кількість документів в тендері ${TENDER['TENDER_UAID']}
${file_path} ${file_name} ${file_content}= create_fake_doc
Expand Down Expand Up @@ -323,6 +335,13 @@ Resource resource.robot
Remove File ${file_path}


Можливість завантажити документ з типом ${doc_type} в пропозицію користувачем ${username}
${file_path} ${file_name} ${file_content}= create_fake_doc
${bid_doc_upload}= Run As ${username} Завантажити документ в ставку з типом ${TENDER['TENDER_UAID']} ${file_path} ${doc_type}
Set To Dictionary ${USERS.users['${username}'].bidresponses} bid_doc_upload=${bid_doc_upload}
Remove File ${file_path}


Можливість змінити документацію цінової пропозиції користувачем ${username}
${file_path} ${file_name} ${file_content}= create_fake_doc
${docid}= Get Variable Value ${USERS.users['${username}'].bidresponses['bid_doc_upload']['upload_response'].data.id}
Expand All @@ -342,9 +361,18 @@ Resource resource.robot
Run As ${username} Завантажити протокол аукціону в авард ${TENDER['TENDER_UAID']} ${auction_protocol_path} ${award_index}
Remove File ${auction_protocol_path}

Можливість завантажити протокол скасування в авард ${award_index} користувачем ${username}
${auction_protocol_path} ${file_title} ${file_content}= create_fake_doc
Run As ${username} Завантажити протокол скасування в авард ${TENDER['TENDER_UAID']} ${auction_protocol_path} ${award_index}
Remove File ${auction_protocol_path}

Можливість підтвердити цінову пропозицію учасником ${username}
Run As ${username} Змінити цінову пропозицію ${TENDER['TENDER_UAID']} status active


Можливість кваліфікувати цінову пропозицію ${bidNumber} користувачем ${username}
Run As ${username} Кваліфікувати пропозицію ${TENDER['TENDER_UAID']} ${bidNumber}

##############################################################################################
# Cancellations
##############################################################################################
Expand Down
67 changes: 67 additions & 0 deletions op_robot_tests/tests_files/brokers/openprocurement_client.robot
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,19 @@ Library openprocurement_client.utils
[return] ${reply}


Завантажити протокол скасування в авард
[Arguments] ${username} ${tender_uaid} ${filepath} ${award_index}
${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid}
${award_id}= Get Variable Value ${tender.data.awards[${award_index}].id}
${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token}
${response}= Call Method ${USERS.users['${username}'].client} upload_award_document ${filepath} ${tender} ${award_id} documents
Keep In Dictionary ${response['data']} id
Set To Dictionary ${response['data']} documentType=rejectionProtocol
${reply}= Call Method ${USERS.users['${username}'].client} patch_award_document ${tender} ${response} ${award_id} ${response['data'].id}
Log ${reply}
[return] ${reply}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ключове слово ідентичне до "Завантажити протокол аукціону в авард" відрізняється лише documentType, можливо краще винести окреме ключове слово Завантажити протокол в авард, в аргументах якого передавати documentType і не дублювати код

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Виніс в окреме ключове слово з можливістю вказати тип документа в аргументі



Завантажити документ в ставку з типом
[Arguments] ${username} ${tender_uaid} ${filepath} ${documentType}
${document}= openprocurement_client.Завантажити документ в ставку ${username} ${filepath} ${tender_uaid}
Expand Down Expand Up @@ -190,6 +203,12 @@ Library openprocurement_client.utils
${tender}= Call Method ${USERS.users['${username}'].client} create_tender ${tender_data}
Log object data ${tender} created_tender
${access_token}= Get Variable Value ${tender.access.token}
Run Keyword If '${mode}' == 'geb'
... Run Keywords
... Set To Dictionary ${tender['data']} status=active.rectification
... AND
... Call Method ${USERS.users['${username}'].client} patch_tender ${tender}
Log ${tender}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лишнє логування для всіх процедур, крім geb

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Виніс в умови яка виконується тільки на процедурі geb

Set To Dictionary ${USERS.users['${username}']} access_token=${access_token}
Set To Dictionary ${USERS.users['${username}']} tender_data=${tender}
Log ${\n}${API_HOST_URL}/api/${API_VERSION}/auctions/${tender.data.id}${\n} WARN
Expand Down Expand Up @@ -265,6 +284,16 @@ Library openprocurement_client.utils
##############################################################################
# Item operations
##############################################################################
Внести зміни в предмет
[Arguments] ${username} ${item_id} ${tender_uaid} ${fieldname} ${fieldvalue}
${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid}
${item_index}= get_object_index_by_id ${tender.data['items']} ${item_id}
${item}= Create Dictionary data=${tender['data']['items'][${item_index}]}
Set_To_Object ${item.data} ${fieldname} ${fieldvalue}
Log ${tender}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

можливо треба було залогувати item, а не tender

${reply}= Call Method ${USERS.users['${username}'].client} patch_item ${tender} ${item}
Log ${reply}


Додати предмет закупівлі
[Arguments] ${username} ${tender_uaid} ${item}
Expand Down Expand Up @@ -344,6 +373,8 @@ Library openprocurement_client.utils
[Arguments] ${username} ${tender_uaid} ${bid}
${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid}
${reply}= Call Method ${USERS.users['${username}'].client} create_bid ${tender} ${bid}
Run Keyword IF '${tender.data.procurementMethodType}' == 'landLease'
... Set To Dictionary ${reply.data} status=pending
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

для цієї умови треба додати patch_bid, в інших випадках patch_bid безтолковий

Log ${reply}
${reply_active}= Call Method ${USERS.users['${username}'].client} patch_bid ${tender} ${reply}
Set To Dictionary ${USERS.users['${username}']} access_token=${reply['access']['token']}
Expand All @@ -365,6 +396,18 @@ Library openprocurement_client.utils
[return] ${reply}


Кваліфікувати пропозицію
[Arguments] ${username} ${tender_uaid} ${bidNumber}
${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid}
${bid}= openprocurement_client.Отримати пропозицію ${username} ${tender_uaid}
${bid_data}= test_bid_qualified ${bidNumber} ${bid.data.id}
Log ${bid_data}
${tender}= set_access_key ${tender} ${USERS.users['${username}'].bidresponses['resp'].access.token}
${reply}= Call Method ${USERS.users['${username}'].client} patch_bid ${tender} ${bid_data}
Log ${reply}
[return] ${reply}


Скасувати цінову пропозицію
[Arguments] ${username} ${tender_uaid}
${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid}
Expand Down Expand Up @@ -649,3 +692,27 @@ Library openprocurement_client.utils
${reply}= Call Method ${USERS.users['${username}'].client} patch_contract_document ${tender} ${response} ${contract_id} ${response['data'].id}
Log ${reply}
[return] ${reply}


##############################################################################
# CONTRACT SIGNING
##############################################################################

Встановити дату підписання угоди
[Arguments] ${username} ${tender_uaid} ${contract_index} ${fieldvalue}
${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid}
${contract}= Create Dictionary data=${tender.data.contracts[${contract_index}]}
Set To Dictionary ${contract.data} dateSigned=${fieldvalue}
${reply}= Call Method ${USERS.users['${username}'].client} patch_contract ${tender} ${contract}
Log ${reply}


Редагувати угоду
[Arguments] ${username} ${tender_uaid} ${contract_index} ${fieldname} ${fieldvalue}
${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid}
${contract}= Create Dictionary data=${tender.data.contracts[${contract_index}]}
Set_to_object ${contract.data} ${fieldname} ${fieldvalue}
${reply}= Call Method ${USERS.users['${username}'].client} patch_contract
... ${tender}
... ${contract}
Log ${reply}
35 changes: 35 additions & 0 deletions op_robot_tests/tests_files/contract_signing.robot
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,27 @@ Suite Teardown Test Suite Teardown
Remove File ${file_path}


Можливість встановити дату підписання угоди
[Tags] ${USERS.users['${tender_owner}'].broker}: Редагування угоди
... tender_owner
... ${USERS.users['${tender_owner}'].broker}
... dateSigned
[Setup] Дочекатись синхронізації з майданчиком ${tender_owner}
[Teardown] Оновити LAST_MODIFICATION_DATE
${dateSigned}= create_fake_date
Set to dictionary ${USERS.users['${tender_owner}']} dateSigned=${dateSigned}
Run As ${tender_owner} Встановити дату підписання угоди ${TENDER['TENDER_UAID']} -1 ${dateSigned}


Відображення дати підписання угоди
[Tags] ${USERS.users['${viewer}'].broker}: Відображення основних даних угоди
... viewer
... ${USERS.users['${viewer}'].broker}
... dateSigned
[Setup] Дочекатись синхронізації з майданчиком ${viewer}
Звірити відображення поля contracts[-1].dateSigned тендера із ${USERS.users['${tender_owner}'].dateSigned} для користувача ${viewer}


Можливість укласти угоду для лоту
[Tags] ${USERS.users['${tender_owner}'].broker}: Процес укладання угоди
... tender_owner
Expand All @@ -58,3 +79,17 @@ Suite Teardown Test Suite Teardown
... ${USERS.users['${viewer}'].broker}
... tender_view
Звірити статус завершення тендера ${viewer} ${TENDER['TENDER_UAID']}


Можливість редагувати вартість угоди
[Tags] ${USERS.users['${tender_owner}'].broker}: Редагування угоди
... tender_owner
... ${USERS.users['${tender_owner}'].broker}
... modify_contract_value
... critical
[Setup] Дочекатись синхронізації з майданчиком ${tender_owner}
[Teardown] Оновити LAST_MODIFICATION_DATE
${award_amount}= Get From Dictionary ${USERS.users['${viewer}'].tender_data.data.awards[0].value} amount
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Словник ${USERS.users['${viewer}'].tender_data.data.awards[0].value} буде пустий в майданчика, бо значення туди записується в тк на відображення поля. Потрібно додати такий тест кейс в с'ют awarding
Або ж використати тут не Get From Dictionary а викликати ківорд Отримати дані із тендера

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Це був лишній рядок. Прибрав з коду.

${amount}= Set Variable create_fake_amount
Set to dictionary ${USERS.users['${tender_owner}']} new_amount=${amount}
Run As ${tender_owner} Редагувати угоду ${TENDER['TENDER_UAID']} 0 value.amount ${amount}
3 changes: 3 additions & 0 deletions op_robot_tests/tests_files/data/brokers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ Default:
dgfOtherAssets:
accelerator: 1440
auction: [25, 30]
geb:
accelerator: 720
auction: [20, 30]
# Synchronization delay, in seconds
timeout_on_wait: 300
Quinta:
Expand Down
Loading