Commit 59886f6d1ab2552a9de1a2c8d96b959323117f51
Merge branch 'pc2' into pc2y
Conflicts: op_robot_tests/tests_files/brokers/publicbid.robot
Showing
6 changed files
with
32 additions
and
42 deletions
@@ -117,6 +117,16 @@ Set Multi Ids | @@ -117,6 +117,16 @@ Set Multi Ids | ||
117 | ${id}= Get Text xpath=//div[contains(@class, "panel-heading")] | 117 | ${id}= Get Text xpath=//div[contains(@class, "panel-heading")] |
118 | ${Ids}= Create List ${tender_UAid} ${id} | 118 | ${Ids}= Create List ${tender_UAid} ${id} |
119 | 119 | ||
120 | +Oтримати internal id по UAid | ||
121 | + [Arguments] @{ARGUMENTS} | ||
122 | + [Documentation] | ||
123 | + ... ${ARGUMENTS[0]} == username | ||
124 | + ... ${ARGUMENTS[1]} == ${tender_UAid} | ||
125 | + etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | ||
126 | + ${current_location}= Get Location | ||
127 | + ${tender_id}= Fetch From Right ${current_location} / | ||
128 | + [return] ${tender_id} | ||
129 | + | ||
120 | Додати предмет | 130 | Додати предмет |
121 | [Arguments] @{ARGUMENTS} | 131 | [Arguments] @{ARGUMENTS} |
122 | [Documentation] | 132 | [Documentation] |
@@ -186,10 +186,7 @@ Set Multi Ids | @@ -186,10 +186,7 @@ Set Multi Ids | ||
186 | [Documentation] | 186 | [Documentation] |
187 | ... ${ARGUMENTS[0]} == username | 187 | ... ${ARGUMENTS[0]} == username |
188 | ... ${ARGUMENTS[1]} == tenderId | 188 | ... ${ARGUMENTS[1]} == tenderId |
189 | - ... ${ARGUMENTS[2]} == id | ||
190 | Switch browser ${ARGUMENTS[0]} | 189 | Switch browser ${ARGUMENTS[0]} |
191 | - ${current_location}= Get Location | ||
192 | - Run keyword if '${BROKERS['${USERS.users['${username}'].broker}'].url}/#/tenderDetailes/${ARGUMENTS[2]}'=='${current_location}' Reload Page | ||
193 | Go to ${BROKERS['${USERS.users['${username}'].broker}'].url} | 190 | Go to ${BROKERS['${USERS.users['${username}'].broker}'].url} |
194 | Wait Until Page Contains Держзакупівлі.онлайн 10 | 191 | Wait Until Page Contains Держзакупівлі.онлайн 10 |
195 | # sleep 1 | 192 | # sleep 1 |
@@ -205,13 +202,13 @@ Set Multi Ids | @@ -205,13 +202,13 @@ Set Multi Ids | ||
205 | [Arguments] @{ARGUMENTS} | 202 | [Arguments] @{ARGUMENTS} |
206 | [Documentation] | 203 | [Documentation] |
207 | ... ${ARGUMENTS[0]} == username | 204 | ... ${ARGUMENTS[0]} == username |
208 | - ... ${ARGUMENTS[1]} == tenderId | ||
209 | - ... ${ARGUMENTS[2]} == id | 205 | + ... ${ARGUMENTS[1]} == tenderUaId |
206 | + ... ${ARGUMENTS[2]} == questionId | ||
210 | ${title}= Get From Dictionary ${ARGUMENTS[2].data} title | 207 | ${title}= Get From Dictionary ${ARGUMENTS[2].data} title |
211 | ${description}= Get From Dictionary ${ARGUMENTS[2].data} description | 208 | ${description}= Get From Dictionary ${ARGUMENTS[2].data} description |
212 | 209 | ||
213 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} | 210 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} |
214 | - netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID} | 211 | + netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} |
215 | 212 | ||
216 | Click Element xpath=//a[@class='reverse tenderLink'] | 213 | Click Element xpath=//a[@class='reverse tenderLink'] |
217 | Wait Until Page Contains Element xpath=//a[@class='reverse openCPart'][span[text()='Обговорення']] 20 | 214 | Wait Until Page Contains Element xpath=//a[@class='reverse openCPart'][span[text()='Обговорення']] 20 |
@@ -227,20 +224,17 @@ Set Multi Ids | @@ -227,20 +224,17 @@ Set Multi Ids | ||
227 | [Arguments] @{ARGUMENTS} | 224 | [Arguments] @{ARGUMENTS} |
228 | [Documentation] | 225 | [Documentation] |
229 | ... ${ARGUMENTS[0]} = username | 226 | ... ${ARGUMENTS[0]} = username |
230 | - ... ${ARGUMENTS[1]} = ${INTERNAL_TENDER_ID} | 227 | + ... ${ARGUMENTS[1]} = tenderUaId |
231 | ... ${ARGUMENTS[2]} = 0 | 228 | ... ${ARGUMENTS[2]} = 0 |
232 | ... ${ARGUMENTS[3]} = answer_data | 229 | ... ${ARGUMENTS[3]} = answer_data |
233 | 230 | ||
234 | ${answer}= Get From Dictionary ${ARGUMENTS[3].data} answer | 231 | ${answer}= Get From Dictionary ${ARGUMENTS[3].data} answer |
235 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} | 232 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} |
236 | - netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID} | 233 | + netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} |
237 | 234 | ||
238 | Click Element xpath=//a[@class='reverse tenderLink'] | 235 | Click Element xpath=//a[@class='reverse tenderLink'] |
239 | Click Element xpath=//a[@class='reverse openCPart'][span[text()='Обговорення']] | 236 | Click Element xpath=//a[@class='reverse openCPart'][span[text()='Обговорення']] |
240 | Input text xpath=//textarea[@name='answer'] ${answer} | 237 | Input text xpath=//textarea[@name='answer'] ${answer} |
241 | Click Element xpath=//div[1]/div[3]/form/div/table/tbody/tr/td[2]/button | 238 | Click Element xpath=//div[1]/div[3]/form/div/table/tbody/tr/td[2]/button |
242 | Wait Until Page Contains ${answer} 30 | 239 | Wait Until Page Contains ${answer} 30 |
243 | - Capture Page Screenshot | ||
244 | - | ||
245 | -# KEYWORD: BuiltIn.Log ${TENDER} | ||
246 | -# 18:11:57.979 INFO {u'LAST_MODIFICATION_DATE': '2015-08-11 18:11:57.974', u'TENDER_UAID': u'UA-2015-08-11-000050'} | ||
240 | + Capture Page Screenshot |
@@ -9,7 +9,7 @@ ${question_id} 0 | @@ -9,7 +9,7 @@ ${question_id} 0 | ||
9 | *** Keywords *** | 9 | *** Keywords *** |
10 | отримати internal id по UAid | 10 | отримати internal id по UAid |
11 | [Arguments] @{ARGUMENTS} | 11 | [Arguments] @{ARGUMENTS} |
12 | - [Documentation] | 12 | + [Documentation] |
13 | ... ${ARGUMENTS[0]} == username | 13 | ... ${ARGUMENTS[0]} == username |
14 | ... ${ARGUMENTS[1]} == tenderid | 14 | ... ${ARGUMENTS[1]} == tenderid |
15 | log many @{ARGUMENTS} | 15 | log many @{ARGUMENTS} |
@@ -4,12 +4,11 @@ Library String | @@ -4,12 +4,11 @@ Library String | ||
4 | Library DateTime | 4 | Library DateTime |
5 | 5 | ||
6 | *** Variables *** | 6 | *** Variables *** |
7 | -##Використовую такий шлях у кожного буде мінятись /yboi/. Міняйте на сві шлях до файлу | ||
8 | -#${file_path} /home/yboi/openprocurement.robottests.buildout/Document.docx | ||
9 | -${file_path} /home/yboi/openprocurement.robottests.buildout/Document.docx | 7 | +${file_path} local_path_to_file("TestDocument.docx") |
10 | ${mail} test@mail.com | 8 | ${mail} test@mail.com |
11 | ${telephone} +380976535447 | 9 | ${telephone} +380976535447 |
12 | 10 | ||
11 | + | ||
13 | *** Keywords *** | 12 | *** Keywords *** |
14 | Підготувати клієнт для користувача | 13 | Підготувати клієнт для користувача |
15 | [Arguments] @{ARGUMENTS} | 14 | [Arguments] @{ARGUMENTS} |
@@ -35,7 +35,7 @@ users: | @@ -35,7 +35,7 @@ users: | ||
35 | homepage: "http://uat.e-tender.biz/#/profile" | 35 | homepage: "http://uat.e-tender.biz/#/profile" |
36 | login: provider2 | 36 | login: provider2 |
37 | password: Qa123456 | 37 | password: Qa123456 |
38 | - browser: firefox | 38 | + browser: chrome |
39 | position: [700, 0] | 39 | position: [700, 0] |
40 | size: [640, 450] | 40 | size: [640, 450] |
41 | E-tender_Viewer: | 41 | E-tender_Viewer: |
@@ -81,9 +81,9 @@ users: | @@ -81,9 +81,9 @@ users: | ||
81 | homepage: "http://dev23.newtend.com/openprocurement/#/home/page/1" | 81 | homepage: "http://dev23.newtend.com/openprocurement/#/home/page/1" |
82 | login: openprocurement@mailinator.com | 82 | login: openprocurement@mailinator.com |
83 | password: 123123 | 83 | password: 123123 |
84 | - browser: firefox | 84 | + browser: chrome |
85 | position: [0, 0] | 85 | position: [0, 0] |
86 | - size: [640, 450] | 86 | + size: [1100, 1000] |
87 | Netcast_Owner: | 87 | Netcast_Owner: |
88 | broker: Netcast | 88 | broker: Netcast |
89 | username: Netcasttest | 89 | username: Netcasttest |
@@ -99,7 +99,7 @@ users: | @@ -99,7 +99,7 @@ users: | ||
99 | homepage: "http://dz2.byustudio.in.ua" | 99 | homepage: "http://dz2.byustudio.in.ua" |
100 | login: halyna.khimka@gmail.com | 100 | login: halyna.khimka@gmail.com |
101 | password: JHO5VUp5n | 101 | password: JHO5VUp5n |
102 | - browser: firefox | 102 | + browser: chrome |
103 | position: [0, 900] | 103 | position: [0, 900] |
104 | size: [920, 580] | 104 | size: [920, 580] |
105 | Publicbid_Owner: | 105 | Publicbid_Owner: |
@@ -117,12 +117,12 @@ users: | @@ -117,12 +117,12 @@ users: | ||
117 | homepage: "http://dev23.newtend.com/openprocurement/tenders" | 117 | homepage: "http://dev23.newtend.com/openprocurement/tenders" |
118 | login: openprocboss@mailinator.com | 118 | login: openprocboss@mailinator.com |
119 | password: 123123 | 119 | password: 123123 |
120 | - browser: firefox | 120 | + browser: chrome |
121 | position: [700, 0] | 121 | position: [700, 0] |
122 | size: [640, 450] | 122 | size: [640, 450] |
123 | Newtend_Viewer: | 123 | Newtend_Viewer: |
124 | broker: Newtend | 124 | broker: Newtend |
125 | username: Newtendtest | 125 | username: Newtendtest |
126 | - browser: firefox | 126 | + browser: chrome |
127 | position: [0, 0] | 127 | position: [0, 0] |
128 | size: [640, 450] | 128 | size: [640, 450] |
1 | +#!/usr/bin/env python | ||
1 | # -*- coding: utf-8 - | 2 | # -*- coding: utf-8 - |
2 | import os | 3 | import os |
3 | from munch import munchify, Munch, fromYAML | 4 | from munch import munchify, Munch, fromYAML |
@@ -137,7 +138,6 @@ def wait_to_date(date_stamp): | @@ -137,7 +138,6 @@ def wait_to_date(date_stamp): | ||
137 | if wait_seconds < 0: | 138 | if wait_seconds < 0: |
138 | return 0 | 139 | return 0 |
139 | return wait_seconds | 140 | return wait_seconds |
140 | -#!/usr/bin/env python | ||
141 | 141 | ||
142 | def convert_date_to_slash_format(isodate): | 142 | def convert_date_to_slash_format(isodate): |
143 | iso_dt=parse_date(isodate) | 143 | iso_dt=parse_date(isodate) |
@@ -172,22 +172,9 @@ def Add_data_for_GUI_FrontEnds(INITIAL_TENDER_DATA): | @@ -172,22 +172,9 @@ def Add_data_for_GUI_FrontEnds(INITIAL_TENDER_DATA): | ||
172 | INITIAL_TENDER_DATA.data.enquiryPeriod['endDate'] = (now + timedelta(minutes=3)).isoformat() | 172 | INITIAL_TENDER_DATA.data.enquiryPeriod['endDate'] = (now + timedelta(minutes=3)).isoformat() |
173 | INITIAL_TENDER_DATA.data.tenderPeriod['startDate'] = (now + timedelta(minutes=4)).isoformat() | 173 | INITIAL_TENDER_DATA.data.tenderPeriod['startDate'] = (now + timedelta(minutes=4)).isoformat() |
174 | INITIAL_TENDER_DATA.data.tenderPeriod['endDate'] = (now + timedelta(minutes=5)).isoformat() | 174 | INITIAL_TENDER_DATA.data.tenderPeriod['endDate'] = (now + timedelta(minutes=5)).isoformat() |
175 | - | ||
176 | -##len(dict.items()[0]) | ||
177 | -##len(dict[key]) | ||
178 | - | ||
179 | - | ||
180 | - #LOGGER.log_message(Message("itemsss: {}".format(INITIAL_TENDER_DATA.data.items[0]), "INFO")) | ||
181 | - | ||
182 | - #item_len = len(INITIAL_TENDER_DATA.data.items) | ||
183 | - | ||
184 | - #LOGGER.log_message(Message("item_len: {}".format(item_len), "INFO")) | ||
185 | - | ||
186 | - #for i in range(len(INITIAL_TENDER_DATA.data.items)): | ||
187 | - #dict.update(INITIAL_TENDER_DATA.data.items.classification['description_ua'] = "Картонки" | ||
188 | -# INITIAL_TENDER_DATA.data.items.classification.update({'description_ua': 'Картонки'}) | ||
189 | - | ||
190 | -# for itm in INITIAL_TENDER_DATA.data.items: | ||
191 | -# itm.classification['description_ua'] = u"Картонки" | ||
192 | - | ||
193 | - return INITIAL_TENDER_DATA | ||
175 | + return INITIAL_TENDER_DATA | ||
176 | + | ||
177 | +def local_path_to_file( file_name ): | ||
178 | + path = os.getcwd() | ||
179 | + path = path.split("brokers", 1)[0] + "documents/" + file_name | ||
180 | + return path |
Please
register
or
login
to post a comment