Showing
1 changed file
with
53 additions
and
28 deletions
... | ... | @@ -7,10 +7,28 @@ ${item_id} 0 |
7 | 7 | ${question_id} 0 |
8 | 8 | |
9 | 9 | *** Keywords *** |
10 | +отримати internal id по UAid | |
11 | + [Arguments] @{ARGUMENTS} | |
12 | + [Documentation] | |
13 | + ... ${ARGUMENTS[0]} == username | |
14 | + ... ${ARGUMENTS[1]} == tenderid | |
15 | + log many @{ARGUMENTS} | |
16 | + ${tenders}= get_internal_id ${USERS.users['${ARGUMENTS[0]}'].client.get_tenders} ${USERS.users['${ARGUMENTS[0]}'].creation_date} | |
17 | + :FOR ${tender} IN @{tenders} | |
18 | + \ log ${tender} | |
19 | + \ ${internal_id}= Run Keyword And Return If '${tender.tenderID}' == '${ARGUMENTS[1]}' Get Variable Value ${tender.id} | |
20 | + \ Exit For Loop If '${tender.tenderID}' == '${ARGUMENTS[1]}' | |
21 | + log ${internal_id} | |
22 | + log ${tenders} | |
23 | + [return] ${internal_id} | |
24 | + | |
25 | + | |
10 | 26 | Підготувати клієнт для користувача |
11 | 27 | [Arguments] @{ARGUMENTS} |
12 | 28 | [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо |
13 | 29 | ${api_wrapper}= prepare_api_wrapper ${USERS.users['${ARGUMENTS[0]}'].api_key} ${API_HOST_URL} ${api_version} |
30 | + ${creation_date} = get_date | |
31 | + Set To Dictionary ${USERS.users['${ARGUMENTS[0]}']} creation_date ${creation_date} | |
14 | 32 | Set To Dictionary ${USERS.users['${ARGUMENTS[0]}']} client ${api_wrapper} |
15 | 33 | Log Variables |
16 | 34 | |
... | ... | @@ -23,7 +41,6 @@ ${question_id} 0 |
23 | 41 | ${TENDER_DATA}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} create_tender ${ARGUMENTS[1]} |
24 | 42 | Log object data ${TENDER_DATA} cteated_tender |
25 | 43 | ${access_token}= Get Variable Value ${TENDER_DATA.access.token} |
26 | - Set Global Variable ${access_token} | |
27 | 44 | Set To Dictionary ${USERS.users['${ARGUMENTS[0]}']} access_token ${access_token} |
28 | 45 | Log access_token: ${access_token} |
29 | 46 | Log tender_id: ${TENDER_DATA.data.id} |
... | ... | @@ -50,7 +67,8 @@ ${question_id} 0 |
50 | 67 | ... ${ARGUMENTS[0]} == username |
51 | 68 | ... ${ARGUMENTS[1]} == tenderId |
52 | 69 | ... ${ARGUMENTS[2]} == id |
53 | - ${tender_data}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${ARGUMENTS[2]} | |
70 | + ${internalid}= отримати internal id по UAid ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
71 | + ${tender_data}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${internalid} | |
54 | 72 | Set To Dictionary ${USERS.users['${ARGUMENTS[0]}']} tender_data ${tender_data} |
55 | 73 | [return] ${tender_data} |
56 | 74 | |
... | ... | @@ -63,7 +81,6 @@ ${question_id} 0 |
63 | 81 | ... ${ARGUMENTS[2]} == id |
64 | 82 | openprocurement_client.Пошук тендера по ідентифікатору @{ARGUMENTS} |
65 | 83 | |
66 | - | |
67 | 84 | отримати інформацію із тендера |
68 | 85 | [Arguments] @{ARGUMENTS} |
69 | 86 | [Documentation] |
... | ... | @@ -74,7 +91,6 @@ ${question_id} 0 |
74 | 91 | log ${field_value} |
75 | 92 | [return] ${field_value} |
76 | 93 | |
77 | - | |
78 | 94 | Внести зміни в тендер |
79 | 95 | [Arguments] @{ARGUMENTS} |
80 | 96 | [Documentation] |
... | ... | @@ -82,11 +98,11 @@ ${question_id} 0 |
82 | 98 | ... ${ARGUMENTS[1]} == id |
83 | 99 | ... ${ARGUMENTS[2]} == fieldname |
84 | 100 | ... ${ARGUMENTS[3]} == fieldvalue |
85 | - отримати тендер ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
101 | + ${internalid}= отримати internal id по UAid ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
102 | + отримати тендер ${ARGUMENTS[0]} ${internalid} | |
86 | 103 | Set_To_Object ${TENDER_DATA.data} ${ARGUMENTS[2]} ${ARGUMENTS[3]} |
87 | 104 | ${TENDER_DATA}= set_access_key ${TENDER_DATA} ${USERS.users['${ARGUMENTS[0]}'].access_token} |
88 | 105 | ${TENDER_DATA}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} patch_tender ${TENDER_DATA} |
89 | - | |
90 | 106 | Set Global Variable ${TENDER_DATA} |
91 | 107 | |
92 | 108 | отримати тендер |
... | ... | @@ -105,7 +121,8 @@ ${question_id} 0 |
105 | 121 | ... ${ARGUMENTS[0]} == username |
106 | 122 | ... ${ARGUMENTS[1]} == id |
107 | 123 | ... ${ARGUMENTS[2]} == number |
108 | - отримати тендер ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
124 | + ${internalid}= отримати internal id по UAid ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
125 | + отримати тендер ${ARGUMENTS[0]} ${internalid} | |
109 | 126 | ${items}= get from object ${TENDER_DATA.data} items |
110 | 127 | log ${items} |
111 | 128 | :FOR ${INDEX} IN RANGE ${ARGUMENTS[2]} |
... | ... | @@ -121,7 +138,8 @@ ${question_id} 0 |
121 | 138 | ... ${ARGUMENTS[0]} == username |
122 | 139 | ... ${ARGUMENTS[1]} == id |
123 | 140 | ... ${ARGUMENTS[2]} == number |
124 | - отримати тендер ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
141 | + ${internalid}= отримати internal id по UAid ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
142 | + отримати тендер ${ARGUMENTS[0]} ${internalid} | |
125 | 143 | ${items}= get from object ${TENDER_DATA.data} items |
126 | 144 | ${item}= get variable value ${items[1]} |
127 | 145 | log ${items} |
... | ... | @@ -140,7 +158,8 @@ ${question_id} 0 |
140 | 158 | ... ${ARGUMENTS[2]} == bid |
141 | 159 | [Arguments] @{ARGUMENTS} |
142 | 160 | log many @{ARGUMENTS} |
143 | - ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${ARGUMENTS[1]} | |
161 | + ${internalid}= отримати internal id по UAid ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
162 | + ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${internalid} | |
144 | 163 | log ${USERS.users['${ARGUMENTS[0]}']} |
145 | 164 | ${biddingresponce}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} create_question ${tender} ${ARGUMENTS[2]} |
146 | 165 | [return] ${biddingresponce} |
... | ... | @@ -153,7 +172,8 @@ ${question_id} 0 |
153 | 172 | ... ${ARGUMENTS[3]} == answer_data |
154 | 173 | [Arguments] @{ARGUMENTS} |
155 | 174 | log many @{ARGUMENTS} |
156 | - ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${ARGUMENTS[1]} | |
175 | + ${internalid}= отримати internal id по UAid ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
176 | + ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${internalid} | |
157 | 177 | log many ${USERS.users['${ARGUMENTS[0]}']} |
158 | 178 | ${tender}= set_access_key ${tender} ${USERS.users['${ARGUMENTS[0]}'].access_token} |
159 | 179 | ${ARGUMENTS[3].data.id}= Set Variable ${tender.data.questions[${ARGUMENTS[2]}].id} |
... | ... | @@ -168,7 +188,8 @@ ${question_id} 0 |
168 | 188 | ... ${ARGUMENTS[2]} == complaint |
169 | 189 | [Arguments] @{ARGUMENTS} |
170 | 190 | log many @{ARGUMENTS} |
171 | - ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${ARGUMENTS[1]} | |
191 | + ${internalid}= отримати internal id по UAid ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
192 | + ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${internalid} | |
172 | 193 | ${complaint}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} _create_tender_resource_item ${tender} ${ARGUMENTS[2]} complaints |
173 | 194 | Log object data ${complaint} complaint |
174 | 195 | |
... | ... | @@ -178,7 +199,8 @@ ${question_id} 0 |
178 | 199 | ... ${ARGUMENTS[1]} == tender_uid |
179 | 200 | ... ${ARGUMENTS[2]} == complaint |
180 | 201 | [Arguments] @{ARGUMENTS} |
181 | - ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${ARGUMENTS[1]} | |
202 | + ${internalid}= отримати internal id по UAid ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
203 | + ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${internalid} | |
182 | 204 | ${complaint}= Get Variable Value ${tender.data.complaints[0]} |
183 | 205 | log ${complaint} |
184 | 206 | log ${ARGUMENTS[2]} |
... | ... | @@ -187,7 +209,6 @@ ${question_id} 0 |
187 | 209 | #:FOR ${element} IN ${ARGUMENTS[2].data} |
188 | 210 | #\ log ${element} |
189 | 211 | #\ Dictionary Should Contain Value ${complaint} ${element} |
190 | - | |
191 | 212 | |
192 | 213 | Обробити скаргу |
193 | 214 | [Documentation] |
... | ... | @@ -197,14 +218,13 @@ ${question_id} 0 |
197 | 218 | ... ${ARGUMENTS[3]} == answer_data |
198 | 219 | [Arguments] @{ARGUMENTS} |
199 | 220 | log many @{ARGUMENTS} |
200 | - ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${ARGUMENTS[1]} | |
221 | + ${internalid}= отримати internal id по UAid ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
222 | + ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${internalid} | |
201 | 223 | ${tender}= set_access_key ${tender} ${USERS.users['${ARGUMENTS[0]}'].access_token} |
202 | 224 | ${ARGUMENTS[3].data.id}= Set Variable ${tender.data.complaints[${ARGUMENTS[2]}].id} |
203 | 225 | ${complaint_with_answer}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} _patch_tender_resource_item ${tender} ${ARGUMENTS[3]} complaints |
204 | 226 | log many ${USERS.users['${ARGUMENTS[0]}'].client} ${tender} ${ARGUMENTS[3]} |
205 | 227 | Log object data ${complaint_with_answer} complaint_with_answer |
206 | - | |
207 | - | |
208 | 228 | |
209 | 229 | Подати цінову пропозицію |
210 | 230 | [Documentation] |
... | ... | @@ -213,8 +233,9 @@ ${question_id} 0 |
213 | 233 | ... ${ARGUMENTS[2]} == bid |
214 | 234 | [Arguments] @{ARGUMENTS} |
215 | 235 | log many @{ARGUMENTS} |
216 | - ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${ARGUMENTS[1]} | |
217 | - log ${tender} | |
236 | + ${internalid}= отримати internal id по UAid ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
237 | + ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${internalid} | |
238 | + log ${tender}отримати | |
218 | 239 | ${biddingresponce}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} create_bid ${tender} ${ARGUMENTS[2]} |
219 | 240 | [return] ${biddingresponce} |
220 | 241 | |
... | ... | @@ -224,7 +245,8 @@ ${question_id} 0 |
224 | 245 | ... ${ARGUMENTS[1]} == tender_uid |
225 | 246 | ... ${ARGUMENTS[2]} == bid |
226 | 247 | [Arguments] @{ARGUMENTS} |
227 | - ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${ARGUMENTS[1]} | |
248 | + ${internalid}= отримати internal id по UAid ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
249 | + ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${internalid} | |
228 | 250 | ${changed_bid}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} patch_bid ${tender} ${ARGUMENTS[2]} |
229 | 251 | Log ${changed_bid} |
230 | 252 | [return] ${changed_bid} |
... | ... | @@ -235,9 +257,10 @@ ${question_id} 0 |
235 | 257 | ... ${ARGUMENTS[1]} == tender_uid |
236 | 258 | ... ${ARGUMENTS[2]} == bid |
237 | 259 | [Arguments] @{ARGUMENTS} |
238 | - ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${ARGUMENTS[1]} | |
260 | + ${internalid}= отримати internal id по UAid ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
261 | + ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${internalid} | |
239 | 262 | log ${tender} |
240 | - log ${ARGUMENTS[2]} | |
263 | + log ${ARGUMENTS[2]}отримати | |
241 | 264 | ${changed_bid}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} delete_bid ${tender} ${ARGUMENTS[2]} |
242 | 265 | Log ${changed_bid} |
243 | 266 | [return] ${changed_bid} |
... | ... | @@ -248,13 +271,13 @@ ${question_id} 0 |
248 | 271 | ... ${ARGUMENTS[1]} == tender_uid |
249 | 272 | ... ${ARGUMENTS[2]} == award |
250 | 273 | [Arguments] @{ARGUMENTS} |
251 | - ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${ARGUMENTS[1]} | |
274 | + ${internalid}= отримати internal id по UAid ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
275 | + ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${internalid} | |
252 | 276 | ${tender}= set_access_key ${tender} ${USERS.users['${ARGUMENTS[0]}'].access_token} |
253 | 277 | ${award_activeted_response}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} patch_award ${tender} ${ARGUMENTS[2]} |
254 | 278 | Log ${award_activeted_response} |
255 | 279 | [return] ${award_activeted_response} |
256 | 280 | |
257 | - | |
258 | 281 | Завантажити документ в ставку |
259 | 282 | [Documentation] |
260 | 283 | ... ${ARGUMENTS[0]} == username |
... | ... | @@ -287,18 +310,20 @@ ${question_id} 0 |
287 | 310 | ${filename}= Set Variable newfile.txt |
288 | 311 | Set_To_Object ${TENDER_DATA.data} documents.title ${filename} |
289 | 312 | ${reply}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} update_bid_document ${filename} ${tender} ${ARGUMENTS[2]} ${ARGUMENTS[3]} |
290 | - Log object data ${reply} reply | |
313 | + Log object data ${reply} replyотримати | |
291 | 314 | |
292 | 315 | Завантажити документ |
293 | 316 | [Documentation] |
294 | 317 | ... ${ARGUMENTS[0]} == username |
295 | - ... ${ARGUMENTS[1]} == token | |
318 | + ... ${ARGUMENTS[1]} == filename | |
319 | + ... ${ARGUMENTS[2]} == tenderID | |
296 | 320 | [Arguments] @{ARGUMENTS} |
297 | 321 | log ${ARGUMENTS[0]} |
298 | 322 | log ${ARGUMENTS[1]} |
299 | - ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${TENDER_DATA.data.id} | |
300 | - ${tender}= set_access_key ${tender} ${ARGUMENTS[1]} | |
301 | - ${filename}= Set Variable file.txt | |
323 | + log ${ARGUMENTS[2]} | |
324 | + ${tenderID}= openprocurement_client.отримати internal id по UAid ${ARGUMENTS[0]} ${ARGUMENTS[2]} | |
325 | + ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${tenderID} | |
326 | + ${tender}= set_access_key ${tender} ${USERS.users['${ARGUMENTS[0]}'].access_token} | |
302 | 327 | Set_To_Object ${TENDER_DATA.data} documents.title ${filename} |
303 | 328 | ${reply}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} upload_tender_document ${filename} ${tender} |
304 | 329 | Log object data ${reply} reply | ... | ... |
Please
register
or
login
to post a comment