Commit e2281db2c22ba9a3eb5e658d3af54fed35b97091

Authored by Andrew Yanovych
1 parent 9bfc1ccc

added ketwords for uploading document to bid, fixed issues in keywords

... ... @@ -13,13 +13,14 @@ ${question_id} 0
13 13 ${api_wrapper}= prepare_api_wrapper ${USERS.users['${ARGUMENTS[0]}'].api_key} ${API_HOST_URL} ${api_version}
14 14 Set To Dictionary ${USERS.users['${ARGUMENTS[0]}']} client ${api_wrapper}
15 15 Log Variables
16   -
  16 +
  17 +Підготувати дані для оголошення тендера
  18 + ${INITIAL_TENDER_DATA}= prepare_test_tender_data
  19 + [return] ${INITIAL_TENDER_DATA}
17 20
18 21 Створити тендер
19 22 [Arguments] @{ARGUMENTS}
20   - ${INITIAL_TENDER_DATA}= prepare_test_tender_data
21   - Log object data ${INITIAL_TENDER_DATA}
22   - ${TENDER_DATA}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} create_tender ${INITIAL_TENDER_DATA}
  23 + ${TENDER_DATA}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} create_tender ${ARGUMENTS[1]}
23 24 Log object data ${TENDER_DATA} cteated_tender
24 25 ${access_token}= Get Variable Value ${TENDER_DATA.access.token}
25 26 Set Global Variable ${access_token}
... ... @@ -41,7 +42,7 @@ ${question_id} 0
41 42 Log access_token: ${access_token}
42 43 Log tender_id: ${TENDER_DATA.data.id}
43 44 Set Global Variable ${TENDER_DATA}
44   - [return] ${TENDER_DATA}
  45 + [return] ${TENDER_DATA}
45 46
46 47 Пошук тендера по ідентифікатору
47 48 [Arguments] @{ARGUMENTS}
... ... @@ -68,7 +69,9 @@ ${question_id} 0
68 69 [Documentation]
69 70 ... ${ARGUMENTS[0]} == username
70 71 ... ${ARGUMENTS[1]} == fieldname
  72 + log ${ARGUMENTS}
71 73 ${field_value}= Get_From_Object ${USERS.users['${ARGUMENTS[0]}'].tender_data.data} ${ARGUMENTS[1]}
  74 + log ${field_value}
72 75 [return] ${field_value}
73 76
74 77
... ... @@ -134,13 +137,16 @@ ${question_id} 0
134 137 [Documentation]
135 138 ... ${ARGUMENTS[0]} == username
136 139 ... ${ARGUMENTS[1]} == tender_uid
137   - ... ${ARGUMENTS[2]} == question
  140 + ... ${ARGUMENTS[2]} == bid
138 141 [Arguments] @{ARGUMENTS}
139 142 log many @{ARGUMENTS}
140 143 ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${ARGUMENTS[1]}
141   - ${question}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} create_question ${tender} ${ARGUMENTS[2]}
142   - Log object data ${question} question
143   -
  144 + log ${USERS.users['${ARGUMENTS[0]}']}
  145 + ${tender}= set_access_key ${tender} ${USERS.users['${ARGUMENTS[0]}'].api_key}
  146 + log ${tender}
  147 + ${biddingresponce}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} create_question ${tender} ${ARGUMENTS[2]}
  148 + [return] ${biddingresponce}
  149 +
144 150 Відповісти на питання
145 151 [Documentation]
146 152 ... ${ARGUMENTS[0]} == username
... ... @@ -167,7 +173,24 @@ ${question_id} 0
167 173 ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${ARGUMENTS[1]}
168 174 ${complaint}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} _create_tender_resource_item ${tender} ${ARGUMENTS[2]} complaints
169 175 Log object data ${complaint} complaint
170   -
  176 +
  177 +порівняти скаргу
  178 + [Documentation]
  179 + ... ${ARGUMENTS[0]} == username
  180 + ... ${ARGUMENTS[1]} == tender_uid
  181 + ... ${ARGUMENTS[2]} == complaint
  182 + [Arguments] @{ARGUMENTS}
  183 + ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${ARGUMENTS[1]}
  184 + ${complaint}= Get Variable Value ${tender.data.complaints[0]}
  185 + log ${complaint}
  186 + log ${ARGUMENTS[2]}
  187 + #TODO: COMPARE
  188 + #Dictionary Should Contain Sub Dictionary ${complaint} ${ARGUMENTS[2].data}
  189 + #:FOR ${element} IN ${ARGUMENTS[2].data}
  190 + #\ log ${element}
  191 + #\ Dictionary Should Contain Value ${complaint} ${element}
  192 +
  193 +
171 194 Обробити скаргу
172 195 [Documentation]
173 196 ... ${ARGUMENTS[0]} == username
... ... @@ -182,6 +205,8 @@ ${question_id} 0
182 205 ${complaint_with_answer}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} _patch_tender_resource_item ${tender} ${ARGUMENTS[3]} complaints
183 206 log many ${USERS.users['${ARGUMENTS[0]}'].client} ${tender} ${ARGUMENTS[3]}
184 207 Log object data ${complaint_with_answer} complaint_with_answer
  208 +
  209 +
185 210
186 211 Подати цінову пропозицію
187 212 [Documentation]
... ... @@ -191,6 +216,7 @@ ${question_id} 0
191 216 [Arguments] @{ARGUMENTS}
192 217 log many @{ARGUMENTS}
193 218 ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${ARGUMENTS[1]}
  219 + log ${tender}
194 220 ${biddingresponce}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} create_bid ${tender} ${ARGUMENTS[2]}
195 221 [return] ${biddingresponce}
196 222
... ... @@ -218,6 +244,21 @@ ${question_id} 0
218 244 [return] ${award_activeted_response}
219 245
220 246
  247 +Завантажити документ в ставку
  248 + [Documentation]
  249 + ... ${ARGUMENTS[0]} == username
  250 + ... ${ARGUMENTS[1]} == token
  251 + ... ${ARGUMENTS[2]} == bid_id
  252 + [Arguments] @{ARGUMENTS}
  253 + log ${ARGUMENTS[0]}
  254 + log ${ARGUMENTS[1]}
  255 + ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${TENDER_DATA.data.id}
  256 + ${tender}= set_access_key ${tender} ${ARGUMENTS[1]}
  257 + ${filename}= Set Variable file.txt
  258 + Set_To_Object ${TENDER_DATA.data} documents.title ${filename}
  259 + ${reply}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} upload_bid_document ${filename} ${tender} ${ARGUMENTS[2]}
  260 + Log object data ${reply} reply
  261 +
221 262 Завантажити документ
222 263 [Documentation]
223 264 ... ${ARGUMENTS[0]} == username
... ... @@ -227,7 +268,8 @@ ${question_id} 0
227 268 log ${ARGUMENTS[1]}
228 269 ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${TENDER_DATA.data.id}
229 270 ${tender}= set_access_key ${tender} ${ARGUMENTS[1]}
230   - ${reply}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} upload_tender_document ${tender}
  271 + ${filename}= Set Variable file.txt
  272 + Set_To_Object ${TENDER_DATA.data} documents.title ${filename}
  273 + ${reply}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} upload_tender_document ${filename} ${tender}
231 274 Log object data ${reply} reply
232   -
233 275  
\ No newline at end of file
... ...
Please register or login to post a comment