Commit e3018bb78bd0c700d76b3a6d68bf224289c4af0d
1 parent
001ae27d
plans
- added: adding/removing plan item
Showing
4 changed files
with
36 additions
and
4 deletions
| @@ -44,8 +44,7 @@ Resource playtender_plan. | @@ -44,8 +44,7 @@ Resource playtender_plan. | ||
| 44 | 44 | ||
| 45 | open new plan form | 45 | open new plan form |
| 46 | fill plan form ${plan_data['data']} | 46 | fill plan form ${plan_data['data']} |
| 47 | - submit form and check result ${plan_form_submit_btn_locator} ${plan_form_submit_success_msg} ${plan_created_checker_element_locator} | ||
| 48 | - wait until page does not contain element with reloading ${plan_sync_element_locator} | 47 | + save plan form and wait synchronization |
| 49 | ${plan_uaid} = get text ${plan_uaid_text_locator} | 48 | ${plan_uaid} = get text ${plan_uaid_text_locator} |
| 50 | [Return] ${plan_uaid} | 49 | [Return] ${plan_uaid} |
| 51 | 50 | ||
| @@ -69,5 +68,22 @@ Resource playtender_plan. | @@ -69,5 +68,22 @@ Resource playtender_plan. | ||
| 69 | ${plan_data} = generate dictionary from field path and value ${fieldname} ${fieldvalue} | 68 | ${plan_data} = generate dictionary from field path and value ${fieldname} ${fieldvalue} |
| 70 | open plan form by uaid ${plan_uaid} | 69 | open plan form by uaid ${plan_uaid} |
| 71 | fill plan form ${plan_data} | 70 | fill plan form ${plan_data} |
| 72 | - submit form and check result ${plan_form_submit_btn_locator} ${plan_form_submit_success_msg} ${plan_created_checker_element_locator} | ||
| 73 | - wait until page does not contain element with reloading ${plan_sync_element_locator} | 71 | + save plan form and wait synchronization |
| 72 | + | ||
| 73 | +Додати предмет закупівлі в план | ||
| 74 | + [Arguments] ${username} ${plan_uaid} ${item_data} | ||
| 75 | + [Documentation] Додати дані про предмет item до плану plan_uaid. | ||
| 76 | + | ||
| 77 | + open plan form by uaid ${plan_uaid} | ||
| 78 | + ${items} = create list ${item_data} | ||
| 79 | + fill plan form items ${items} | ||
| 80 | + save plan form and wait synchronization | ||
| 81 | + | ||
| 82 | +Видалити предмет закупівлі плану | ||
| 83 | + [Arguments] ${username} ${plan_uaid} ${item_id} | ||
| 84 | + [Documentation] Видалити з плану plan_uaid предмет з item_id в описі. | ||
| 85 | + | ||
| 86 | + open plan form by uaid ${plan_uaid} | ||
| 87 | + ${delete_item_btn_locator} = replace string ${plan_form_remove_item_btn_locator_tpl} %title% ${item_id} | ||
| 88 | + click removing form item and wait success result ${delete_item_btn_locator} | ||
| 89 | + save plan form and wait synchronization |
| @@ -86,6 +86,15 @@ click visible element and wait until page contains element | @@ -86,6 +86,15 @@ click visible element and wait until page contains element | ||
| 86 | click visible element ${locator} | 86 | click visible element ${locator} |
| 87 | wait until page contains element ${checker_element_locator} ${waiting_timeout} ${waiting_error} | 87 | wait until page contains element ${checker_element_locator} ${waiting_timeout} ${waiting_error} |
| 88 | 88 | ||
| 89 | +click removing form item and wait success result | ||
| 90 | + [Arguments] ${locator} | ||
| 91 | + [Documentation] натискає кнопку видалення, очікує успішне повідомлення і закриває повідомлення | ||
| 92 | + | ||
| 93 | + click visible element ${locator} | ||
| 94 | + wait until alert is visible | ||
| 95 | + click visible element ${alert_confirm_btn_locator} | ||
| 96 | + wait until page does not contain element ${alert_confirm_btn_locator} | ||
| 97 | + | ||
| 89 | input text to visible input | 98 | input text to visible input |
| 90 | [Arguments] ${locator} ${text} | 99 | [Arguments] ${locator} ${text} |
| 91 | [Documentation] перевіряє чи елемент видимий у вікні браузера, після чого заповнює його | 100 | [Documentation] перевіряє чи елемент видимий у вікні браузера, після чого заповнює його |
| @@ -77,3 +77,8 @@ fill plan form items | @@ -77,3 +77,8 @@ fill plan form items | ||
| 77 | \ fill item form in opened popup ${item_attributes} | 77 | \ fill item form in opened popup ${item_attributes} |
| 78 | \ submit current visible popup | 78 | \ submit current visible popup |
| 79 | 79 | ||
| 80 | +save plan form and wait synchronization | ||
| 81 | + [Documentation] натискає кнопку "Зберегти" і чекає синхронізації плану | ||
| 82 | + | ||
| 83 | + submit form and check result ${plan_form_submit_btn_locator} ${plan_form_submit_success_msg} ${plan_created_checker_element_locator} | ||
| 84 | + wait until page does not contain element with reloading ${plan_sync_element_locator} |
| @@ -5,6 +5,7 @@ ${site_allowed_schemes} = ["ДК021", | @@ -5,6 +5,7 @@ ${site_allowed_schemes} = ["ДК021", | ||
| 5 | 5 | ||
| 6 | # common | 6 | # common |
| 7 | ${alert_opened_locator} = jquery=.jconfirm:last .content | 7 | ${alert_opened_locator} = jquery=.jconfirm:last .content |
| 8 | +${alert_confirm_btn_locator} = jquery=.jconfirm:last .buttons .js-btn-confirm | ||
| 8 | ${alert_opened_close_btn_locator} = jquery=.jconfirm:last .closeIcon | 9 | ${alert_opened_close_btn_locator} = jquery=.jconfirm:last .closeIcon |
| 9 | ${alert_message_contains_text_locator_tpl} = jquery=.jconfirm:last .message:contains(%text%) | 10 | ${alert_message_contains_text_locator_tpl} = jquery=.jconfirm:last .message:contains(%text%) |
| 10 | ${popup_opened_last_locator} = jquery=.fancybox-is-open:last | 11 | ${popup_opened_last_locator} = jquery=.fancybox-is-open:last |
| @@ -58,6 +59,7 @@ ${plan_form_additional_classification_edit_btn_locator} = jquery=.fiel | @@ -58,6 +59,7 @@ ${plan_form_additional_classification_edit_btn_locator} = jquery=.fiel | ||
| 58 | ${plan_form_kekv_classification_edit_btn_locator} = jquery=.field-planform-additional_classification_ids_kekv .js-additional-classification-input-wrapper [data-toggle="additional_classification_ids_kekv"] | 59 | ${plan_form_kekv_classification_edit_btn_locator} = jquery=.field-planform-additional_classification_ids_kekv .js-additional-classification-input-wrapper [data-toggle="additional_classification_ids_kekv"] |
| 59 | ${plan_form_add_item_btn_locator} = jquery=#Items .js-form-popup-add | 60 | ${plan_form_add_item_btn_locator} = jquery=#Items .js-form-popup-add |
| 60 | ${plan_form_update_item_btn_locator_tpl} = jquery=#Items .js-form-popup-panel:nth(%index%) .panel-heading .js-form-popup-update | 61 | ${plan_form_update_item_btn_locator_tpl} = jquery=#Items .js-form-popup-panel:nth(%index%) .panel-heading .js-form-popup-update |
| 62 | +${plan_form_remove_item_btn_locator_tpl} = jquery=#Items .js-form-popup-panel[data-title*="%title%"] .panel-heading .js-form-popup-remove | ||
| 61 | ${plan_form_submit_btn_locator} = jquery=#plan-form .js-submit-btn | 63 | ${plan_form_submit_btn_locator} = jquery=#plan-form .js-submit-btn |
| 62 | ${plan_created_checker_element_locator} = id=plan-part-pjax | 64 | ${plan_created_checker_element_locator} = id=plan-part-pjax |
| 63 | 65 |
Please
register
or
login
to post a comment