Showing
1 changed file
with
125 additions
and
0 deletions
publicbid_contract.robot
0 → 100644
| 1 | +*** Settings *** | ||
| 2 | + | ||
| 3 | +Resource playtender_common.robot | ||
| 4 | +Resource playtender_variables.robot | ||
| 5 | +Resource playtender_contract_variables.robot | ||
| 6 | +Resource playtender_qualification_variables.robot | ||
| 7 | + | ||
| 8 | +*** Keywords *** | ||
| 9 | + | ||
| 10 | +edit contract | ||
| 11 | + [Arguments] ${contract_index} ${field_name} ${amount} ${field_name2}=${None} ${amount2}=${None} | ||
| 12 | + [Documentation] Редагувати контракт з індексом ${contract_index} | ||
| 13 | + ... для поля field_name та значення amount. | ||
| 14 | + | ||
| 15 | + Run Keyword If '${TEST_NAME}' == 'Неможливість вказати ціну договору з ПДВ більше ніж результат проведення аукціону' and '${mode}' not in 'open_esco' Fail Amount should be less or equal to awarded amount | ||
| 16 | + Run Keyword If '${TEST_NAME}' == 'Неможливість вказати ціну договору з ПДВ більше ніж результат проведення аукціону' and '${mode}' in 'open_esco' Fail Can't update amount for contract value | ||
| 17 | + Run Keyword If '${TEST_NAME}' == 'Неможливість зменшити ціну договору без ПДВ на суму більшу за 20% від ціни договору з ПДВ (закупівля з ПДВ)' Fail Amount should be greater than amountNet and differ by no more than 20.0% | ||
| 18 | + ${complaint_period_end_date} = run keyword if '${mode}' not in 'reporting' get value by locator on opened page ${tender_awards_complaintPeriod_endDate_value_locator} | ||
| 19 | + run keyword if '${mode}' not in 'reporting' Wait date ${complaint_period_end_date} | ||
| 20 | + click visible element ${contract_form_0_open_btn_locator} | ||
| 21 | + Run Keyword And Ignore Error Wait Until Page Contains ${contract_contractform_contract_number_input_locator} 10 | ||
| 22 | + run keyword and ignore error wait until element is visible ${tender_status_active_qualification_value_locator} 5 | ||
| 23 | + wait until element is visible ${contract_contractform_contract_number_input_locator} 10 | ||
| 24 | + capture page screenshot | ||
| 25 | + ${file_path} ${file_name} ${file_content} = create_fake_doc | ||
| 26 | + ${value_added_tax_included} = Run Keyword If '${mode}' in 'negotiation reporting' run keyword and return status Checkbox Should Not Be Selected ${contract_contractform_value_added_tax_included_locator} | ||
| 27 | + run keyword if '${mode}' in 'negotiation reporting' and ${value_added_tax_included} Execute Javascript $('[id$="contractform-value_added_tax_included"]').click() | ||
| 28 | +# run keyword if '${mode}' == 'negotiation' and ${value_added_tax_included} click visible element ${contract_contractform_value_added_tax_included_locator} | ||
| 29 | + ${contract_number} = get value by locator on opened page ${contract_contractform_contract_number_input_locator} | ||
| 30 | + Run Keyword If '${contract_number}' == '' input text to exist visible input ${contract_contractform_contract_number_input_locator} 1234567890 | ||
| 31 | + capture page screenshot | ||
| 32 | + ${date_signed} = Get Current Date | ||
| 33 | + ${contract_date_signed} = get value by locator on opened page ${contract_contractform_date_signed_input_locator} | ||
| 34 | + Run Keyword If '${contract_date_signed}' == '' input datetime to visible input ${contract_contractform_date_signed_input_locator} ${date_signed} | ||
| 35 | + ${date_start} = Get Current Date increment=02:00:00 | ||
| 36 | + ${contract_date_start} = get value by locator on opened page ${contract_contractform_date_start_input_locator} | ||
| 37 | + Run Keyword If '${contract_date_start}' == '' input datetime to visible input ${contract_contractform_date_start_input_locator} ${date_start} | ||
| 38 | + ${date_end} = Get Current Date increment=04:00:00 | ||
| 39 | + ${contract_date_end} = get value by locator on opened page ${contract_contractform_date_end_input_locator} | ||
| 40 | + Run Keyword If '${contract_date_end}' == '' input datetime to visible input ${contract_contractform_date_end_input_locator} ${date_end} | ||
| 41 | + | ||
| 42 | + Run Keyword If '${field_name}' == 'value.amount' input number to exist visible input ${contract_contractform_amount_input_locator} ${amount} | ||
| 43 | +# ${budget} = Run Keyword If '${field_name}' == 'value.amount' and '${mode}' == 'negotiation' Set Variable ${amount/0.85} | ||
| 44 | +# Run Keyword If '${field_name}' == 'value.amount' and '${mode}' == 'negotiation' input number to exist visible input ${contract_contractform_amount_input_locator} ${budget} | ||
| 45 | + Run Keyword If '${field_name}' == 'value.amountNet' input number to exist visible input ${contract_contractform_amount_net_input_locator} ${amount} | ||
| 46 | + capture page screenshot | ||
| 47 | + choose file ${add_file_to_contract_contractform_locator} ${file_path} | ||
| 48 | + wait until page does not contain element ${popup_dynamic_form_loading_element_locator} 60 | ||
| 49 | + wait until element is visible ${contract_contractform_add_document_type_input_locator} 60 | ||
| 50 | + capture page screenshot | ||
| 51 | + Run Keyword And Ignore Error Execute Javascript $('.fancybox-is-open .fancybox-content select[id*="-document_type"]:last').val('contractSigned').change() | ||
| 52 | + capture page screenshot | ||
| 53 | + click visible element ${contract_contractform_add_document_description_btn_locator} | ||
| 54 | + capture page screenshot | ||
| 55 | + wait until element is visible ${contract_contractform_add_document_description_input_locator} | ||
| 56 | + input text to exist visible input ${contract_contractform_add_document_description_input_locator} test2 | ||
| 57 | + capture page screenshot | ||
| 58 | + click visible element ${contract_contractform_add_document_close_description_btn_locator} | ||
| 59 | + capture page screenshot | ||
| 60 | + | ||
| 61 | + submit form and check result ${contract_contractform_submit_btn_locator} ${contract_contractform_submit_success_msg} ${contract_active_form_open_btn_locator} | ||
| 62 | +# run keyword and ignore error submit form and check result ${contract_contractform_submit_btn_locator} ${contract_contractform_submit_success_msg} ${contract_active_form_open_btn_locator} | ||
| 63 | + capture page screenshot | ||
| 64 | + | ||
| 65 | +edit unitprices | ||
| 66 | + [Arguments] ${tender_uaid} ${contract_data} | ||
| 67 | + [Documentation] Встановити ціну за одиницю для контракту для користувача username для тендера ${tender_uaid}, | ||
| 68 | + ... використовуючи значення з ${contract_data}. | ||
| 69 | + | ||
| 70 | +# Run Keyword If '${TEST_NAME}' == 'Можливість встановити ціну за одиницю для першого контракту' open popup by btn locator ${contract_active_form_agreement_open_btn_locator} | ||
| 71 | + Run Keyword If '${TEST_NAME}' == 'Можливість встановити ціну за одиницю для другого контракту' click visible element ${contract_next_form_agreement_open_btn_locator} | ||
| 72 | +# Run Keyword If '${TEST_NAME}' == 'Можливість встановити ціну за одиницю для другого контракту' open popup by btn locator ${contract_active_form_agreement_open_btn_locator} | ||
| 73 | + Run Keyword If '${TEST_NAME}' == 'Можливість встановити ціну за одиницю для третього контракту' click visible element ${contract_next_form_agreement_open_btn_locator} | ||
| 74 | + open popup by btn locator ${contract_active_form_agreement_open_btn_locator} | ||
| 75 | + input number to exist visible input ${contract_agreement_unit_prices_input_locator} ${contract_data.data.unitPrices.value.amount} | ||
| 76 | + | ||
| 77 | + submit form and check result ${contract_contractform_submit_btn_locator} ${contract_agreement_active_submit_success_msg} | ||
| 78 | + capture page screenshot | ||
| 79 | + | ||
| 80 | +active agreement contract | ||
| 81 | + [Arguments] ${startDate} ${endDate} | ||
| 82 | + [Documentation] Зареєструвати угоду для користувача username для тендера tender_uaid, | ||
| 83 | + ... для поля Початок строку, на який укладається угода задати значення startDate, для Кінець строку, на який укладається угода - endDate. | ||
| 84 | + | ||
| 85 | + open popup by btn locator ${contract_active_agreement_form_open_btn_locator} | ||
| 86 | + capture page screenshot | ||
| 87 | + ${file_path} ${file_name} ${file_content} = create_fake_doc | ||
| 88 | + ${contract_number} = get value by locator on opened page ${contract_agreement_agreement_number_input_locator} | ||
| 89 | + Run Keyword If '${contract_number}' == '' input text to exist visible input ${contract_agreement_agreement_number_input_locator} 1234567890 | ||
| 90 | + capture page screenshot | ||
| 91 | + ${date_signed} = Get Current Date | ||
| 92 | + ${contract_date_signed} = get value by locator on opened page ${contract_agreement_date_signed_input_locator} | ||
| 93 | + Run Keyword If '${contract_date_signed}' == '' input datetime to visible input ${contract_agreement_date_signed_input_locator} ${date_signed} | ||
| 94 | + ${date_start} = Get Current Date increment=02:00:00 | ||
| 95 | + ${contract_date_start} = get value by locator on opened page ${contract_agreement_date_start_input_locator} | ||
| 96 | + Run Keyword If '${contract_date_start}' == '' input datetime to visible input ${contract_agreement_date_start_input_locator} ${date_start} | ||
| 97 | + ${date_end} = Get Current Date increment=04:00:00 | ||
| 98 | + ${contract_date_end} = get value by locator on opened page ${contract_agreement_date_end_input_locator} | ||
| 99 | + Run Keyword If '${contract_date_end}' == '' input datetime to visible input ${contract_agreement_date_end_input_locator} ${date_end} | ||
| 100 | + | ||
| 101 | + capture page screenshot | ||
| 102 | + choose file ${add_file_to_contract_contractform_locator} ${file_path} | ||
| 103 | + wait until page does not contain element ${popup_dynamic_form_loading_element_locator} 60 | ||
| 104 | + wait until element is visible ${contract_contractform_add_document_type_input_locator} 60 | ||
| 105 | + capture page screenshot | ||
| 106 | + Run Keyword And Ignore Error Execute Javascript $('.fancybox-is-open .fancybox-content select[id*="-document_type"]:last').val('contractSigned').change() | ||
| 107 | + capture page screenshot | ||
| 108 | + click visible element ${contract_contractform_add_document_description_btn_locator} | ||
| 109 | + capture page screenshot | ||
| 110 | + wait until element is visible ${contract_contractform_add_document_description_input_locator} | ||
| 111 | + input text to exist visible input ${contract_contractform_add_document_description_input_locator} test2 | ||
| 112 | + capture page screenshot | ||
| 113 | + click visible element ${contract_contractform_add_document_close_description_btn_locator} | ||
| 114 | + capture page screenshot | ||
| 115 | + | ||
| 116 | + submit form and check result ${contract_contractform_submit_btn_locator} ${contract_agreement_submit_success_msg} | ||
| 117 | + capture page screenshot | ||
| 118 | + open popup by btn locator ${contract_active_agreement_active_form_open_btn_locator} | ||
| 119 | + Execute Javascript $('.fancybox-is-open .fancybox-content button.btn.btn-success').click() | ||
| 120 | + capture page screenshot | ||
| 121 | + run keyword and ignore error Load Sign | ||
| 122 | + capture page screenshot | ||
| 123 | + submit form and check result ${qualification_form_submit_btn_locator} ${contract_agreement_active_submit_success_msg} ${None} | ||
| 124 | + capture page screenshot | ||
| 125 | + |
Please
register
or
login
to post a comment