Showing
2 changed files
with
234 additions
and
79 deletions
| @@ -4,15 +4,44 @@ Library String | @@ -4,15 +4,44 @@ Library String | ||
| 4 | Library DateTime | 4 | Library DateTime |
| 5 | 5 | ||
| 6 | *** Variables *** | 6 | *** Variables *** |
| 7 | -${locator.tenderId} jquery=h3 | ||
| 8 | -##Використовую такий шлях у кожного буде мінятись /yboi/. Міняйте на сві шлях до файлу | ||
| 9 | -${file_path} /home/yboi/openprocurement.robottests.buildout/Document.docx | ||
| 10 | -${locator.title} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[6] | ||
| 11 | -${locator.description} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[7] | ||
| 12 | -${locator.minimalStep.amount} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[9] | ||
| 13 | -${locator.value.amount} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[8] | 7 | +${locator.tenderId} jquery=h3 |
| 8 | +${locator.title} jquery=tender-subject-info>div.row:contains("Назва закупівлі:")>:eq(1)> | ||
| 9 | +${locator.description} jquery=tender-subject-info>div.row:contains("Детальний опис закупівлі:")>:eq(1)> | ||
| 10 | +${locator.minimalStep.amount} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[9] | ||
| 11 | +${locator.procuringEntity.name} jquery=customer-info>div.row:contains("Найменування:")>:eq(1)> | ||
| 12 | +${locator.value.amount} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[8] | ||
| 13 | +${locator.tenderPeriod.startDate} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[3] | ||
| 14 | +${locator.tenderPeriod.endDate} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[4] | ||
| 15 | +${locator.enquiryPeriod.startDate} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[1] | ||
| 16 | +${locator.enquiryPeriod.endDate} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[2] | ||
| 17 | +${locator.items[0].description} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[12] | ||
| 18 | +${locator.items[0].deliveryDate.endDate} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[14] | ||
| 19 | +${locator.items[0].deliveryLocation.latitude} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[15] | ||
| 20 | +${locator.items[0].deliveryLocation.longitude} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[15] | ||
| 21 | +${locator.items[0].deliveryAddress.postalCode} xpath=//div[@class='col-sm-8']//span[@ng-if='item.deliveryAddress.postIndex'] | ||
| 22 | +${locator.items[0].deliveryAddress.countryName} xpath=//div[@class='col-sm-8']//span[@ng-if='item.deliveryAddress.country.title'] | ||
| 23 | +${locator.items[0].deliveryAddress.region} xpath=//div[@class='col-sm-8']//span[@ng-if='item.deliveryAddress.region.title'] | ||
| 24 | +${locator.items[0].deliveryAddress.locality} xpath=//div[@class='col-sm-8']//span[@ng-if='item.deliveryAddress.city.title'] | ||
| 25 | +${locator.items[0].deliveryAddress.streetAddress} xpath=//div[@class='col-sm-8']//span[@ng-if='item.deliveryAddress.addressStr'] | ||
| 26 | +${locator.items[0].classification.scheme} xpath=(//div[@class = 'col-sm-4']/p)[11] | ||
| 27 | +${locator.items[0].classification.id} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[10] | ||
| 28 | +${locator.items[0].classification.description} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[10] | ||
| 29 | +${locator.items[0].additionalClassifications[0].scheme} xpath=(//div[@class = 'col-sm-4']/p)[12] | ||
| 30 | +${locator.items[0].additionalClassifications[0].id} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[11] | ||
| 31 | +${locator.items[0].additionalClassifications[0].description} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[11] | ||
| 32 | +${locator.items[0].unit.code} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[13] | ||
| 33 | +${locator.items[0].quantity} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[13] | ||
| 34 | +${locator.questions[0].title} xpath=(//div[@class='col-sm-10']/span[@class='ng-binding'])[2] | ||
| 35 | +${locator.questions[0].description} xpath=(//div[@class='col-sm-10']/span[@class='ng-binding'])[3] | ||
| 36 | +${locator.questions[0].date} xpath=(//div[@class='col-sm-10']/span[@class='ng-binding'])[1] | ||
| 37 | +${locator.questions[0].answer} xpath=(//div[@textarea='question.answer']/pre[@class='ng-binding'])[1] | ||
| 14 | 38 | ||
| 15 | *** Keywords *** | 39 | *** Keywords *** |
| 40 | +Підготувати дані для оголошення тендера | ||
| 41 | + ${INITIAL_TENDER_DATA}= prepare_test_tender_data | ||
| 42 | + ${INITIAL_TENDER_DATA}= Add_data_for_GUI_FrontEnds ${INITIAL_TENDER_DATA} | ||
| 43 | + [return] ${INITIAL_TENDER_DATA} | ||
| 44 | + | ||
| 16 | Підготувати клієнт для користувача | 45 | Підготувати клієнт для користувача |
| 17 | [Arguments] @{ARGUMENTS} | 46 | [Arguments] @{ARGUMENTS} |
| 18 | [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо | 47 | [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо |
| @@ -23,9 +52,9 @@ ${locator.value.amount} xpath=(//div[@class = 'col-sm-8']/p[@class= | @@ -23,9 +52,9 @@ ${locator.value.amount} xpath=(//div[@class = 'col-sm-8']/p[@class= | ||
| 23 | Run Keyword If '${username}' != 'E-tender_Viewer' Login | 52 | Run Keyword If '${username}' != 'E-tender_Viewer' Login |
| 24 | 53 | ||
| 25 | Login | 54 | Login |
| 26 | - Wait Until Page Contains Element id=inputUsername 100 | 55 | + Wait Until Page Contains Element id=inputUsername 10 |
| 27 | Input text id=inputUsername ${USERS.users['${username}'].login} | 56 | Input text id=inputUsername ${USERS.users['${username}'].login} |
| 28 | - Wait Until Page Contains Element id=inputPassword 100 | 57 | + Wait Until Page Contains Element id=inputPassword 10 |
| 29 | Input text id=inputPassword ${USERS.users['${username}'].password} | 58 | Input text id=inputPassword ${USERS.users['${username}'].password} |
| 30 | Click Button id=btn_submit | 59 | Click Button id=btn_submit |
| 31 | 60 | ||
| @@ -34,16 +63,23 @@ Login | @@ -34,16 +63,23 @@ Login | ||
| 34 | [Documentation] | 63 | [Documentation] |
| 35 | ... ${ARGUMENTS[0]} == username | 64 | ... ${ARGUMENTS[0]} == username |
| 36 | ... ${ARGUMENTS[1]} == tender_data | 65 | ... ${ARGUMENTS[1]} == tender_data |
| 66 | + ${INITIAL_TENDER_DATA}= procuringEntity_name ${INITIAL_TENDER_DATA} | ||
| 37 | ${tender_data}= Add_time_for_GUI_FrontEnds ${ARGUMENTS[1]} | 67 | ${tender_data}= Add_time_for_GUI_FrontEnds ${ARGUMENTS[1]} |
| 38 | ${items}= Get From Dictionary ${tender_data.data} items | 68 | ${items}= Get From Dictionary ${tender_data.data} items |
| 39 | ${title}= Get From Dictionary ${tender_data.data} title | 69 | ${title}= Get From Dictionary ${tender_data.data} title |
| 40 | ${description}= Get From Dictionary ${tender_data.data} description | 70 | ${description}= Get From Dictionary ${tender_data.data} description |
| 41 | ${budget}= Get From Dictionary ${tender_data.data.value} amount | 71 | ${budget}= Get From Dictionary ${tender_data.data.value} amount |
| 42 | ${step_rate}= Get From Dictionary ${tender_data.data.minimalStep} amount | 72 | ${step_rate}= Get From Dictionary ${tender_data.data.minimalStep} amount |
| 43 | - ${items_description}= Get From Dictionary ${tender_data.data} description | 73 | + ${items_description}= Get From Dictionary ${items[0]} description |
| 44 | ${quantity}= Get From Dictionary ${items[0]} quantity | 74 | ${quantity}= Get From Dictionary ${items[0]} quantity |
| 45 | ${cpv}= Get From Dictionary ${items[0].classification} id | 75 | ${cpv}= Get From Dictionary ${items[0].classification} id |
| 46 | ${unit}= Get From Dictionary ${items[0].unit} name | 76 | ${unit}= Get From Dictionary ${items[0].unit} name |
| 77 | + ${latitude} Get From Dictionary ${items[0].deliveryLocation} latitude | ||
| 78 | + ${longitude} Get From Dictionary ${items[0].deliveryLocation} longitude | ||
| 79 | + ${postalCode} Get From Dictionary ${items[0].deliveryAddress} postalCode | ||
| 80 | + ${streetAddress} Get From Dictionary ${items[0].deliveryAddress} streetAddress | ||
| 81 | + ${deliveryDate} Get From Dictionary ${items[0].deliveryDate} endDate | ||
| 82 | + ${deliveryDate} convert_date_to_etender_format ${deliveryDate} | ||
| 47 | ${start_date}= Get From Dictionary ${tender_data.data.tenderPeriod} startDate | 83 | ${start_date}= Get From Dictionary ${tender_data.data.tenderPeriod} startDate |
| 48 | ${start_date}= convert_date_to_etender_format ${start_date} | 84 | ${start_date}= convert_date_to_etender_format ${start_date} |
| 49 | ${start_time}= Get From Dictionary ${tender_data.data.tenderPeriod} startDate | 85 | ${start_time}= Get From Dictionary ${tender_data.data.tenderPeriod} startDate |
| @@ -56,8 +92,9 @@ Login | @@ -56,8 +92,9 @@ Login | ||
| 56 | ${enquiry_end_date}= convert_date_to_etender_format ${enquiry_end_date} | 92 | ${enquiry_end_date}= convert_date_to_etender_format ${enquiry_end_date} |
| 57 | ${enquiry_end_time}= Get From Dictionary ${tender_data.data.enquiryPeriod} endDate | 93 | ${enquiry_end_time}= Get From Dictionary ${tender_data.data.enquiryPeriod} endDate |
| 58 | ${enquiry_end_time}= convert_time_to_etender_format ${enquiry_end_time} | 94 | ${enquiry_end_time}= convert_time_to_etender_format ${enquiry_end_time} |
| 95 | + | ||
| 59 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} | 96 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} |
| 60 | - Wait Until Page Contains Мої закупівлі 100 | 97 | + Wait Until Page Contains Мої закупівлі 10 |
| 61 | Sleep 1 | 98 | Sleep 1 |
| 62 | Click Element xpath=//a[contains(@class, 'ng-binding')][./text()='Мої закупівлі'] | 99 | Click Element xpath=//a[contains(@class, 'ng-binding')][./text()='Мої закупівлі'] |
| 63 | Wait Until Page Contains Element xpath=//a[contains(@class, 'btn btn-info')] | 100 | Wait Until Page Contains Element xpath=//a[contains(@class, 'btn btn-info')] |
| @@ -71,6 +108,16 @@ Login | @@ -71,6 +108,16 @@ Login | ||
| 71 | Input text id=minimalStep ${step_rate} | 108 | Input text id=minimalStep ${step_rate} |
| 72 | Input text id=itemsDescription ${items_description} | 109 | Input text id=itemsDescription ${items_description} |
| 73 | Input text id=itemsQuantity ${quantity} | 110 | Input text id=itemsQuantity ${quantity} |
| 111 | + Input text name=delStartDate ${deliveryDate} | ||
| 112 | + Sleep 2 | ||
| 113 | + Input text xpath=//input[@ng-model='data.items[0].deliveryDate.endDate'] ${deliveryDate} | ||
| 114 | + Input text name=latitude ${latitude} | ||
| 115 | + Input text name=longitude ${longitude} | ||
| 116 | + Click Element xpath=//select[@name='region']//option[@label='Київська'] | ||
| 117 | + Sleep 2 | ||
| 118 | + Click Element xpath=//select[@name='city']//option[@label='Київ'] | ||
| 119 | + Input text name=addressStr ${streetAddress} | ||
| 120 | + Input text name=postIndex ${postalCode} | ||
| 74 | Wait Until Page Contains Element xpath=//select[@name="itemsUnit"]/option[@value='kilogram'] | 121 | Wait Until Page Contains Element xpath=//select[@name="itemsUnit"]/option[@value='kilogram'] |
| 75 | Click Element xpath=//select[@name="itemsUnit"]/option[@value='kilogram'] | 122 | Click Element xpath=//select[@name="itemsUnit"]/option[@value='kilogram'] |
| 76 | Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='enqPEndDate'] ${enquiry_end_date} | 123 | Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='enqPEndDate'] ${enquiry_end_date} |
| @@ -95,7 +142,7 @@ Login | @@ -95,7 +142,7 @@ Login | ||
| 95 | Wait Until Page Contains Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit'] | 142 | Wait Until Page Contains Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit'] |
| 96 | Click Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit'] | 143 | Click Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit'] |
| 97 | Sleep 1 | 144 | Sleep 1 |
| 98 | - Wait Until Page Contains [ТЕСТУВАННЯ] 100 | 145 | + Wait Until Page Contains [ТЕСТУВАННЯ] 10 |
| 99 | Sleep 20 | 146 | Sleep 20 |
| 100 | Click Element xpath=//*[text()='${title}'] | 147 | Click Element xpath=//*[text()='${title}'] |
| 101 | Sleep 5 | 148 | Sleep 5 |
| @@ -157,19 +204,61 @@ Set Multi Ids | @@ -157,19 +204,61 @@ Set Multi Ids | ||
| 157 | sleep 1 | 204 | sleep 1 |
| 158 | Capture Page Screenshot | 205 | Capture Page Screenshot |
| 159 | 206 | ||
| 160 | -Подати цінову пропозицію | 207 | +Завантажити документ |
| 208 | + [Arguments] @{ARGUMENTS} | ||
| 209 | + [Documentation] | ||
| 210 | + ... ${ARGUMENTS[0]} == username | ||
| 211 | + ... ${ARGUMENTS[1]} == ${TENDER_UAID} | ||
| 212 | + ... ${ARGUMENTS[2]} == ${Complain} | ||
| 213 | + Fail Тест не написаний | ||
| 214 | + | ||
| 215 | +Подати скаргу | ||
| 161 | [Arguments] @{ARGUMENTS} | 216 | [Arguments] @{ARGUMENTS} |
| 162 | [Documentation] | 217 | [Documentation] |
| 163 | ... ${ARGUMENTS[0]} == username | 218 | ... ${ARGUMENTS[0]} == username |
| 164 | ... ${ARGUMENTS[1]} == ${TENDER_UAID} | 219 | ... ${ARGUMENTS[1]} == ${TENDER_UAID} |
| 165 | - ... ${ARGUMENTS[2]} == test_bid_data | 220 | + ... ${ARGUMENTS[2]} == ${Complain} |
| 221 | + Fail Не реалізований функціонал | ||
| 222 | + | ||
| 223 | +порівняти скаргу | ||
| 224 | + [Arguments] @{ARGUMENTS} | ||
| 225 | + [Documentation] | ||
| 226 | + ... ${ARGUMENTS[0]} == username | ||
| 227 | + ... ${ARGUMENTS[1]} == ${file_path} | ||
| 228 | + ... ${ARGUMENTS[2]} == ${TENDER_UAID} | ||
| 229 | + Fail Не реалізований функціонал | ||
| 166 | 230 | ||
| 231 | +Подати цінову пропозицію | ||
| 232 | + [Arguments] @{ARGUMENTS} | ||
| 233 | + [Documentation] | ||
| 234 | + ... ${ARGUMENTS[0]} == username | ||
| 235 | + ... ${ARGUMENTS[1]} == ${TENDER_UAID} | ||
| 236 | + ... ${ARGUMENTS[2]} == ${test_bid_data} | ||
| 167 | ${bid}= Get From Dictionary ${ARGUMENTS[2].data.value} amount | 237 | ${bid}= Get From Dictionary ${ARGUMENTS[2].data.value} amount |
| 168 | etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | 238 | etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} |
| 169 | - Wait Until Page Contains Інформація про процедуру закупівлі 100 | 239 | + Wait Until Page Contains Інформація про процедуру закупівлі 10 |
| 170 | Wait Until Page Contains Element id=amount 10 | 240 | Wait Until Page Contains Element id=amount 10 |
| 171 | Input text id=amount ${bid} | 241 | Input text id=amount ${bid} |
| 172 | Click Element xpath=//button[contains(@class, 'btn btn-success')][./text()='Реєстрація пропозиції'] | 242 | Click Element xpath=//button[contains(@class, 'btn btn-success')][./text()='Реєстрація пропозиції'] |
| 243 | + DEBUG | ||
| 244 | + Click Element xpath=//div[@class='row']/button[@class='btn btn-success'] | ||
| 245 | + | ||
| 246 | +скасувати цінову пропозицію | ||
| 247 | + [Arguments] @{ARGUMENTS} | ||
| 248 | + [Documentation] | ||
| 249 | + ... ${ARGUMENTS[0]} == username | ||
| 250 | + ... ${ARGUMENTS[1]} == ${TENDER_UAID} | ||
| 251 | + etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | ||
| 252 | + Click Element xpath=//button[@class='btn-sm btn-danger ng-isolate-scope'] | ||
| 253 | + | ||
| 254 | +обновити сторінку з тендером | ||
| 255 | + [Arguments] @{ARGUMENTS} | ||
| 256 | + [Documentation] | ||
| 257 | + ... ${ARGUMENTS[0]} = username | ||
| 258 | + ... ${ARGUMENTS[1]} = ${TENDER_UAID} | ||
| 259 | + Selenium2Library.Switch Browser ${ARGUMENTS[0]} | ||
| 260 | + etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | ||
| 261 | + Reload Page | ||
| 173 | 262 | ||
| 174 | Задати питання | 263 | Задати питання |
| 175 | [Arguments] @{ARGUMENTS} | 264 | [Arguments] @{ARGUMENTS} |
| @@ -183,8 +272,7 @@ Set Multi Ids | @@ -183,8 +272,7 @@ Set Multi Ids | ||
| 183 | 272 | ||
| 184 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} | 273 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} |
| 185 | etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | 274 | etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} |
| 186 | - | ||
| 187 | - Wait Until Page Contains Element jquery=a[href^="#/addQuestion/"] 100 | 275 | + Wait Until Page Contains Element jquery=a[href^="#/addQuestion/"] 10 |
| 188 | Click Element jquery=a[href^="#/addQuestion/"] | 276 | Click Element jquery=a[href^="#/addQuestion/"] |
| 189 | Wait Until Page Contains Element id=title | 277 | Wait Until Page Contains Element id=title |
| 190 | Input text id=title ${title} | 278 | Input text id=title ${title} |
| @@ -203,22 +291,10 @@ Set Multi Ids | @@ -203,22 +291,10 @@ Set Multi Ids | ||
| 203 | 291 | ||
| 204 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} | 292 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} |
| 205 | etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | 293 | etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} |
| 206 | - | ||
| 207 | - Click Element xpath=//div[div/pre[1]]/div[1] | ||
| 208 | - Input text xpath=//div[textarea]/textarea ${answer} | ||
| 209 | - Click Element xpath=//div[textarea]/span/button[1] | ||
| 210 | - | ||
| 211 | -обновити сторінку з тендером | ||
| 212 | - [Arguments] @{ARGUMENTS} | ||
| 213 | - [Documentation] | ||
| 214 | - ... ${ARGUMENTS[0]} == username | ||
| 215 | - ... ${ARGUMENTS[1]} == tenderId | ||
| 216 | - ... ${ARGUMENTS[2]} == id | ||
| 217 | - ${current_location}= Get Location | ||
| 218 | - Run keyword if '${BROKERS['${USERS.users['${username}'].broker}'].url}/#/tenderDetailes/${ARGUMENTS[2]}'=='${current_location}' Reload Page | ||
| 219 | - Run keyword unless '${BROKERS['${USERS.users['${username}'].broker}'].url}/#/tenderDetailes/${ARGUMENTS[2]}'=='${current_location}' Пошук тендера по ідентифікатору @{ARGUMENTS} | ||
| 220 | - Wait Until Page Contains ${ARGUMENTS[1]} 10 | ||
| 221 | - sleep 1 | 294 | + Wait Until Page Contains Element xpath=//pre[@class='ng-binding'][text()='Додати відповідь'] 10 |
| 295 | + Click Element xpath=//pre[@class='ng-binding'][text()='Додати відповідь'] | ||
| 296 | + Input text xpath=//div[@class='editable-controls form-group']//textarea ${answer} | ||
| 297 | + Click Element xpath=//span[@class='editable-buttons']/button[@type='submit'] | ||
| 222 | 298 | ||
| 223 | Внести зміни в тендер | 299 | Внести зміни в тендер |
| 224 | [Arguments] @{ARGUMENTS} | 300 | [Arguments] @{ARGUMENTS} |
| @@ -261,7 +337,7 @@ Set Multi Ids | @@ -261,7 +337,7 @@ Set Multi Ids | ||
| 261 | \ Додати предмет ${items[${INDEX}]} ${INDEX} | 337 | \ Додати предмет ${items[${INDEX}]} ${INDEX} |
| 262 | Sleep 2 | 338 | Sleep 2 |
| 263 | Click Element xpath=//div[@class='form-actions']/button[./text()='Зберегти зміни'] | 339 | Click Element xpath=//div[@class='form-actions']/button[./text()='Зберегти зміни'] |
| 264 | - Wait Until Page Contains [ТЕСТУВАННЯ] 100 | 340 | + Wait Until Page Contains [ТЕСТУВАННЯ] 10 |
| 265 | 341 | ||
| 266 | видалити позиції | 342 | видалити позиції |
| 267 | etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | 343 | etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} |
| @@ -273,7 +349,7 @@ Set Multi Ids | @@ -273,7 +349,7 @@ Set Multi Ids | ||
| 273 | Sleep 2 | 349 | Sleep 2 |
| 274 | Wait Until Page Contains Element xpath=//div[@class='form-actions']/button[./text()='Зберегти зміни'] 10 | 350 | Wait Until Page Contains Element xpath=//div[@class='form-actions']/button[./text()='Зберегти зміни'] 10 |
| 275 | Click Element xpath=//div[@class='form-actions']/button[./text()='Зберегти зміни'] | 351 | Click Element xpath=//div[@class='form-actions']/button[./text()='Зберегти зміни'] |
| 276 | - Wait Until Page Contains [ТЕСТУВАННЯ] 100 | 352 | + Wait Until Page Contains [ТЕСТУВАННЯ] 10 |
| 277 | 353 | ||
| 278 | отримати інформацію із тендера | 354 | отримати інформацію із тендера |
| 279 | [Arguments] @{ARGUMENTS} | 355 | [Arguments] @{ARGUMENTS} |
| @@ -319,8 +395,8 @@ Set Multi Ids | @@ -319,8 +395,8 @@ Set Multi Ids | ||
| 319 | Remove element ${last_note_id} | 395 | Remove element ${last_note_id} |
| 320 | 396 | ||
| 321 | отримати інформацію про tenderId | 397 | отримати інформацію про tenderId |
| 322 | - ${return_value}= отримати тест із поля і показати на сторінці tenderId | ||
| 323 | - ${return_value}= Get Substring ${return_value} 10 | 398 | + ${return_value}= Отримати тест із поля і показати на сторінці tenderId |
| 399 | + ${return_value}= Get Substring ${return_value} 10 | ||
| 324 | [return] ${return_value} | 400 | [return] ${return_value} |
| 325 | 401 | ||
| 326 | отримати інформацію про procuringEntity.name | 402 | отримати інформацію про procuringEntity.name |
| @@ -328,72 +404,139 @@ Set Multi Ids | @@ -328,72 +404,139 @@ Set Multi Ids | ||
| 328 | [return] ${return_value} | 404 | [return] ${return_value} |
| 329 | 405 | ||
| 330 | отримати інформацію про tenderPeriod.startDate | 406 | отримати інформацію про tenderPeriod.startDate |
| 331 | - ${return_value}= Отримати тест із поля і показати на сторінці tenderPeriod.startDate | 407 | + ${return_value}= Отримати тест із поля і показати на сторінці tenderPeriod.startDate |
| 408 | + ${return_value}= Change_date_to_month ${return_value} | ||
| 332 | [return] ${return_value} | 409 | [return] ${return_value} |
| 333 | 410 | ||
| 334 | отримати інформацію про tenderPeriod.endDate | 411 | отримати інформацію про tenderPeriod.endDate |
| 335 | - ${return_value}= Отримати тест із поля і показати на сторінці tenderPeriod.endDate | 412 | + ${return_value}= Отримати тест із поля і показати на сторінці tenderPeriod.endDate |
| 413 | + ${return_value}= Change_date_to_month ${return_value} | ||
| 336 | [return] ${return_value} | 414 | [return] ${return_value} |
| 337 | 415 | ||
| 338 | отримати інформацію про enquiryPeriod.startDate | 416 | отримати інформацію про enquiryPeriod.startDate |
| 339 | - ${return_value}= Отримати тест із поля і показати на сторінці enquiryPeriod.startDate | 417 | + ${return_value}= Отримати тест із поля і показати на сторінці enquiryPeriod.startDate |
| 418 | + ${return_value}= Change_date_to_month ${return_value} | ||
| 340 | [return] ${return_value} | 419 | [return] ${return_value} |
| 341 | 420 | ||
| 342 | отримати інформацію про enquiryPeriod.endDate | 421 | отримати інформацію про enquiryPeriod.endDate |
| 343 | - ${return_value}= Отримати тест із поля і показати на сторінці enquiryPeriod.endDate | 422 | + ${return_value}= Отримати тест із поля і показати на сторінці enquiryPeriod.endDate |
| 423 | + ${return_value}= Change_date_to_month ${return_value} | ||
| 424 | + [return] ${return_value} | ||
| 425 | + | ||
| 426 | +Change_date_to_month | ||
| 427 | + [Arguments] @{ARGUMENTS} | ||
| 428 | + [Documentation] | ||
| 429 | + ... ${ARGUMENTS[0]} == date | ||
| 430 | + ${day}= Get Substring ${ARGUMENTS[0]} 0 2 | ||
| 431 | + ${month}= Get Substring ${ARGUMENTS[0]} 3 6 | ||
| 432 | + ${year}= Get Substring ${ARGUMENTS[0]} 5 | ||
| 433 | + ${return_value}= Convert To String ${month}${day}${year} | ||
| 434 | + [return] ${return_value} | ||
| 435 | + | ||
| 436 | +отримати інформацію про items[0].description | ||
| 437 | + ${return_value}= Отримати тест із поля і показати на сторінці items[0].description | ||
| 438 | + [return] ${return_value} | ||
| 439 | + | ||
| 440 | +отримати інформацію про items[0].deliveryLocation.latitude | ||
| 441 | + ${return_value}= Отримати тест із поля і показати на сторінці items[0].deliveryLocation.latitude | ||
| 442 | + ${return_value}= Get Substring ${return_value} 0 10 | ||
| 443 | + [return] ${return_value} | ||
| 444 | + | ||
| 445 | +отримати інформацію про items[0].deliveryLocation.longitude | ||
| 446 | + ${return_value}= Отримати тест із поля і показати на сторінці items[0].deliveryLocation.longitude | ||
| 447 | + ${return_value}= Get Substring ${return_value} 12 22 | ||
| 344 | [return] ${return_value} | 448 | [return] ${return_value} |
| 345 | 449 | ||
| 346 | -отримати інформацію про items[${item_id}].description | ||
| 347 | - відмітити на сторінці поле з тендера items[${item_id}].description jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Детальний опис предмету закупівлі:")>:eq(1)> | ||
| 348 | - ${return_value}= Get Text jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Детальний опис предмету закупівлі:")>:eq(1)> | 450 | +отримати інформацію про items[0].unit.code |
| 451 | + ${return_value}= Отримати тест із поля і показати на сторінці items[0].unit.code | ||
| 452 | + ${return_value}= Get Substring ${return_value} 5 | ||
| 453 | + ${return_value}= Run keyword if '${return_value}' == 'кг.' Convert To String KGM | ||
| 349 | [return] ${return_value} | 454 | [return] ${return_value} |
| 350 | 455 | ||
| 351 | -отримати інформацію про items[${item_id}].quantity | ||
| 352 | - відмітити на сторінці поле з тендера items[${item_id}].quantity jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Кількість:")>:eq(1)> | ||
| 353 | - ${return_value}= Get Text jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Кількість:")>:eq(1)> | ||
| 354 | - ${return_value}= Convert To Number ${return_value} | 456 | +отримати інформацію про items[0].quantity |
| 457 | + ${return_value}= Отримати тест із поля і показати на сторінці items[0].quantity | ||
| 458 | + ${return_value}= Get Substring ${return_value} 0 4 | ||
| 459 | + ${return_value}= Convert To Number ${return_value} | ||
| 355 | [return] ${return_value} | 460 | [return] ${return_value} |
| 356 | 461 | ||
| 357 | -отримати інформацію про items[${item_id}].classification.id | ||
| 358 | - відмітити на сторінці поле з тендера items[0].classification.id jquery=tender-subject-info>div.row:contains("Класифікатор CPV:")>:eq(1)> | ||
| 359 | - ${return_value}= Get Text jquery=tender-subject-info>div.row:contains("Класифікатор CPV:")>:eq(1)> | 462 | +отримати інформацію про items[0].classification.id |
| 463 | + ${return_value}= Отримати тест із поля і показати на сторінці items[0].classification.id | ||
| 360 | [return] ${return_value.split(' ')[0]} | 464 | [return] ${return_value.split(' ')[0]} |
| 361 | 465 | ||
| 362 | -отримати інформацію про items[${item_id}].classification.scheme | ||
| 363 | - відмітити на сторінці поле з тендера items[0].classification.id jquery=tender-subject-info>div.row:contains("CPV")>:eq(1)> | ||
| 364 | - ${return_value}= Get Text jquery=tender-subject-info>div.row:contains("CPV")>:eq(1)> | 466 | +отримати інформацію про items[0].classification.scheme |
| 467 | + ${return_value}= Отримати тест із поля і показати на сторінці items[0].classification.scheme | ||
| 468 | + ${return_value}= Get Substring ${return_value} 0 -1 | ||
| 469 | + [return] ${return_value.split(' ')[1]} | ||
| 470 | + | ||
| 471 | +отримати інформацію про items[0].classification.description | ||
| 472 | + ${return_value}= Отримати тест із поля і показати на сторінці items[0].classification.description | ||
| 473 | + ${return_value}= Get Substring ${return_value} 11 | ||
| 474 | + ${return_value}= Run keyword if '${return_value}' == 'Картонки' Convert To String Cartons | ||
| 475 | + [return] ${return_value} | ||
| 476 | + | ||
| 477 | +отримати інформацію про items[0].additionalClassifications[0].id | ||
| 478 | + ${return_value}= Отримати тест із поля і показати на сторінці items[0].additionalClassifications[0].id | ||
| 365 | [return] ${return_value.split(' ')[0]} | 479 | [return] ${return_value.split(' ')[0]} |
| 366 | 480 | ||
| 367 | -отримати інформацію про items[${item_id}].classification.description | ||
| 368 | - відмітити на сторінці поле з тендера classification.description jquery=tender-subject-info>div.row:contains("Класифікатор CPV:")>:eq(1)> | ||
| 369 | - ${return_value}= Get Text jquery=tender-subject-info>div.row:contains("Класифікатор CPV:")>:eq(1)> | ||
| 370 | - ${return_value}= catenate @{return_value.split(' ')[1:]} | 481 | +отримати інформацію про items[0].additionalClassifications[0].scheme |
| 482 | + ${return_value}= Отримати тест із поля і показати на сторінці items[0].additionalClassifications[0].scheme | ||
| 483 | + ${return_value}= Get Substring ${return_value} 0 -1 | ||
| 484 | + [return] ${return_value.split(' ')[1]} | ||
| 485 | + | ||
| 486 | +отримати інформацію про items[0].additionalClassifications[0].description | ||
| 487 | + ${return_value}= Отримати тест із поля і показати на сторінці items[0].additionalClassifications[0].description | ||
| 488 | + ${return_value}= Get Substring ${return_value} 8 60 | ||
| 489 | + ${return_value}= Remove String ${return_value} " | ||
| 490 | + ${return_value}= Convert To Lowercase ${return_value} | ||
| 491 | + [return] ${return_value} | ||
| 492 | + | ||
| 493 | +отримати інформацію про items[0].deliveryAddress.postalCode | ||
| 494 | + ${return_value}= Отримати тест із поля і показати на сторінці items[0].deliveryAddress.postalCode | ||
| 495 | + ${return_value}= Get Substring ${return_value} 0 5 | ||
| 496 | + [return] ${return_value} | ||
| 497 | + | ||
| 498 | +отримати інформацію про items[0].deliveryAddress.countryName | ||
| 499 | + ${return_value}= Отримати тест із поля і показати на сторінці items[0].deliveryAddress.countryName | ||
| 500 | + ${return_value}= Get Substring ${return_value} 0 7 | ||
| 501 | + [return] ${return_value} | ||
| 502 | + | ||
| 503 | +отримати інформацію про items[0].deliveryAddress.region | ||
| 504 | + ${return_value}= Отримати тест із поля і показати на сторінці items[0].deliveryAddress.region | ||
| 505 | + ${return_value}= Run keyword if '${return_value}' == 'Київська,' Convert To String м. Київ | ||
| 506 | + [return] ${return_value} | ||
| 507 | + | ||
| 508 | +отримати інформацію про items[0].deliveryAddress.locality | ||
| 509 | + ${return_value}= Отримати тест із поля і показати на сторінці items[0].deliveryAddress.locality | ||
| 510 | + ${return_value}= Run keyword if '${return_value}' == 'Київ,' Convert To String м. Київ | ||
| 371 | [return] ${return_value} | 511 | [return] ${return_value} |
| 372 | 512 | ||
| 373 | -отримати інформацію про items[${item_id}].deliveryAddress | ||
| 374 | - ${return_value}= Отримати тест із поля і показати на сторінці items[${item_id}].deliveryAddress | 513 | +отримати інформацію про items[0].deliveryAddress.streetAddress |
| 514 | + ${return_value}= Отримати тест із поля і показати на сторінці items[0].deliveryAddress.streetAddress | ||
| 375 | [return] ${return_value} | 515 | [return] ${return_value} |
| 376 | 516 | ||
| 377 | -отримати інформацію про items[${item_id}].deliveryDate | ||
| 378 | - ${return_value}= Отримати тест із поля і показати на сторінці items[${item_id}].deliveryDate | 517 | +отримати інформацію про items[0].deliveryDate.endDate |
| 518 | + ${return_value}= Отримати тест із поля і показати на сторінці items[0].deliveryDate.endDate | ||
| 519 | + ${time}= Отримати тест із поля і показати на сторінці enquiryPeriod.startDate | ||
| 520 | + ${time}= Get Substring ${time} 11 | ||
| 521 | + ${day}= Get Substring ${return_value} 16 18 | ||
| 522 | + ${month}= Get Substring ${return_value} 18 22 | ||
| 523 | + ${year}= Get Substring ${return_value} 22 | ||
| 524 | + ${return_value}= Convert To String ${year}${month}${day}${time} | ||
| 379 | [return] ${return_value} | 525 | [return] ${return_value} |
| 380 | 526 | ||
| 381 | -отримати інформацію про questions[${question_id}].title | ||
| 382 | - відмітити на сторінці поле з тендера questions title jquery=tender-questions>div:eq(1)>div.row:contains("Тема:")>:eq(1)> | ||
| 383 | - ${return_value}= Get Text jquery=tender-questions>div:eq(1)>div.row:contains("Тема:")>:eq(1)> | 527 | +отримати інформацію про questions[0].title |
| 528 | + ${return_value}= отримати тест із поля і показати на сторінці questions[0].title | ||
| 384 | [return] ${return_value} | 529 | [return] ${return_value} |
| 385 | 530 | ||
| 386 | -отримати інформацію про questions[${question_id}].description | ||
| 387 | - відмітити на сторінці поле з тендера questions description jquery=tender-questions>div:eq(1)>div.row:contains("Питання:")>:eq(1)> | ||
| 388 | - ${return_value}= Get Text jquery=tender-questions>div:eq(1)>div.row:contains("Питання:")>:eq(1)> | 531 | +отримати інформацію про questions[0].description |
| 532 | + ${return_value}= отримати тест із поля і показати на сторінці questions[0].description | ||
| 389 | [return] ${return_value} | 533 | [return] ${return_value} |
| 390 | 534 | ||
| 391 | -отримати інформацію про questions[${question_id}].date | ||
| 392 | - відмітити на сторінці поле з тендера question date jquery=tender-questions>div:eq(1)>div.row:contains("Дата:")>:eq(1)> | ||
| 393 | - ${return_value}= Get Text jquery=tender-questions>div:eq(1)>div.row:contains("Дата:")>:eq(1)> | 535 | +отримати інформацію про questions[0].date |
| 536 | + ${return_value}= отримати тест із поля і показати на сторінці questions[0].date | ||
| 537 | + ${return_value}= Change_date_to_month ${return_value} | ||
| 394 | [return] ${return_value} | 538 | [return] ${return_value} |
| 395 | 539 | ||
| 396 | -отримати інформацію про questions[${question_id}].answer | ||
| 397 | - відмітити на сторінці поле з тендера question answer jquery=tender-questions>div:eq(1)>div:last> | ||
| 398 | - ${return_value}= Get Text jquery=tender-questions>div:eq(1)>div:last> | 540 | +отримати інформацію про questions[0].answer |
| 541 | + ${return_value}= отримати тест із поля і показати на сторінці questions[0].answer | ||
| 399 | [return] ${return_value} | 542 | [return] ${return_value} |
| @@ -37,6 +37,11 @@ def convert_date_to_etender_format(isodate): | @@ -37,6 +37,11 @@ def convert_date_to_etender_format(isodate): | ||
| 37 | date_string = iso_dt.strftime("%d-%m-%Y") | 37 | date_string = iso_dt.strftime("%d-%m-%Y") |
| 38 | return date_string | 38 | return date_string |
| 39 | 39 | ||
| 40 | +def convert_date_for_delivery(isodate): | ||
| 41 | + iso_dt=parse_date(isodate) | ||
| 42 | + date_string = iso_dt.strftime("%Y-%m-%d %H:%M") | ||
| 43 | + return date_string | ||
| 44 | + | ||
| 40 | def convert_time_to_etender_format(isodate): | 45 | def convert_time_to_etender_format(isodate): |
| 41 | iso_dt=parse_date(isodate) | 46 | iso_dt=parse_date(isodate) |
| 42 | time_string = iso_dt.strftime("%H:%M") | 47 | time_string = iso_dt.strftime("%H:%M") |
| @@ -54,13 +59,16 @@ def prepare_prom_test_tender_data(): | @@ -54,13 +59,16 @@ def prepare_prom_test_tender_data(): | ||
| 54 | return munchify({'data': prom_test_tender_data()}) | 59 | return munchify({'data': prom_test_tender_data()}) |
| 55 | 60 | ||
| 56 | def compare_date(data1, data2): | 61 | def compare_date(data1, data2): |
| 62 | + #LOGGER.log_message(Message("data1: {}".format(data1), "INFO")) | ||
| 63 | + #LOGGER.log_message(Message("data2: {}".format(data2), "INFO")) | ||
| 57 | data1=parse(data1) | 64 | data1=parse(data1) |
| 58 | data2=parse(data2) | 65 | data2=parse(data2) |
| 66 | + #LOGGER.log_message(Message("data1: {}".format(data1), "INFO")) | ||
| 67 | + #LOGGER.log_message(Message("data2: {}".format(data2), "INFO")) | ||
| 59 | if data1.tzinfo is None: | 68 | if data1.tzinfo is None: |
| 60 | data1 = TIMEZONE.localize(data1) | 69 | data1 = TIMEZONE.localize(data1) |
| 61 | if data2.tzinfo is None: | 70 | if data2.tzinfo is None: |
| 62 | data2 = TIMEZONE.localize(data2) | 71 | data2 = TIMEZONE.localize(data2) |
| 63 | - | ||
| 64 | delta = (data1-data2).total_seconds() | 72 | delta = (data1-data2).total_seconds() |
| 65 | if abs(delta) > 60: | 73 | if abs(delta) > 60: |
| 66 | return False | 74 | return False |
| @@ -179,8 +187,12 @@ def newtend_date_picker_index(isodate): | @@ -179,8 +187,12 @@ def newtend_date_picker_index(isodate): | ||
| 179 | 187 | ||
| 180 | def Add_time_for_GUI_FrontEnds(INITIAL_TENDER_DATA): | 188 | def Add_time_for_GUI_FrontEnds(INITIAL_TENDER_DATA): |
| 181 | now = datetime.now() | 189 | now = datetime.now() |
| 182 | - INITIAL_TENDER_DATA.data.enquiryPeriod['startDate'] = (now + timedelta(minutes=2)).isoformat() | ||
| 183 | - INITIAL_TENDER_DATA.data.enquiryPeriod['endDate'] = (now + timedelta(minutes=3)).isoformat() | ||
| 184 | - INITIAL_TENDER_DATA.data.tenderPeriod['startDate'] = (now + timedelta(minutes=4)).isoformat() | ||
| 185 | - INITIAL_TENDER_DATA.data.tenderPeriod['endDate'] = (now + timedelta(minutes=5)).isoformat() | 190 | + INITIAL_TENDER_DATA.data.enquiryPeriod['startDate'] = (now + timedelta(minutes=0)).isoformat() |
| 191 | + INITIAL_TENDER_DATA.data.enquiryPeriod['endDate'] = (now + timedelta(minutes=6)).isoformat() | ||
| 192 | + INITIAL_TENDER_DATA.data.tenderPeriod['startDate'] = (now + timedelta(minutes=7)).isoformat() | ||
| 193 | + INITIAL_TENDER_DATA.data.tenderPeriod['endDate'] = (now + timedelta(minutes=11)).isoformat() | ||
| 194 | + return INITIAL_TENDER_DATA | ||
| 195 | + | ||
| 196 | +def procuringEntity_name(INITIAL_TENDER_DATA): | ||
| 197 | + INITIAL_TENDER_DATA.data.procuringEntity['name'] = u"Повна назва невідомо чого" | ||
| 186 | return INITIAL_TENDER_DATA | 198 | return INITIAL_TENDER_DATA |
Please
register
or
login
to post a comment