Commit 46d8db338f6cd68ccc0afbb8772f8160bc77dbbb

Authored by Playtenders
1 parent cbde2c7c

rename files

Showing 1 changed file with 316 additions and 0 deletions
  1 +*** Settings ***
  2 +
  3 +Resource playtender_common.robot
  4 +Resource playtender_variables.robot
  5 +Resource playtender_bid_variables.robot
  6 +Resource playtender_qualification_variables.robot
  7 +
  8 +*** Keywords ***
  9 +
  10 +
  11 +open tender form prequalification
  12 + [Arguments] ${qualification_num}
  13 + [Documentation] Відкрити форму прекваліфікації і потрібну кваліфікацію під номером qualification_num
  14 +
  15 + run keyword if ${qualification_num} == 0 wait until page contains element with reloading ${prequalification_form_0_open_btn_locator}
  16 + run keyword if ${qualification_num} == 0 open popup by btn locator ${prequalification_form_0_open_btn_locator}
  17 + run keyword if ${qualification_num} == 1 open popup by btn locator ${prequalification_form_1_open_btn_locator}
  18 + run keyword if ${qualification_num} == -1 open popup by btn locator ${prequalification_form_-1_open_btn_locator}
  19 + run keyword if ${qualification_num} == -2 wait until page contains element with reloading ${prequalification_form_-2_open_btn_locator}
  20 + run keyword if ${qualification_num} == -2 open popup by btn locator ${prequalification_form_-2_open_btn_locator}
  21 +# run keyword if ${qualification_num} == -2 execute javascript $('#bids-pjax .pseudo-table__row:last a[href*="/tender/prequalification"]').click()
  22 +
  23 +confirm qualifications
  24 + [Documentation] Відкрити форму прекваліфікації і перевести кваліфікацію під номером qualification_num до тендера
  25 + ... tender_uaid в статус active.
  26 +
  27 + Execute Javascript $('#prequalificationform-decision').val('accept').change()
  28 + capture page screenshot
  29 + wait until page contains element ${prequalification_form_eligible_input_locator}
  30 + capture page screenshot
  31 + click visible element ${prequalification_form_eligible_input_locator}
  32 + click visible element ${prequalification_form_qualified_input_locator}
  33 + submit form and check result ${qualification_form_submit_btn_locator} ${qualification_form_submit_success_msg} ${tender_created_checker_element_locator}
  34 +
  35 +reject qualifications
  36 + [Documentation] Відкрити форму прекваліфікації і перевестикваліфікацію під номером qualification_num до тендера
  37 + ... tender_uaid в статус unsuccessful.
  38 +
  39 + Execute Javascript $('#prequalificationform-decision').val('decline').change()
  40 + capture page screenshot
  41 +# wait until page contains element ${qualification_form_reasons_cancellation_input_locator}
  42 +# capture page screenshot
  43 +# input text to exist visible input ${qualification_form_reasons_cancellation_input_locator} GenerateFakeText
  44 + Execute Javascript ${prequalification_form_title_cancellation_input_locator}
  45 + capture page screenshot
  46 +# input text to exist visible input ${qualification_form_reasons_cancellation_input_locator} GenerateFakeText
  47 + input text to exist visible input ${prequalification_form_description_cancellation_input_locator} GenerateFakeText
  48 + capture page screenshot
  49 + submit form and check result ${qualification_form_submit_btn_locator} ${qualification_form_decline_success_msg} ${tender_created_checker_element_locator}
  50 + capture page screenshot
  51 +
  52 +cancel qualifications
  53 + [Documentation] Відкрити форму прекваліфікації і перевести кваліфікацію під номером qualification_num до тендера
  54 + ... tender_uaid в статус cancelled.
  55 +
  56 + wait until page contains element ${prequalification_form_description_cancellation_input_locator}
  57 + Execute Javascript $('#prequalificationform-decision').val('cancel').change()
  58 +# select from visible list by label ${tender_form_award_organization_region_id_locator} ${region}
  59 + capture page screenshot
  60 + wait until page contains element ${prequalification_form_description_cancellation_input_locator}
  61 + capture page screenshot
  62 + input text to exist visible input ${prequalification_form_description_cancellation_input_locator} GenerateFakeText
  63 + capture page screenshot
  64 + submit form and check result ${qualification_form_submit_btn_locator} ${qualification_form_cancel_success_msg} ${tender_created_checker_element_locator}
  65 +
  66 +approve the final qualification decision
  67 + [Documentation] Перевести тендер tender_uaid в статус active.pre-qualification.stand-still.
  68 +
  69 + wait until alert is visible ${qualification_form_approve_question_msg}
  70 + click visible element ${alert_confirm_btn_locator}
  71 + wait until alert is visible ${qualification_form_approve_success_msg}
  72 + close current visible alert
  73 +
  74 + wait until page does not contain element ${alert_confirm_btn_locator}
  75 +
  76 +# wait until page contains ${qualification_form_approve_question_msg}
  77 +# Execute Javascript ${qualification_form_approve_js_submit_btn_locator}
  78 +# Wait Until Page Contains ${qualification_form_approve_success_msg} 60
  79 +# wait until alert is visible ${qualification_form_approve_success_msg}
  80 +# run keyword and ignore error run keyword if condition is not none ${qualification_form_approve_success_msg} close current visible alert
  81 + run keyword and ignore error Wait Until Keyword Succeeds 1600 s 20 s Wait For QualificationsPeriodEnd
  82 +
  83 +#qualification
  84 +open tender form qualification
  85 + [Arguments] ${award_num}
  86 + [Documentation] Відкрити форму кваліфікації і потрібну кваліфікацію під номером award_num
  87 +
  88 + run keyword if "${mode}" not in "open_framework" Run Keywords
  89 + ... run keyword if ${award_num} == 0 wait until page contains element with reloading ${qualification_form_0_open_btn_locator}
  90 + ... AND run keyword if ${award_num} == 0 open popup by btn locator ${qualification_form_0_open_btn_locator}
  91 +##### BOF - TMP #####
  92 + ... AND run keyword if ${award_num} == 1 open popup by btn locator ${qualification_form_1_open_btn_locator}
  93 + ... AND run keyword if ${award_num} == -1 open popup by btn locator ${qualification_form_last_open_btn_locator}
  94 + ... AND run keyword if ${award_num} == 2 open popup by btn locator ${qualification_form_2_open_btn_locator}
  95 + ... ELSE IF "${mode}" in "open_framework" Run Keywords
  96 + ... run keyword if ${award_num} == 0 wait until page contains element with reloading ${qualification_form_0_open_btn_locator}
  97 + ... AND run keyword if ${award_num} == 0 open popup by btn locator ${qualification_form_0_open_btn_locator}
  98 + ... AND run keyword if ${award_num} == 1 open popup by btn locator ${qualification_form_1_open_btn_locator}
  99 + ... AND run keyword if ${award_num} == -1 open popup by btn locator ${qualification_form_last_open_btn_locator}
  100 + ... AND run keyword if ${award_num} == 2 open popup by btn locator ${qualification_form_2_open_btn_locator}
  101 + ... AND run keyword if ${award_num} == 3 open popup by btn locator ${qualification_form_3_open_btn_locator}
  102 +
  103 +copy file qualification
  104 + [Arguments] ${username} ${document} ${award_num}
  105 + [Documentation] Завантажити документ, який знаходиться по шляху document до
  106 + ... постачальника під номером award_num для тендера tender_uaid.
  107 +
  108 + ## copy file to another dir to prevent it deleting
  109 + ${new_doc_name} = Replace String ${document} /tmp/ /tmp/playtender/
  110 + Copy File ${document} ${new_doc_name}
  111 + Set To Dictionary ${USERS.users['${username}']} qproposal${award_num}_document=${new_doc_name}
  112 +
  113 +confirm award qualification
  114 + [Arguments] ${username} ${award_num}
  115 + [Documentation] Перевести постачальника під номером award_num для тендера tender_uaid
  116 + ... в статус active.
  117 +
  118 + Wait Until Page Contains ${popup_opened_content_success_locator} 60
  119 + run keyword and ignore error wait until element is visible ${tender_status_active_qualification_value_locator} 10
  120 + wait until element is visible ${qualification_form_submit_btn_locator} 60
  121 +# ${doc_isset}= GetDictionaryKeyExist ${USERS.users['${username}']} qproposal${award_num}_document
  122 +# ${doc_name}= Run Keyword If ${doc_isset} GetValueFromDictionaryByKey ${USERS.users['${username}']} qproposal${award_num}_document
  123 +# ... ELSE create_fake_doc
  124 + ${file_path} ${file_name} ${file_content} = create_fake_doc
  125 +# Execute Javascript ${qualification_form_accept_input_locator}
  126 + Execute Javascript $('#qualificationform-decision').val('accept').change()
  127 +# select from visible list by label ${tender_form_award_organization_region_id_locator} ${region}
  128 + capture page screenshot
  129 + run keyword and ignore error wait until page contains element ${qualification_form_eligible_input_locator}
  130 + capture page screenshot
  131 +# run keyword and ignore error click visible element ${qualification_form_eligible_input_locator}
  132 +# run keyword and ignore error click visible element ${qualification_form_qualified_input_locator}
  133 + run keyword and ignore error Execute Javascript $('#qualificationform-qualified').click()
  134 + run keyword and ignore error Execute Javascript $('#qualificationform-eligible').click()
  135 + choose file ${add_file_to_qualification_form_locator} ${file_path}
  136 + wait until page does not contain element ${popup_dynamic_form_loading_element_locator} 60
  137 + wait until element is visible ${qualification_form_add_document_type_input_locator} 60
  138 +# submit current visible popup
  139 +
  140 + Run Keyword And Ignore Error Execute Javascript $('.fancybox-is-open .fancybox-content select[id*="-document_type"]:last').val('winningBid').change()
  141 + capture page screenshot
  142 + click visible element ${qualification_form_add_document_description_btn_locator}
  143 + capture page screenshot
  144 + wait until element is visible ${qualification_form_add_document_description_input_locator}
  145 + input text to exist visible input ${qualification_form_add_document_description_input_locator} test2
  146 + capture page screenshot
  147 + click visible element ${qualification_form_add_document_close_description_btn_locator}
  148 + capture page screenshot
  149 +
  150 + run keyword and ignore error click visible element ${qualification_ecp_check_input_locator}
  151 + capture page screenshot
  152 + run keyword and ignore error submit form and check result ${qualification_form_submit_btn_locator} ${qualification_award_form_submit_success_msg} ${qualification_form_submit_btn_locator}
  153 + capture page screenshot
  154 + wait until element is visible ${qualification_form_submit_btn_locator} 60
  155 +## run keyword and ignore error submit form and check result ${qualification_form_submit_btn_locator} ${None} ${qualification_ecp_form_open_locator}
  156 + Execute Javascript $('.fancybox-is-open .fancybox-content button.btn.btn-success').click()
  157 +# click visible element ${qualification_form_submit_btn_locator}
  158 + capture page screenshot
  159 + wait until element is visible ${qualification_form_submit_btn_locator} 60
  160 + wait until element is visible ${qualification_ecp_form_open_locator} 60
  161 + run keyword and ignore error wait until element is visible ${tender_status_active_qualification_value_locator} 10
  162 + capture page screenshot
  163 + run keyword and ignore error Load Sign
  164 + capture page screenshot
  165 + wait until element is visible ${qualification_form_submit_btn_locator} 60
  166 + run keyword and ignore error wait until element is visible ${tender_status_active_qualification_value_locator} 10
  167 + capture page screenshot
  168 + run keyword and ignore error submit form and check result ${qualification_form_submit_btn_locator} ${qualification_award_after_ecp_form_submit_success_msg} ${None}
  169 + capture page screenshot
  170 +# Wait Until Page Contains ЕЦП/КЕП успішно накладено на рішення, тепер потрібно підтвердити рішення. 60
  171 +# click visible element xpath=//div[contains(@class, 'jconfirm')]//*[text()='Закрити']
  172 +
  173 +
  174 +reject award qualification
  175 + [Arguments] ${username} ${award_num}
  176 + [Documentation] Перевести постачальника під номером award_num для тендера tender_uaid
  177 + ... в статус active.
  178 +
  179 + Wait Until Page Contains ${popup_opened_content_success_locator} 60
  180 + wait until element is visible ${qualification_form_submit_btn_locator} 60
  181 +# wait until popup is visible
  182 + ${doc_isset} = GetDictionaryKeyExist ${USERS.users['${username}']} qproposal${award_num}_document
  183 +# ${doc_name} = Run Keyword If ${doc_isset} GetValueFromDictionaryByKey ${USERS.users['${username}']} qproposal${award_num}_document
  184 +# ... ELSE GenerateFakeDocument
  185 + ${file_path} ${file_name} ${file_content} = create_fake_doc
  186 + Execute Javascript $('#qualificationform-decision').val('decline').change()
  187 + capture page screenshot
  188 +# select from visible list by label ${tender_form_award_organization_region_id_locator} ${region}
  189 + wait until page contains element ${qualification_form_reasons_cancellation_input_locator}
  190 + capture page screenshot
  191 + Execute Javascript ${qualification_award_form_title_cancellation_input_locator}
  192 + capture page screenshot
  193 +# input text to exist visible input ${qualification_form_reasons_cancellation_input_locator} GenerateFakeText
  194 + input text to exist visible input ${qualification_form_description_cancellation_input_locator} GenerateFakeText
  195 +
  196 + choose file ${add_file_to_qualification_form_locator} ${file_path}
  197 + wait until element is visible ${qualification_form_add_document_type_input_locator}
  198 +# submit current visible popup
  199 +
  200 + Run Keyword And Ignore Error Execute Javascript $('.fancybox-is-open .fancybox-content #qualification-documents select[id*="-document_type"]:last').val('winningBid').change()
  201 + capture page screenshot
  202 + click visible element ${qualification_form_add_document_description_btn_locator}
  203 + wait until element is visible ${qualification_form_add_document_description_input_locator}
  204 + input text to exist visible input ${qualification_form_add_document_description_input_locator} test2
  205 + capture page screenshot
  206 + click visible element ${qualification_form_add_document_close_description_btn_locator}
  207 + capture page screenshot
  208 +
  209 + submit form and check result ${qualification_form_submit_btn_locator} ${qualification_form_cancell_success_msg}
  210 + run keyword and ignore error wait until element is visible ${tender_status_active_qualification_value_locator} 10
  211 + capture page screenshot
  212 + Execute Javascript $('.fancybox-is-open .fancybox-content button.btn.btn-success').click()
  213 + capture page screenshot
  214 + run keyword and ignore error Load Sign
  215 + capture page screenshot
  216 + wait until element is visible ${qualification_form_submit_btn_locator} 60
  217 + run keyword and ignore error wait until element is visible ${tender_status_active_qualification_value_locator} 10
  218 + capture page screenshot
  219 + run keyword and ignore error submit form and check result ${qualification_form_submit_btn_locator} ${qualification_award_after_ecp_form_submit_success_msg} ${None}
  220 + capture page screenshot
  221 + reload page
  222 +
  223 +cancel award qualification
  224 + [Documentation] Відкрити форму кваліфікації і перевести кваліфікацію під номером qualification_num до тендера
  225 + ... tender_uaid в статус cancelled.
  226 +
  227 + wait until element is visible ${qualification_form_submit_btn_locator} 60
  228 +# Execute Javascript ${qualification_form_cancel_input_locator}
  229 + Execute Javascript $('#qualificationform-decision').val('cancel').change()
  230 +# select from visible list by label ${tender_form_award_organization_region_id_locator} ${region}
  231 + capture page screenshot
  232 + run keyword and ignore error wait until page contains element ${qualification_form_description_cancellation_input_locator}
  233 + capture page screenshot
  234 + run keyword and ignore error Execute Javascript ${qualification_award_form_title_decline_input_locator}
  235 + run keyword and ignore error input text to exist visible input ${qualification_form_description_cancellation_input_locator} GenerateFakeText
  236 + capture page screenshot
  237 + submit form and check result ${qualification_form_submit_btn_locator} ${qualification_form_cancel_success_msg} ${tender_created_checker_element_locator}
  238 +
  239 +#qualification awawd reporting and negotiotion
  240 +confirm award
  241 + [Arguments] ${document}
  242 + [Documentation] Перевести постачальника в статус active.
  243 +
  244 + run keyword and ignore error run keyword if '${mode}' in 'negotiation reporting' Wait Until Page Contains ${award_form_negotiation_submit_success_msg} 10
  245 +# run keyword and ignore error run keyword if '${mode}' in 'negotiation reporting' wait until alert is visible ${award_form_negotiation_submit_success_msg}
  246 + run keyword and ignore error run keyword if '${mode}' in 'negotiation reporting' close current visible alert
  247 +
  248 + capture page screenshot
  249 + wait until page contains element with reloading ${qualification_form_0_open_btn_locator}
  250 + open popup by btn locator ${qualification_form_0_open_btn_locator}
  251 +# ${file_path} ${file_name} ${file_content} = create_fake_doc
  252 + Execute Javascript $('#qualificationform-decision').val('accept').change()
  253 + capture page screenshot
  254 +# run keyword and ignore error wait until page contains element ${award_form_qualified_input_locator}
  255 + capture page screenshot
  256 + run keyword and ignore error click visible element ${award_form_qualified_input_locator}
  257 + choose file ${add_file_to_qualification_form_locator} ${document}
  258 +# wait until page does not contain element ${popup_dynamic_form_loading_element_locator} 60
  259 + wait until element is visible ${qualification_form_add_document_type_input_locator} 60
  260 +# submit current visible popup
  261 +
  262 + Run Keyword And Ignore Error Execute Javascript $('.fancybox-is-open .fancybox-content select[id*="-document_type"]:last').val('winningBid').change()
  263 + capture page screenshot
  264 + click visible element ${qualification_form_add_document_description_btn_locator}
  265 + capture page screenshot
  266 + wait until element is visible ${qualification_form_add_document_description_input_locator}
  267 + input text to exist visible input ${qualification_form_add_document_description_input_locator} test2
  268 + capture page screenshot
  269 + click visible element ${qualification_form_add_document_close_description_btn_locator}
  270 + capture page screenshot
  271 +
  272 +# run keyword and ignore error run keyword if '${mode}' in 'reporting' submit form and check result ${qualification_form_submit_btn_locator} ${qualification_award_form_submit_success_msg}
  273 + capture page screenshot
  274 +# run keyword and ignore error run keyword if '${mode}' in 'reporting' wait until page contains element with reloading ${qualification_form_0_open_btn_locator}
  275 + capture page screenshot
  276 +# run keyword and ignore error run keyword if '${mode}' in 'reporting' open popup by btn locator ${qualification_form_0_open_btn_locator}
  277 + run keyword and ignore error run keyword if '${mode}' in 'reporting' Execute Javascript $('[id$="qualificationform-tender_not_signed_qualification_confirmation_required"]').click()
  278 + capture page screenshot
  279 +# run keyword and ignore error run keyword if '${mode}' in 'reporting' Execute Javascript $('#qualificationform-decision').val('accept').change()
  280 + run keyword and ignore error run keyword if '${mode}' in 'negotiation' Execute Javascript $('[id$="qualificationform-qualified"]').click()
  281 + capture page screenshot
  282 + run keyword and ignore error submit form and check result ${qualification_form_submit_btn_locator} ${qualification_award_form_submit_success_msg} ${qualification_form_submit_btn_locator}
  283 + capture page screenshot
  284 + run keyword and ignore error click visible element ${qualification_ecp_check_input_locator}
  285 + capture page screenshot
  286 + wait until element is visible ${qualification_form_submit_btn_locator} 60
  287 +# run keyword and ignore error submit form and check result ${qualification_form_submit_btn_locator} ${None} ${qualification_ecp_form_open_locator}
  288 + Execute Javascript $('.fancybox-is-open .fancybox-content button.btn.btn-success').click()
  289 +# click visible element ${qualification_form_submit_btn_locator}
  290 + capture page screenshot
  291 + wait until element is visible ${qualification_form_submit_btn_locator} 60
  292 + wait until element is visible ${qualification_ecp_form_open_locator} 60
  293 + run keyword and ignore error wait until element is visible ${tender_status_active_qualification_value_locator} 10
  294 + capture page screenshot
  295 + run keyword and ignore error Load Sign
  296 + capture page screenshot
  297 + wait until element is visible ${qualification_form_submit_btn_locator} 60
  298 + run keyword and ignore error wait until element is visible ${tender_status_active_qualification_value_locator} 10
  299 + capture page screenshot
  300 + run keyword and ignore error submit form and check result ${qualification_form_submit_btn_locator} ${qualification_award_after_ecp_form_submit_success_msg} ${None}
  301 + capture page screenshot
  302 +
  303 +confirm awards
  304 + [Documentation] Перевести постачальників для тендера tender_uaid
  305 + ... в статус active.
  306 +
  307 + wait until page contains element with reloading ${qualification_agreement_form_approve_submit_btn_locator} 720 30
  308 + click visible element ${qualification_agreement_form_approve_submit_btn_locator}
  309 + wait until page contains ${qualification_agreement_form_approve_question_msg}
  310 + Execute Javascript ${qualification_form_approve_js_submit_btn_locator}
  311 + Wait Until Page Contains ${qualification_agreement_form_approve_success_msg} 60
  312 + wait until alert is visible ${qualification_agreement_form_approve_success_msg}
  313 + run keyword and ignore error run keyword if condition is not none ${qualification_agreement_form_approve_success_msg} close current visible alert
  314 + Wait Until Keyword Succeeds 800 s 20 s Wait For QualificationsPeriodEnd
  315 +
  316 +
... ...
Please register or login to post a comment