Commit 6e4549029ffc30aa8a1ab99645369e637f2febc5
1 parent
4227dfa2
PublicBid: Export to separate repository
https://github.com/openprocurement/robot_tests.broker.publicbid
Showing
2 changed files
with
1 additions
and
179 deletions
| ... | ... | @@ -37,6 +37,7 @@ gh_push = git@github.com: |
| 37 | 37 | [sources] |
| 38 | 38 | openprocurement_client = git ${remotes:gh}openprocurement/openprocurement.client.python.git |
| 39 | 39 | robot_tests.broker.etender = git ${remotes:gh}openprocurement/robot_tests.broker.etender.git |
| 40 | +robot_tests.broker.publicbid = git ${remotes:gh}openprocurement/robot_tests.broker.publicbid.git | |
| 40 | 41 | robot_tests.broker.smarttender = git ${remotes:gh}openprocurement/robot_tests.broker.smarttender.git |
| 41 | 42 | |
| 42 | 43 | [versions] | ... | ... |
| 1 | -*** Settings *** | |
| 2 | -Library Selenium2Screenshots | |
| 3 | -Library String | |
| 4 | -Library DateTime | |
| 5 | - | |
| 6 | -*** Variables *** | |
| 7 | -${mail} test@mail.com | |
| 8 | -${telephone} +380976535447 | |
| 9 | - | |
| 10 | -*** Keywords *** | |
| 11 | -Підготувати клієнт для користувача | |
| 12 | - [Arguments] @{ARGUMENTS} | |
| 13 | - [Documentation] Відкрити браузер, створити об’єкт api wrapper, тощо | |
| 14 | - ... ${ARGUMENTS[0]} == username | |
| 15 | - Open Browser ${USERS.users['${ARGUMENTS[0]}'].homepage} ${USERS.users['${username}'].browser} alias=${ARGUMENTS[0]} | |
| 16 | - Set Window Size @{USERS.users['${ARGUMENTS[0]}'].size} | |
| 17 | - Set Window Position @{USERS.users['${ARGUMENTS[0]}'].position} | |
| 18 | - | |
| 19 | -# login | |
| 20 | - Run Keyword And Ignore Error Wait Until Page Contains Element id=mForm:j_idt56 10 | |
| 21 | - Click Element id=mForm:j_idt56 | |
| 22 | - Run Keyword And Ignore Error Wait Until Page Contains Element id=mForm:email 10 | |
| 23 | - Input text id=mForm:email ${USERS.users['${username}'].login} | |
| 24 | - Sleep 2 | |
| 25 | - Input text id=mForm:pwd ${USERS.users['${username}'].password} | |
| 26 | - Click Button id=mForm:login | |
| 27 | - | |
| 28 | -Створити тендер | |
| 29 | - [Arguments] @{ARGUMENTS} | |
| 30 | - [Documentation] | |
| 31 | - ... ${ARGUMENTS[0]} == username | |
| 32 | - ... ${ARGUMENTS[1]} == tender_data | |
| 33 | - ${file_path}= local_path_to_file TestDocument.docx | |
| 34 | - ${prepared_tender_data}= Add_data_for_GUI_FrontEnds ${ARGUMENTS[1]} | |
| 35 | - ${items}= Get From Dictionary ${prepared_tender_data.data} items | |
| 36 | - ${title}= Get From Dictionary ${prepared_tender_data.data} title | |
| 37 | - ${description}= Get From Dictionary ${prepared_tender_data.data} description | |
| 38 | - ${budget}= Get From Dictionary ${prepared_tender_data.data.value} amount | |
| 39 | - ${step_rate}= Get From Dictionary ${prepared_tender_data.data.minimalStep} amount | |
| 40 | - ${countryName}= Get From Dictionary ${prepared_tender_data.data.procuringEntity.address} countryName | |
| 41 | - ${delivery_end_date}= Get From Dictionary ${items[0].deliveryDate} endDate | |
| 42 | - ${delivery_end_date}= convert_datetime_to_dot_format ${delivery_end_date} | |
| 43 | - ${cpv}= Convert To String "Картонки" | |
| 44 | - ${cpv_id}= Get From Dictionary ${items[0].classification} id | |
| 45 | - ${cpv_id_1}= Get Substring ${cpv_id} 0 3 | |
| 46 | - ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description | |
| 47 | - ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id | |
| 48 | - ${code}= Get From Dictionary ${items[0].unit} code | |
| 49 | - ${quantity}= Get From Dictionary ${items[0]} quantity | |
| 50 | - ${name}= Get From Dictionary ${prepared_tender_data.data.procuringEntity.contactPoint} name | |
| 51 | - | |
| 52 | - Selenium2Library.Switch Browser ${ARGUMENTS[0]} | |
| 53 | - Wait Until Page Contains Element xpath=//*[contains(@class, 'ui-button-text ui-c')][./text()='Нова закупівля'] 10 | |
| 54 | - Click Element xpath=//*[contains(@class, 'ui-button-text ui-c')][./text()='Нова закупівля'] | |
| 55 | - Wait Until Page Contains Element id=mForm:data:name | |
| 56 | - Input text id=mForm:data:name ${title} | |
| 57 | - Input text id=mForm:data:desc ${description} | |
| 58 | - Input text id=mForm:data:budget ${budget} | |
| 59 | - Input text id=mForm:data:step ${step_rate} | |
| 60 | - Click Element xpath=//*[@id='mForm:data:vat']/tbody/tr/td[1]//span | |
| 61 | - Input text id=mForm:data:dEPr_input ${delivery_end_date} | |
| 62 | - Click Element id=mForm:data:cKind_label | |
| 63 | - Click Element xpath=//div[@id='mForm:data:cKind_panel']//li[3] | |
| 64 | - Input text id=mForm:data:cCpvGr_input ${cpv_id_1} | |
| 65 | - Wait Until Page Contains Element xpath=.//*[@id='mForm:data:cCpvGr_panel']/table/tbody/tr/td[2]/span 10 | |
| 66 | - Click Element xpath=.//*[@id='mForm:data:cCpvGr_panel']/table/tbody/tr/td[2]/span | |
| 67 | - Input text id=mForm:data:subject0 ${dkpp_desc} | |
| 68 | - Input text id=mForm:data:cCpv0_input ${cpv_id} | |
| 69 | - Wait Until Page Contains Element xpath=//div[@id='mForm:data:cCpv0_panel']//td[1]/span 10 | |
| 70 | - Click Element xpath=//div[@id='mForm:data:cCpv0_panel']//td[1]/span | |
| 71 | - Input text id=mForm:data:unit0_input ${code} | |
| 72 | - Wait Until Page Contains Element xpath=//div[@id='mForm:data:unit0_panel']//tr/td[1] 10 | |
| 73 | - Click Element xpath=//div[@id='mForm:data:unit0_panel']//tr/td[1] | |
| 74 | - Input text id=mForm:data:amount0 ${quantity} | |
| 75 | - Input text id=mForm:data:cDkpp0_input ${dkpp_id} | |
| 76 | - Wait Until Page Contains Element xpath=//div[@id='mForm:data:cDkpp0_panel']//tr[1]/td[2]/span 10 | |
| 77 | - Click Element xpath=//div[@id='mForm:data:cDkpp0_panel']//tr[1]/td[2]/span | |
| 78 | - Input text id=mForm:data:rName ${name} | |
| 79 | - Input text id=mForm:data:rPhone ${telephone} | |
| 80 | - Input text id=mForm:data:rMail ${mail} | |
| 81 | - Choose File id=mForm:data:docFile_input ${file_path} | |
| 82 | - Sleep 2 | |
| 83 | - Run Keyword if '${mode}' == 'multi' Додати предмет items | |
| 84 | - # Save | |
| 85 | - Click Element id=mForm:bSave | |
| 86 | - Sleep 5 | |
| 87 | - # Announce | |
| 88 | - Click Element xpath=//span[text()="Оголосити"] | |
| 89 | - Sleep 2 | |
| 90 | - # Confirm in message box | |
| 91 | - Click Element xpath=//div[contains(@class, "ui-confirm-dialog") and @aria-hidden="false"]//span[text()="Оголосити"] | |
| 92 | - # More smart wait for id is needed there. | |
| 93 | - Sleep 5 | |
| 94 | - ${tender_UAid}= Get Text id=mForm:nBid | |
| 95 | - ${tender_UAid}= Get Substring ${tender_UAid} 19 | |
| 96 | - ${Ids} Convert To String ${tender_UAid} | |
| 97 | - Run keyword if '${mode}' == 'multi' Set Multi Ids ${tender_UAid} | |
| 98 | - [return] ${Ids} | |
| 99 | - | |
| 100 | -Set Multi Ids | |
| 101 | - [Arguments] @{ARGUMENTS} | |
| 102 | - [Documentation] | |
| 103 | - ... ${ARGUMENTS[0]} == ${tender_UAid} | |
| 104 | - ${id}= Get Text id=mForm:nBid | |
| 105 | - ${Ids} Create List ${tender_UAid} ${id} | |
| 106 | - | |
| 107 | -Додати предмет | |
| 108 | - [Arguments] @{ARGUMENTS} | |
| 109 | - [Documentation] | |
| 110 | - ... ${ARGUMENTS[0]} == items | |
| 111 | - ${dkpp_desc1}= Get From Dictionary ${items[1].additionalClassifications[0]} description | |
| 112 | - ${dkpp_id11}= Get From Dictionary ${items[1].additionalClassifications[0]} id | |
| 113 | - ${dkpp_desc2}= Get From Dictionary ${items[2].additionalClassifications[0]} description | |
| 114 | - ${dkpp_id2}= Get From Dictionary ${items[2].additionalClassifications[0]} id | |
| 115 | - ${dkpp_desc3}= Get From Dictionary ${items[3].additionalClassifications[0]} description | |
| 116 | - ${dkpp_id3}= Get From Dictionary ${items[3].additionalClassifications[0]} id | |
| 117 | - | |
| 118 | - Wait Until Page Contains Element xpath=//button[@class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"] 10 | |
| 119 | - Wait Until Page Contains Element xpath=//button[contains(@class, 'ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only')] 10 | |
| 120 | - Wait Until Page Contains Element xpath=//button[@id="mForm:data:j_idt911"]|//button[@id="mForm:data:j_idt726"] 10 | |
| 121 | - Click Element xpath=//button[@id="mForm:data:j_idt911"]|//button[@id="mForm:data:j_idt726"] | |
| 122 | - Wait Until Page Contains Element id=mForm:data:subject1 10 | |
| 123 | - Input text id=mForm:data:subject1 ${dkpp_desc1} | |
| 124 | - Input text id=mForm:data:cCpv1_input ${cpv_id} | |
| 125 | - Wait Until Page Contains Element xpath=//div[@id='mForm:data:cCpv1_panel']/table/tbody/tr/td[1]/span 10 | |
| 126 | - Click Element xpath=//div[@id='mForm:data:cCpv1_panel']/table/tbody/tr/td[1]/span | |
| 127 | - Input text id=mForm:data:unit1_input ${code} | |
| 128 | - Wait Until Page Contains Element xpath=//div[@id='mForm:data:unit1_panel']/table/tbody/tr/td[1] 10 | |
| 129 | - Click Element xpath=//div[@id='mForm:data:unit1_panel']/table/tbody/tr/td[1] | |
| 130 | - Input text id=mForm:data:amount1 ${quantity} | |
| 131 | - Input text id=mForm:data:cDkpp1_input ${dkpp_id11} | |
| 132 | - Wait Until Page Contains Element xpath=//div[@id='mForm:data:cDkpp1_panel']/table/tbody/tr/td[1]/span 10 | |
| 133 | - Click Element xpath=//div[@id='mForm:data:cDkpp1_panel']/table/tbody/tr/td[1]/span | |
| 134 | - Click Element xpath=//button[@id="mForm:data:j_idt911"]|//button[@id="mForm:data:j_idt726"] | |
| 135 | - Wait Until Page Contains Element id=mForm:data:subject2 10 | |
| 136 | - Input text id=mForm:data:subject2 ${dkpp_desc2} | |
| 137 | - Input text id=mForm:data:cCpv2_input ${cpv_id} | |
| 138 | - Wait Until Page Contains Element xpath=//div[@id='mForm:data:cCpv2_panel']/table/tbody/tr/td[1]/span 10 | |
| 139 | - Click Element xpath=//div[@id='mForm:data:cCpv2_panel']/table/tbody/tr/td[1]/span | |
| 140 | - Input text id=mForm:data:unit2_input ${code} | |
| 141 | - Wait Until Page Contains Element xpath=//div[@id='mForm:data:unit2_panel']/table/tbody/tr/td[1] 10 | |
| 142 | - Click Element xpath=//div[@id='mForm:data:unit2_panel']/table/tbody/tr/td[1] | |
| 143 | - Input text id=mForm:data:amount2 ${quantity} | |
| 144 | - Input text id=mForm:data:cDkpp2_input ${dkpp_id2} | |
| 145 | - Wait Until Page Contains Element xpath=//div[@id='mForm:data:cDkpp2_panel']/table/tbody/tr/td[1]/span 10 | |
| 146 | - Click Element xpath=//div[@id='mForm:data:cDkpp2_panel']/table/tbody/tr/td[1]/span | |
| 147 | - Click Element xpath=//button[@id="mForm:data:j_idt911"]|//button[@id="mForm:data:j_idt726"] | |
| 148 | - Wait Until Page Contains Element id=mForm:data:subject3 10 | |
| 149 | - Input text id=mForm:data:subject3 ${dkpp_desc3} | |
| 150 | - Input text id=mForm:data:cCpv3_input ${cpv_id} | |
| 151 | - Wait Until Page Contains Element xpath=//div[@id='mForm:data:cCpv3_panel']/table/tbody/tr/td[1]/span 10 | |
| 152 | - Click Element xpath=//div[@id='mForm:data:cCpv3_panel']/table/tbody/tr/td[1]/span | |
| 153 | - Input text id=mForm:data:unit3_input ${code} | |
| 154 | - Wait Until Page Contains Element xpath=//div[@id='mForm:data:unit3_panel']/table/tbody/tr/td[1] 10 | |
| 155 | - Click Element xpath=//div[@id='mForm:data:unit3_panel']/table/tbody/tr/td[1] | |
| 156 | - Input text id=mForm:data:amount3 ${quantity} | |
| 157 | - Input text id=mForm:data:cDkpp3_input ${dkpp_id3} | |
| 158 | - Wait Until Page Contains Element xpath=//div[@id='mForm:data:cDkpp3_panel']/table/tbody/tr/td[1]/span 10 | |
| 159 | - Click Element xpath=//div[@id='mForm:data:cDkpp3_panel']/table/tbody/tr/td[1]/span | |
| 160 | - | |
| 161 | -Пошук тендера по ідентифікатору | |
| 162 | - [Arguments] @{ARGUMENTS} | |
| 163 | - [Documentation] | |
| 164 | - ... ${ARGUMENTS[0]} == username | |
| 165 | - ... ${ARGUMENTS[1]} == tenderId | |
| 166 | - ... ${ARGUMENTS[2]} == id | |
| 167 | - Switch browser ${ARGUMENTS[0]} | |
| 168 | - ${current_location}= Get Location | |
| 169 | - Wait Until Page Contains Офіційний майданчик державних закупівель України 10 | |
| 170 | - sleep 1 | |
| 171 | - Input Text id=j_idt18:datalist:j_idt67 ${ARGUMENTS[1]} | |
| 172 | - sleep 2 | |
| 173 | - ${last_note_id}= Add pointy note jquery=a[href^="#/tenderDetailes"] Found tender with tenderID "${ARGUMENTS[1]}" width=200 position=bottom | |
| 174 | - sleep 1 | |
| 175 | - Remove element ${last_note_id} | |
| 176 | - Click Link jquery=a[href^="#/tenderDetailes"] | |
| 177 | - Wait Until Page Contains ${ARGUMENTS[1]} 10 | |
| 178 | - sleep 1 | |
| 179 | - Capture Page Screenshot |
Please
register
or
login
to post a comment