Showing
9 changed files
with
275 additions
and
442 deletions
... | ... | @@ -5,6 +5,12 @@ Library DateTime |
5 | 5 | |
6 | 6 | *** Variables *** |
7 | 7 | ${locator.tenderId} jquery=h3 |
8 | +##Використовую такий шлях у кожного буде мінятись /yboi/. Міняйте на сві шлях до файлу | |
9 | +${file_add} /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] | |
8 | 14 | |
9 | 15 | *** Keywords *** |
10 | 16 | Підготувати клієнт для користувача |
... | ... | @@ -14,7 +20,9 @@ ${locator.tenderId} jquery=h3 |
14 | 20 | Open Browser ${USERS.users['${ARGUMENTS[0]}'].homepage} ${USERS.users['${username}'].browser} alias=${ARGUMENTS[0]} |
15 | 21 | Set Window Size @{USERS.users['${ARGUMENTS[0]}'].size} |
16 | 22 | Set Window Position @{USERS.users['${ARGUMENTS[0]}'].position} |
17 | -# login | |
23 | + Run Keyword If '${username}' != 'E-tender_Viewer' Login | |
24 | + | |
25 | +Login | |
18 | 26 | Wait Until Page Contains Element id=inputUsername 100 |
19 | 27 | Input text id=inputUsername ${USERS.users['${username}'].login} |
20 | 28 | Wait Until Page Contains Element id=inputPassword 100 |
... | ... | @@ -25,35 +33,35 @@ ${locator.tenderId} jquery=h3 |
25 | 33 | [Arguments] @{ARGUMENTS} |
26 | 34 | [Documentation] |
27 | 35 | ... ${ARGUMENTS[0]} == username |
28 | - ... ${ARGUMENTS[1]} == tender_data | |
29 | - ${tender_data}= Add_time_for_GUI_FrontEnds ${ARGUMENTS[1]} | |
30 | - ${items}= Get From Dictionary ${tender_data.data} items | |
31 | - ${title}= Get From Dictionary ${tender_data.data} title | |
32 | - ${description}= Get From Dictionary ${tender_data.data} description | |
33 | - ${budget}= Get From Dictionary ${tender_data.data.value} amount | |
34 | - ${step_rate}= Get From Dictionary ${tender_data.data.minimalStep} amount | |
35 | - ${items_description}= Get From Dictionary ${tender_data.data} description | |
36 | + ... ${ARGUMENTS[1]} == initial_tender_data | |
37 | + ${prepared_tender_data}= Add_data_for_GUI_FrontEnds ${ARGUMENTS[1]} | |
38 | + ${items}= Get From Dictionary ${prepared_tender_data.data} items | |
39 | + ${title}= Get From Dictionary ${prepared_tender_data.data} title | |
40 | + ${description}= Get From Dictionary ${prepared_tender_data.data} description | |
41 | + ${budget}= Get From Dictionary ${prepared_tender_data.data.value} amount | |
42 | + ${step_rate}= Get From Dictionary ${prepared_tender_data.data.minimalStep} amount | |
43 | + ${items_description}= Get From Dictionary ${prepared_tender_data.data} description | |
36 | 44 | ${quantity}= Get From Dictionary ${items[0]} quantity |
37 | 45 | ${cpv}= Get From Dictionary ${items[0].classification} id |
38 | - ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description | |
39 | - ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id | |
40 | 46 | ${unit}= Get From Dictionary ${items[0].unit} name |
41 | - ${start_date}= Get From Dictionary ${tender_data.data.tenderPeriod} startDate | |
47 | + ${start_date}= Get From Dictionary ${prepared_tender_data.data.tenderPeriod} startDate | |
42 | 48 | ${start_date}= convert_date_to_etender_format ${start_date} |
43 | - ${start_time}= Get From Dictionary ${tender_data.data.tenderPeriod} startDate | |
49 | + ${start_time}= Get From Dictionary ${prepared_tender_data.data.tenderPeriod} startDate | |
44 | 50 | ${start_time}= convert_time_to_etender_format ${start_time} |
45 | - ${end_date}= Get From Dictionary ${tender_data.data.tenderPeriod} endDate | |
51 | + ${end_date}= Get From Dictionary ${prepared_tender_data.data.tenderPeriod} endDate | |
46 | 52 | ${end_date}= convert_date_to_etender_format ${end_date} |
47 | - ${end_time}= Get From Dictionary ${tender_data.data.tenderPeriod} endDate | |
53 | + ${end_time}= Get From Dictionary ${prepared_tender_data.data.tenderPeriod} endDate | |
48 | 54 | ${end_time}= convert_time_to_etender_format ${end_time} |
49 | - ${enquiry_end_date}= Get From Dictionary ${tender_data.data.enquiryPeriod} endDate | |
55 | + ${enquiry_end_date}= Get From Dictionary ${prepared_tender_data.data.enquiryPeriod} endDate | |
50 | 56 | ${enquiry_end_date}= convert_date_to_etender_format ${enquiry_end_date} |
51 | - ${enquiry_end_time}= Get From Dictionary ${tender_data.data.enquiryPeriod} endDate | |
57 | + ${enquiry_end_time}= Get From Dictionary ${prepared_tender_data.data.enquiryPeriod} endDate | |
52 | 58 | ${enquiry_end_time}= convert_time_to_etender_format ${enquiry_end_time} |
53 | 59 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} |
54 | - Wait Until Page Contains Мої закупівлі 100 | |
60 | + Wait Until Page Contains Мої закупівлі 100 | |
61 | + Sleep 1 | |
55 | 62 | Click Element xpath=//a[contains(@class, 'ng-binding')][./text()='Мої закупівлі'] |
56 | 63 | Wait Until Page Contains Element xpath=//a[contains(@class, 'btn btn-info')] |
64 | + Sleep 1 | |
57 | 65 | Click Element xpath=//a[contains(@class, 'btn btn-info')] |
58 | 66 | Wait Until Page Contains Element id=title |
59 | 67 | Input text id=title ${title} |
... | ... | @@ -63,7 +71,7 @@ ${locator.tenderId} jquery=h3 |
63 | 71 | Input text id=minimalStep ${step_rate} |
64 | 72 | Input text id=itemsDescription ${items_description} |
65 | 73 | Input text id=itemsQuantity ${quantity} |
66 | - Wait Until Page Contains Element xpath=//select[@name="itemsUnit"]/option[@value='kilogram'] 100 | |
74 | + Wait Until Page Contains Element xpath=//select[@name="itemsUnit"]/option[@value='kilogram'] | |
67 | 75 | Click Element xpath=//select[@name="itemsUnit"]/option[@value='kilogram'] |
68 | 76 | Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='enqPEndDate'] ${enquiry_end_date} |
69 | 77 | Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//div[contains(@class, 'col-sm-2')]//input[@ng-model='data.enquiryPeriod.endDate'] ${enquiry_end_time} |
... | ... | @@ -71,26 +79,28 @@ ${locator.tenderId} jquery=h3 |
71 | 79 | Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//div[contains(@class, 'col-sm-2')]//input[@ng-model='data.tenderPeriod.startDate'] ${start_time} |
72 | 80 | Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='endDate'] ${end_date} |
73 | 81 | Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//div[contains(@class, 'col-sm-2')]//input[@ng-model='data.tenderPeriod.endDate'] ${end_time} |
82 | + Sleep 2 | |
74 | 83 | Click Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#classification'] |
75 | - Wait Until Element Is Visible xpath=//div[contains(@role,'dialog')] | |
84 | + Sleep 1 | |
76 | 85 | Input text xpath=//div[contains(@class, 'modal-content')]//input[@ng-model='searchstring'] ${cpv} |
86 | + Sleep 2 | |
77 | 87 | Wait Until Page Contains ${cpv} |
78 | 88 | Click Element xpath=//td[contains(., '${cpv}')] |
89 | + Sleep 1 | |
79 | 90 | Click Element xpath=//div[contains(@class, 'modal-content')]//button[@ng-click='choose()'] |
80 | - Click Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'] | |
81 | - Wait Until Element Is Visible xpath=//div[contains(@id,'addClassification')] | |
82 | - Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc} | |
83 | - Wait Until Page Contains ${dkpp_id} | |
84 | - Click Element xpath=//td[contains(., '${dkpp_id}')] | |
85 | - Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()'] | |
86 | - Run Keyword if '${mode}' == 'multi' Додати предмет items | |
91 | + Sleep 1 | |
92 | + Додати предмет ${items[0]} 0 | |
93 | + Run Keyword if '${mode}' == 'multi' Додати багато предметів items | |
94 | + Sleep 1 | |
87 | 95 | Wait Until Page Contains Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit'] |
88 | 96 | Click Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit'] |
97 | + Sleep 1 | |
89 | 98 | Wait Until Page Contains [ТЕСТУВАННЯ] 100 |
90 | - Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-scope ng-table')]//tr[1]//a | |
91 | - ${tender_UAid}= Wait Until Keyword Succeeds 240sec 2sec get tender UAid | |
92 | -### harcode Idis bacause issues on the E-tender side, to remove, 1 line: | |
93 | - ${tender_UAid}= Convert To String UA-2015-08-03-000025 | |
99 | + Sleep 20 | |
100 | + Click Element xpath=//*[text()='${title}'] | |
101 | + Sleep 5 | |
102 | + ${tender_UAid}= Get Text xpath=//div[contains(@class, "panel-heading")] | |
103 | + ${tender_UAid}= Get Substring ${tender_UAid} 10 | |
94 | 104 | ${Ids}= Convert To String ${tender_UAid} |
95 | 105 | Run keyword if '${mode}' == 'multi' Set Multi Ids ${ARGUMENTS[0]} ${tender_UAid} |
96 | 106 | [return] ${Ids} |
... | ... | @@ -98,14 +108,10 @@ ${locator.tenderId} jquery=h3 |
98 | 108 | Set Multi Ids |
99 | 109 | [Arguments] @{ARGUMENTS} |
100 | 110 | [Documentation] |
101 | - ... ${ARGUMENTS[0]} == username | |
102 | - ... ${ARGUMENTS[1]} == ${tender_UAid} | |
103 | - ${id}= Oтримати internal id по UAid ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
104 | - ${Ids}= Create List ${tender_UAid} ${id} | |
105 | - | |
106 | -get tender UAid | |
107 | - ${tender_UAid}= Get Text xpath=//div[contains(@class, "panel-heading")] | |
108 | - ${tender_UAid}= Get Substring ${tender_UAid} 7 27 | |
111 | + ... ${ARGUMENTS[0]} == ${tender_UAid} | |
112 | + ${current_location}= Get Location | |
113 | + ${id}= Get Substring ${current_location} 10 | |
114 | + ${Ids}= Create List ${tender_UAid} ${id} | |
109 | 115 | |
110 | 116 | Oтримати internal id по UAid |
111 | 117 | [Arguments] @{ARGUMENTS} |
... | ... | @@ -115,48 +121,34 @@ Oтримати internal id по UAid |
115 | 121 | etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} |
116 | 122 | ${current_location}= Get Location |
117 | 123 | ${tender_id}= Fetch From Right ${current_location} / |
118 | -## harcode Idis bacause issues on the E-tender side, to remove, 1 line: | |
119 | - ${tender_id}= Convert To String 94ffe180019d459787aafe290cd300e2 | |
120 | 124 | [return] ${tender_id} |
121 | 125 | |
122 | 126 | Додати предмет |
123 | 127 | [Arguments] @{ARGUMENTS} |
124 | 128 | [Documentation] |
125 | 129 | ... ${ARGUMENTS[0]} == items |
126 | - ${dkpp_desc1}= Get From Dictionary ${items[1].additionalClassifications[0]} description | |
127 | - ${dkpp_id1}= Get From Dictionary ${items[1].additionalClassifications[0]} id | |
128 | - ${dkpp_desc2}= Get From Dictionary ${items[2].additionalClassifications[0]} description | |
129 | - ${dkpp_id2}= Get From Dictionary ${items[2].additionalClassifications[0]} id | |
130 | - ${dkpp_desc3}= Get From Dictionary ${items[3].additionalClassifications[0]} description | |
131 | - ${dkpp_id3}= Get From Dictionary ${items[3].additionalClassifications[0]} id | |
132 | - | |
133 | - Wait Until Page Contains Element xpath=.//*[@id='myform']/tender-form/div/button 100 | |
134 | - Click Element xpath=.//*[@id='myform']/tender-form/div/button | |
130 | + ... ${ARGUMENTS[1]} == ${INDEX} | |
131 | + ${dkpp_desc}= Get From Dictionary ${ARGUMENTS[0].additionalClassifications[0]} description | |
132 | + ${dkpp_id}= Get From Dictionary ${ARGUMENTS[0].additionalClassifications[0]} id | |
135 | 133 | Sleep 2 |
136 | - Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[2] | |
134 | + Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[${ARGUMENTS[1]}+1] | |
137 | 135 | Wait Until Element Is Visible xpath=//div[contains(@id,'addClassification')] |
138 | - Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc1} | |
139 | - Wait Until Page Contains ${dkpp_id1} | |
140 | - Click Element xpath=//td[contains(., '${dkpp_id1}')] | |
141 | - Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()'] | |
142 | - Sleep 2 | |
143 | - Click Element xpath=.//*[@id='myform']/tender-form/div/button | |
144 | 136 | Sleep 2 |
145 | - Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[3] | |
146 | - Wait Until Element Is Visible xpath=//div[contains(@id,'addClassification')] | |
147 | - Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc2} | |
148 | - Wait Until Page Contains ${dkpp_id2} | |
149 | - Click Element xpath=//td[contains(., '${dkpp_id2}')] | |
137 | + Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc} | |
138 | + Wait Until Page Contains ${dkpp_id} | |
139 | + Sleep 1 | |
140 | + Click Element xpath=//td[contains(., '${dkpp_id}')] | |
150 | 141 | Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()'] |
151 | 142 | Sleep 2 |
152 | - Click Element xpath=.//*[@id='myform']/tender-form/div/button | |
153 | - Sleep 2 | |
154 | - Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[4] | |
155 | - Wait Until Element Is Visible xpath=//div[contains(@id,'addClassification')] | |
156 | - Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc3} | |
157 | - Wait Until Page Contains ${dkpp_id3} | |
158 | - Click Element xpath=//td[contains(., '${dkpp_id3}')] | |
159 | - Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()'] | |
143 | + | |
144 | +Додати багато предметів | |
145 | + [Arguments] @{ARGUMENTS} | |
146 | + [Documentation] | |
147 | + ... ${ARGUMENTS[0]} == items | |
148 | + ${Items_length}= Get Length ${items} | |
149 | + : FOR ${INDEX} IN RANGE 1 ${Items_length} | |
150 | + \ Click Element xpath=.//*[@id='myform']/tender-form/div/button | |
151 | + \ Додати предмет ${items[${INDEX}]} ${INDEX} | |
160 | 152 | |
161 | 153 | Пошук тендера по ідентифікатору |
162 | 154 | [Arguments] @{ARGUMENTS} |
... | ... | @@ -238,6 +230,61 @@ Oтримати internal id по UAid |
238 | 230 | Wait Until Page Contains ${ARGUMENTS[1]} 10 |
239 | 231 | sleep 1 |
240 | 232 | |
233 | +Внести зміни в тендер | |
234 | + [Arguments] @{ARGUMENTS} | |
235 | + [Documentation] | |
236 | + ... ${ARGUMENTS[0]} = username | |
237 | + ... ${ARGUMENTS[1]} = ${TENDER_UAID} | |
238 | + ${ADDITIONAL_DATA}= prepare_test_tender_data ${BROKERS['${USERS.users['${tender_owner}'].broker}'].period_interval} single | |
239 | + ${tender_data}= Add_data_for_GUI_FrontEnds ${ADDITIONAL_DATA} | |
240 | + ${items}= Get From Dictionary ${tender_data.data} items | |
241 | + ${description}= Get From Dictionary ${tender_data.data} description | |
242 | + Selenium2Library.Switch Browser ${ARGUMENTS[0]} | |
243 | + etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
244 | + Wait Until Page Contains Element xpath=//a[@class='btn btn-primary ng-scope'] 10 | |
245 | + Click Element xpath=//a[@class='btn btn-primary ng-scope'] | |
246 | + Sleep 2 | |
247 | + Input text id=description ${description} | |
248 | + Click Element xpath=//button[@class='btn btn-info ng-isolate-scope'] | |
249 | + Capture Page Screenshot | |
250 | + | |
251 | +додати предмети закупівлі | |
252 | + [Arguments] @{ARGUMENTS} | |
253 | + [Documentation] | |
254 | + ... ${ARGUMENTS[0]} = username | |
255 | + ... ${ARGUMENTS[1]} = ${TENDER_UAID} | |
256 | + ... ${ARGUMENTS[2]} = 3 | |
257 | + ${ADDITIONAL_DATA}= prepare_test_tender_data ${BROKERS['${USERS.users['${tender_owner}'].broker}'].period_interval} multi | |
258 | + ${tender_data}= Add_data_for_GUI_FrontEnds ${ADDITIONAL_DATA} | |
259 | + ${items}= Get From Dictionary ${tender_data.data} items | |
260 | + Selenium2Library.Switch Browser ${ARGUMENTS[0]} | |
261 | + Run keyword if '${TEST NAME}' == 'Можливість додати позицію закупівлі в тендер' додати позицію | |
262 | + Run keyword if '${TEST NAME}' != 'Можливість додати позицію закупівлі в тендер' видалити позиції | |
263 | + | |
264 | +додати позицію | |
265 | + etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
266 | + Sleep 2 | |
267 | + Click Element xpath=//a[@class='btn btn-primary ng-scope'] | |
268 | + Sleep 2 | |
269 | + : FOR ${INDEX} IN RANGE 1 ${ARGUMENTS[2]} +1 | |
270 | + \ Click Element xpath=.//*[@id='myform']/tender-form/div/button | |
271 | + \ Додати предмет ${items[${INDEX}]} ${INDEX} | |
272 | + Sleep 2 | |
273 | + Click Element xpath=//div[@class='form-actions']/button[./text()='Зберегти зміни'] | |
274 | + Wait Until Page Contains [ТЕСТУВАННЯ] 100 | |
275 | + | |
276 | +видалити позиції | |
277 | + etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
278 | + Click Element xpath=//a[@class='btn btn-primary ng-scope'] | |
279 | + Sleep 2 | |
280 | + : FOR ${INDEX} IN RANGE 1 ${ARGUMENTS[2]} +1 | |
281 | + \ Click Element xpath=(//button[@class='btn btn-danger ng-scope'])[last()] | |
282 | + \ Sleep 1 | |
283 | + Sleep 2 | |
284 | + Wait Until Page Contains Element xpath=//div[@class='form-actions']/button[./text()='Зберегти зміни'] 10 | |
285 | + Click Element xpath=//div[@class='form-actions']/button[./text()='Зберегти зміни'] | |
286 | + Wait Until Page Contains [ТЕСТУВАННЯ] 100 | |
287 | + | |
241 | 288 | отримати інформацію із тендера |
242 | 289 | [Arguments] @{ARGUMENTS} |
243 | 290 | [Documentation] |
... | ... | @@ -245,15 +292,9 @@ Oтримати internal id по UAid |
245 | 292 | ... ${ARGUMENTS[1]} == fieldname |
246 | 293 | Switch browser ${ARGUMENTS[0]} |
247 | 294 | ${return_value}= run keyword отримати інформацію про ${ARGUMENTS[1]} |
295 | + Log ${return_value} | |
248 | 296 | [return] ${return_value} |
249 | 297 | |
250 | -Відмітити на сторінці поле з тендера | |
251 | - [Arguments] ${fieldname} ${locator} | |
252 | - ${last_note_id}= Add pointy note ${locator} Found ${fieldname} width=200 position=bottom | |
253 | - Align elements horizontally ${locator} ${last_note_id} | |
254 | - sleep 1 | |
255 | - Remove element ${last_note_id} | |
256 | - | |
257 | 298 | Отримати тест із поля і показати на сторінці |
258 | 299 | [Arguments] ${fieldname} |
259 | 300 | sleep 3 |
... | ... | @@ -261,16 +302,12 @@ Oтримати internal id по UAid |
261 | 302 | ${return_value}= Get Text ${locator.${fieldname}} |
262 | 303 | [return] ${return_value} |
263 | 304 | |
264 | -отримати інформацію про tenderId | |
265 | - ${return_value}= Отримати тест із поля і показати на сторінці tenderId | |
266 | - [return] ${return_value.split(' ')[1]} | |
267 | - | |
268 | 305 | отримати інформацію про title |
269 | 306 | ${return_value}= Отримати тест із поля і показати на сторінці title |
270 | 307 | [return] ${return_value} |
271 | 308 | |
272 | 309 | отримати інформацію про description |
273 | - ${return_value}= Отримати тест із поля і показати на сторінці description | |
310 | + ${return_value}= Отримати тест із поля і показати на сторінці description | |
274 | 311 | [return] ${return_value} |
275 | 312 | |
276 | 313 | отримати інформацію про minimalStep.amount |
... | ... | @@ -278,17 +315,28 @@ Oтримати internal id по UAid |
278 | 315 | ${return_value}= Convert To Number ${return_value.split(' ')[0]} |
279 | 316 | [return] ${return_value} |
280 | 317 | |
281 | -отримати інформацію про procuringEntity.name | |
282 | - ${return_value}= Отримати тест із поля і показати на сторінці procuringEntity.name | |
283 | - [return] ${return_value} | |
284 | - | |
285 | - | |
286 | 318 | отримати інформацію про value.amount |
287 | - ${return_value}= Отримати тест із поля і показати на сторінці value.amount | |
319 | + ${return_value}= Отримати тест із поля і показати на сторінці value.amount | |
288 | 320 | ${return_value}= Evaluate "".join("${return_value}".split(' ')[:-3]) |
289 | 321 | ${return_value}= Convert To Number ${return_value} |
290 | 322 | [return] ${return_value} |
291 | 323 | |
324 | +Відмітити на сторінці поле з тендера | |
325 | + [Arguments] ${fieldname} ${locator} | |
326 | + ${last_note_id}= Add pointy note ${locator} Found ${fieldname} width=200 position=bottom | |
327 | + Align elements horizontally ${locator} ${last_note_id} | |
328 | + sleep 1 | |
329 | + Remove element ${last_note_id} | |
330 | + | |
331 | +отримати інформацію про tenderId | |
332 | + ${return_value}= отримати тест із поля і показати на сторінці tenderId | |
333 | + ${return_value}= Get Substring ${return_value} 10 | |
334 | + [return] ${return_value} | |
335 | + | |
336 | +отримати інформацію про procuringEntity.name | |
337 | + ${return_value}= Отримати тест із поля і показати на сторінці procuringEntity.name | |
338 | + [return] ${return_value} | |
339 | + | |
292 | 340 | отримати інформацію про tenderPeriod.startDate |
293 | 341 | ${return_value}= Отримати тест із поля і показати на сторінці tenderPeriod.startDate |
294 | 342 | [return] ${return_value} |
... | ... | @@ -305,7 +353,6 @@ Oтримати internal id по UAid |
305 | 353 | ${return_value}= Отримати тест із поля і показати на сторінці enquiryPeriod.endDate |
306 | 354 | [return] ${return_value} |
307 | 355 | |
308 | - | |
309 | 356 | отримати інформацію про items[${item_id}].description |
310 | 357 | відмітити на сторінці поле з тендера items[${item_id}].description jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Детальний опис предмету закупівлі:")>:eq(1)> |
311 | 358 | ${return_value}= Get Text jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Детальний опис предмету закупівлі:")>:eq(1)> | ... | ... |
... | ... | @@ -37,6 +37,7 @@ ${locator.questions[0].answer} xpath=//div[@class = 'answer relative']//di |
37 | 37 | Login |
38 | 38 | [Arguments] @{ARGUMENTS} |
39 | 39 | Wait Until Page Contains Element name=email 10 |
40 | + Input text name=email mail | |
40 | 41 | Sleep 1 |
41 | 42 | Input text name=email ${USERS.users['${username}'].login} |
42 | 43 | Sleep 2 |
... | ... | @@ -69,7 +70,7 @@ Pre Login |
69 | 70 | ${countryName}= Get From Dictionary ${ARGUMENTS[1].data.procuringEntity.address} countryName |
70 | 71 | ${delivery_end_date}= Get From Dictionary ${items[0].deliveryDate} endDate |
71 | 72 | ${delivery_end_date}= convert_date_to_slash_format ${delivery_end_date} |
72 | - ${cpv}= Get From Dictionary ${items[0].classification} description_ua | |
73 | + ${cpv}= Convert To String Картонки | |
73 | 74 | ${cpv_id}= Get From Dictionary ${items[0].classification} id |
74 | 75 | ${cpv_id1}= Replace String ${cpv_id} - _ |
75 | 76 | ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description |
... | ... | @@ -408,4 +409,4 @@ Set Multi Ids |
408 | 409 | sleep 1 |
409 | 410 | Click Element xpath=//a[@class='reverse openCPart'][span[text()='Обговорення']] |
410 | 411 | ${questionsAnswer}= отримати тест із поля і показати на сторінці questions[0].answer |
411 | - [return] ${questionsAnswer} | |
\ No newline at end of file | ||
412 | + [return] ${questionsAnswer} | ... | ... |
... | ... | @@ -15,34 +15,40 @@ ${locator.tenderId} jquery=h3 |
15 | 15 | [Arguments] @{ARGUMENTS} |
16 | 16 | [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо |
17 | 17 | ... ${ARGUMENTS[0]} == username |
18 | - | |
19 | 18 | Open Browser ${BROKERS['${USERS.users['${username}'].broker}'].url} ${USERS.users['${username}'].browser} alias=${ARGUMENTS[0]} |
20 | 19 | Set Window Size @{USERS.users['${ARGUMENTS[0]}'].size} |
21 | 20 | Set Window Position @{USERS.users['${ARGUMENTS[0]}'].position} |
22 | - Wait Until Page Contains Element id=indexpage_login 100 | |
21 | + | |
22 | +# sleep 10 | |
23 | + Run Keyword If '${username}' != 'Newtend_Viewer' Login | |
24 | + | |
25 | +Login | |
26 | + Wait Until Page Contains Element id=indexpage_login 20 | |
23 | 27 | Click Element id=indexpage_login |
24 | - Wait Until Page Contains Element id=password 100 | |
28 | + Wait Until Page Contains Element id=password 20 | |
25 | 29 | Input text id=login-email ${USERS.users['${username}'].login} |
26 | 30 | Input text id=password ${USERS.users['${username}'].password} |
27 | 31 | Click Element id=submit-login-button |
28 | - Wait Until Page Contains Element xpath=//div[@class="introjs-overlay"] 100 | |
32 | + Wait Until Page Contains Element xpath =//a[@class="close-modal-dialog"] 20 | |
33 | + Go to ${USERS.users['${ARGUMENTS[0]}'].homepage} | |
34 | +# Wait Until Page Contains Element xpath=//div[@class="introjs-overlay"] 20 | |
29 | 35 | |
30 | 36 | Створити тендер |
31 | 37 | [Arguments] @{ARGUMENTS} |
32 | 38 | [Documentation] |
33 | 39 | ... ${ARGUMENTS[0]} == username |
34 | - ... ${ARGUMENTS[1]} == tender_data | |
35 | - | |
40 | + ... ${ARGUMENTS[1]} == initial_tender_data | |
36 | 41 | ## Inicialisation |
37 | - ${items}= Get From Dictionary ${ARGUMENTS[1].data} items | |
38 | - ${title}= Get From Dictionary ${ARGUMENTS[1].data} title | |
39 | - ${description}= Get From Dictionary ${ARGUMENTS[1].data} description | |
40 | - ${budget}= Get From Dictionary ${ARGUMENTS[1].data.value} amount | |
41 | - ${step_rate}= Get From Dictionary ${ARGUMENTS[1].data.minimalStep} amount | |
42 | - ${start_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} startDate | |
43 | - ${end_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate | |
44 | - ${enquiry_start_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} startDate | |
45 | - ${enquiry_end_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate | |
42 | + ${prepared_tender_data}= Add_data_for_GUI_FrontEnds ${ARGUMENTS[1]} | |
43 | + ${items}= Get From Dictionary ${prepared_tender_data.data} items | |
44 | + ${title}= Get From Dictionary ${prepared_tender_data.data} title | |
45 | + ${description}= Get From Dictionary ${prepared_tender_data.data} description | |
46 | + ${budget}= Get From Dictionary ${prepared_tender_data.data.value} amount | |
47 | + ${step_rate}= Get From Dictionary ${prepared_tender_data.data.minimalStep} amount | |
48 | + ${start_date}= Get From Dictionary ${prepared_tender_data.data.tenderPeriod} startDate | |
49 | + ${end_date}= Get From Dictionary ${prepared_tender_data.data.tenderPeriod} endDate | |
50 | + ${enquiry_start_date}= Get From Dictionary ${prepared_tender_data.data.enquiryPeriod} startDate | |
51 | + ${enquiry_end_date}= Get From Dictionary ${prepared_tender_data.data.enquiryPeriod} endDate | |
46 | 52 | |
47 | 53 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} |
48 | 54 | Go To ${USERS.users['${username}'].homepage} |
... | ... | @@ -109,7 +115,7 @@ Set datetime |
109 | 115 | ## Get values for item |
110 | 116 | ${items_description}= Get From Dictionary ${ARGUMENTS[0]} description |
111 | 117 | ${quantity}= Get From Dictionary ${ARGUMENTS[0]} quantity |
112 | - ${cpv}= Get From Dictionary ${ARGUMENTS[0].classification} description_ua | |
118 | + ${cpv}= Convert To String Картонки | |
113 | 119 | ${dkpp_desc}= Get From Dictionary ${ARGUMENTS[0].additionalClassifications[0]} description |
114 | 120 | ${dkpp_id}= Get From Dictionary ${ARGUMENTS[0].additionalClassifications[0]} id |
115 | 121 | ${unit}= Get From Dictionary ${ARGUMENTS[0].unit} name |
... | ... | @@ -159,227 +165,22 @@ Set datetime |
159 | 165 | \ Click Element xpath=//a[@class="icon-black plus-black remove-field ng-scope"] |
160 | 166 | \ Додати придмет ${items[${INDEX}]} ${INDEX} |
161 | 167 | |
162 | - | |
163 | - | |
164 | - | |
165 | - | |
166 | - | |
167 | - | |
168 | -#### Not reworked for Newtend #### | |
169 | - | |
170 | -Oтримати internal id по UAid | |
171 | - [Arguments] @{ARGUMENTS} | |
172 | - [Documentation] | |
173 | - ... ${ARGUMENTS[0]} == username | |
174 | - ... ${ARGUMENTS[1]} == tenderid | |
175 | - etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
176 | - ${current_location}= Get Location | |
177 | - ${tender_id}= Fetch From Right ${current_location} / | |
178 | -### harcode Idis bacause issues on the E-tender side, to remove, 1 line: | |
179 | - ${tender_id}= Convert To String 94ffe180019d459787aafe290cd300e2 | |
180 | - log ${internal_id} | |
181 | - [return] ${internal_id} | |
182 | - | |
183 | 168 | Пошук тендера по ідентифікатору |
184 | 169 | [Arguments] @{ARGUMENTS} |
185 | 170 | [Documentation] |
186 | 171 | ... ${ARGUMENTS[0]} == username |
187 | - ... ${ARGUMENTS[1]} == tenderId | |
188 | - | |
172 | + ... ${ARGUMENTS[1]} == ${TENDER_UAID} | |
189 | 173 | Switch browser ${ARGUMENTS[0]} |
190 | - Go to ${BROKERS['${USERS.users['${username}'].broker}'].url} | |
191 | - Wait Until Page Contains Список закупівель 10 | |
192 | - sleep 1 | |
193 | - Input Text jquery=input[ng-change='search()'] ${ARGUMENTS[1]} | |
194 | - Click Link jquery=a[ng-click='search()'] | |
195 | - sleep 2 | |
196 | - Click Link jquery=a[href^="#/tenderDetailes"] | |
197 | - Wait Until Page Contains ${ARGUMENTS[1]} 10 | |
198 | - sleep 1 | |
199 | - Capture Page Screenshot | |
200 | - | |
201 | -обновити сторінку з тендером | |
202 | - [Arguments] @{ARGUMENTS} | |
203 | - [Documentation] | |
204 | - ... ${ARGUMENTS[0]} == username | |
205 | - ... ${ARGUMENTS[1]} == tenderId | |
206 | - ... ${ARGUMENTS[2]} == id | |
207 | - ${current_location}= Get Location | |
208 | - Run keyword if '${BROKERS['${USERS.users['${username}'].broker}'].url}/#/tenderDetailes/${ARGUMENTS[2]}'=='${current_location}' Reload Page | |
209 | - Run keyword unless '${BROKERS['${USERS.users['${username}'].broker}'].url}/#/tenderDetailes/${ARGUMENTS[2]}'=='${current_location}' Пошук тендера по ідентифікатору @{ARGUMENTS} | |
210 | - Wait Until Page Contains ${ARGUMENTS[1]} 10 | |
211 | - sleep 1 | |
212 | - | |
213 | -отримати інформацію із тендера | |
214 | - [Arguments] @{ARGUMENTS} | |
215 | - [Documentation] | |
216 | - ... ${ARGUMENTS[0]} == username | |
217 | - ... ${ARGUMENTS[1]} == fieldname | |
218 | - Switch browser ${ARGUMENTS[0]} | |
219 | - ${return_value}= run keyword отримати інформацію про ${ARGUMENTS[1]} | |
220 | - [return] ${return_value} | |
221 | - | |
222 | -Відмітити на сторінці поле з тендера | |
223 | - [Arguments] ${fieldname} ${locator} | |
224 | - ${last_note_id}= Add pointy note ${locator} Found ${fieldname} width=200 position=bottom | |
225 | - Align elements horizontally ${locator} ${last_note_id} | |
226 | - sleep 1 | |
227 | - Remove element ${last_note_id} | |
228 | - | |
229 | -Отримати тест із поля і показати на сторінці | |
230 | - [Arguments] ${fieldname} | |
231 | - sleep 3 | |
232 | -# відмітити на сторінці поле з тендера ${fieldname} ${locator.${fieldname}} | |
233 | - ${return_value}= Get Text ${locator.${fieldname}} | |
234 | - [return] ${return_value} | |
235 | - | |
236 | -отримати інформацію про tenderId | |
237 | - ${return_value}= Отримати тест із поля і показати на сторінці tenderId | |
238 | - [return] ${return_value.split(' ')[1]} | |
239 | - | |
240 | -отримати інформацію про title | |
241 | - ${return_value}= Отримати тест із поля і показати на сторінці title | |
242 | - [return] ${return_value} | |
243 | - | |
244 | -отримати інформацію про description | |
245 | - ${return_value}= Отримати тест із поля і показати на сторінці description | |
246 | - [return] ${return_value} | |
247 | - | |
248 | -отримати інформацію про minimalStep.amount | |
249 | - ${return_value}= Отримати тест із поля і показати на сторінці minimalStep.amount | |
250 | - ${return_value}= Convert To Number ${return_value.split(' ')[0]} | |
251 | - [return] ${return_value} | |
252 | - | |
253 | -отримати інформацію про procuringEntity.name | |
254 | - ${return_value}= Отримати тест із поля і показати на сторінці procuringEntity.name | |
255 | - [return] ${return_value} | |
256 | - | |
257 | - | |
258 | -отримати інформацію про value.amount | |
259 | - ${return_value}= Отримати тест із поля і показати на сторінці value.amount | |
260 | - ${return_value}= Evaluate "".join("${return_value}".split(' ')[:-3]) | |
261 | - ${return_value}= Convert To Number ${return_value} | |
262 | - [return] ${return_value} | |
263 | - | |
264 | -отримати інформацію про tenderPeriod.startDate | |
265 | - ${return_value}= Отримати тест із поля і показати на сторінці tenderPeriod.startDate | |
266 | - [return] ${return_value} | |
267 | - | |
268 | -отримати інформацію про tenderPeriod.endDate | |
269 | - ${return_value}= Отримати тест із поля і показати на сторінці tenderPeriod.endDate | |
270 | - [return] ${return_value} | |
271 | - | |
272 | -отримати інформацію про enquiryPeriod.startDate | |
273 | - ${return_value}= Отримати тест із поля і показати на сторінці enquiryPeriod.startDate | |
274 | - [return] ${return_value} | |
275 | - | |
276 | -отримати інформацію про enquiryPeriod.endDate | |
277 | - ${return_value}= Отримати тест із поля і показати на сторінці enquiryPeriod.endDate | |
278 | - [return] ${return_value} | |
279 | - | |
280 | - | |
281 | -отримати інформацію про items[${item_id}].description | |
282 | - відмітити на сторінці поле з тендера items[${item_id}].description jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Детальний опис предмету закупівлі:")>:eq(1)> | |
283 | - ${return_value}= Get Text jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Детальний опис предмету закупівлі:")>:eq(1)> | |
284 | - [return] ${return_value} | |
285 | - | |
286 | -отримати інформацію про items[${item_id}].quantity | |
287 | - відмітити на сторінці поле з тендера items[${item_id}].quantity jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Кількість:")>:eq(1)> | |
288 | - ${return_value}= Get Text jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Кількість:")>:eq(1)> | |
289 | - ${return_value}= Convert To Number ${return_value} | |
290 | - [return] ${return_value} | |
291 | - | |
292 | -отримати інформацію про items[${item_id}].classification.id | |
293 | - відмітити на сторінці поле з тендера items[0].classification.id jquery=tender-subject-info>div.row:contains("Класифікатор CPV:")>:eq(1)> | |
294 | - ${return_value}= Get Text jquery=tender-subject-info>div.row:contains("Класифікатор CPV:")>:eq(1)> | |
295 | - [return] ${return_value.split(' ')[0]} | |
296 | - | |
297 | -отримати інформацію про items[${item_id}].classification.scheme | |
298 | - відмітити на сторінці поле з тендера items[0].classification.id jquery=tender-subject-info>div.row:contains("CPV")>:eq(1)> | |
299 | - ${return_value}= Get Text jquery=tender-subject-info>div.row:contains("CPV")>:eq(1)> | |
300 | - [return] ${return_value.split(' ')[0]} | |
301 | - | |
302 | -отримати інформацію про items[${item_id}].classification.description | |
303 | - відмітити на сторінці поле з тендера classification.description jquery=tender-subject-info>div.row:contains("Класифікатор CPV:")>:eq(1)> | |
304 | - ${return_value}= Get Text jquery=tender-subject-info>div.row:contains("Класифікатор CPV:")>:eq(1)> | |
305 | - ${return_value}= catenate @{return_value.split(' ')[1:]} | |
306 | - [return] ${return_value} | |
307 | - | |
308 | -отримати інформацію про items[${item_id}].deliveryAddress | |
309 | - ${return_value}= Отримати тест із поля і показати на сторінці items[${item_id}].deliveryAddress | |
310 | - [return] ${return_value} | |
311 | - | |
312 | -отримати інформацію про items[${item_id}].deliveryDate | |
313 | - ${return_value}= Отримати тест із поля і показати на сторінці items[${item_id}].deliveryDate | |
314 | - [return] ${return_value} | |
315 | - | |
316 | -отримати інформацію про questions[${question_id}].title | |
317 | - відмітити на сторінці поле з тендера questions title jquery=tender-questions>div:eq(1)>div.row:contains("Тема:")>:eq(1)> | |
318 | - ${return_value}= Get Text jquery=tender-questions>div:eq(1)>div.row:contains("Тема:")>:eq(1)> | |
319 | - [return] ${return_value} | |
320 | - | |
321 | -отримати інформацію про questions[${question_id}].description | |
322 | - відмітити на сторінці поле з тендера questions description jquery=tender-questions>div:eq(1)>div.row:contains("Питання:")>:eq(1)> | |
323 | - ${return_value}= Get Text jquery=tender-questions>div:eq(1)>div.row:contains("Питання:")>:eq(1)> | |
324 | - [return] ${return_value} | |
325 | - | |
326 | -отримати інформацію про questions[${question_id}].date | |
327 | - відмітити на сторінці поле з тендера question date jquery=tender-questions>div:eq(1)>div.row:contains("Дата:")>:eq(1)> | |
328 | - ${return_value}= Get Text jquery=tender-questions>div:eq(1)>div.row:contains("Дата:")>:eq(1)> | |
329 | - [return] ${return_value} | |
330 | - | |
331 | -отримати інформацію про questions[${question_id}].answer | |
332 | - відмітити на сторінці поле з тендера question answer jquery=tender-questions>div:eq(1)>div:last> | |
333 | - ${return_value}= Get Text jquery=tender-questions>div:eq(1)>div:last> | |
334 | - [return] ${return_value} | |
335 | - | |
336 | -Подати цінову пропозицію | |
337 | - [Arguments] @{ARGUMENTS} | |
338 | - [Documentation] | |
339 | - ... ${ARGUMENTS[0]} == username | |
340 | - ... ${ARGUMENTS[1]} == ${INTERNAL_TENDER_ID} | |
341 | - ... ${ARGUMENTS[2]} == test_bid_data | |
342 | - | |
343 | - ${bid}= Get From Dictionary ${ARGUMENTS[2].data.value} amount | |
344 | - etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
345 | - Wait Until Page Contains Інформація про процедуру закупівлі 100 | |
346 | - Wait Until Page Contains Element id=amount 10 | |
347 | - Input text id=amount ${bid} | |
348 | - Click Element xpath=//button[contains(@class, 'btn btn-success')][./text()='Реєстрація пропозиції'] | |
349 | - | |
350 | -Задати питання | |
351 | - [Arguments] @{ARGUMENTS} | |
352 | - [Documentation] | |
353 | - ... ${ARGUMENTS[0]} = username | |
354 | - ... ${ARGUMENTS[1]} = ${INTERNAL_TENDER_ID} | |
355 | - ... ${ARGUMENTS[2]} = question_data | |
356 | - | |
357 | - ${title}= Get From Dictionary ${ARGUMENTS[2].data} title | |
358 | - ${description}= Get From Dictionary ${ARGUMENTS[2].data} description | |
359 | - | |
360 | - Selenium2Library.Switch Browser ${ARGUMENTS[0]} | |
361 | - etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID} | |
362 | - | |
363 | - Wait Until Page Contains Element jquery=a[href^="#/addQuestion/"] 100 | |
364 | - Click Element jquery=a[href^="#/addQuestion/"] | |
365 | - Wait Until Page Contains Element id=title | |
366 | - Input text id=title ${title} | |
367 | - Input text id=description ${description} | |
368 | - Click Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit'] | |
369 | - | |
370 | -Відповісти на питання | |
371 | - [Arguments] @{ARGUMENTS} | |
372 | - [Documentation] | |
373 | - ... ${ARGUMENTS[0]} = username | |
374 | - ... ${ARGUMENTS[1]} = ${INTERNAL_TENDER_ID} | |
375 | - ... ${ARGUMENTS[2]} = 0 | |
376 | - ... ${ARGUMENTS[3]} = answer_data | |
377 | - | |
378 | - ${answer}= Get From Dictionary ${ARGUMENTS[3].data} answer | |
379 | - | |
380 | - Selenium2Library.Switch Browser ${ARGUMENTS[0]} | |
381 | - etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID} | |
382 | - | |
383 | - Click Element xpath=//div[div/pre[1]]/div[1] | |
384 | - Input text xpath=//div[textarea]/textarea ${answer} | |
385 | - Click Element xpath=//div[textarea]/span/button[1] | |
174 | + Go to ${USERS.users['${ARGUMENTS[0]}'].homepage} | |
175 | + Wait Until Page Contains Element xpath=//div[@class="search-field"]/input 20 | |
176 | +# ${ARGUMENTS[1]}= Convert To String UA-2015-06-08-000023 | |
177 | + Input text xpath=//div[@class="search-field"]/input ${ARGUMENTS[1]} | |
178 | + : FOR ${INDEX} IN RANGE 1 30 | |
179 | + \ Log To Console . no_newline=true | |
180 | +# \ sleep 1 | |
181 | + \ ${count}= Get Matching Xpath Count xpath=//a[@class="row tender-info ng-scope"] | |
182 | + \ Exit For Loop If '${count}' == '1' | |
183 | + Click Element xpath=//a[@class="row tender-info ng-scope"] | |
184 | + Wait Until Page Contains Element xpath=//a[@class="ng-binding ng-scope"] 30 | |
185 | + ${fould_title}= Get Text xpath=//a[@class="ng-binding ng-scope"] | |
186 | + Should Be Equal ${fould_title} ${ARGUMENTS[1]} | |
\ No newline at end of file | ... | ... |
... | ... | @@ -13,7 +13,7 @@ ${question_id} 0 |
13 | 13 | ... ${ARGUMENTS[0]} == username |
14 | 14 | ... ${ARGUMENTS[1]} == tenderid |
15 | 15 | log many @{ARGUMENTS} |
16 | - ${tenders}= get_internal_id ${USERS.users['${ARGUMENTS[0]}'].client.get_tenders} ${USERS.users['${ARGUMENTS[0]}'].creation_date} | |
16 | + ${tenders}= get_internal_id ${USERS.users['${ARGUMENTS[0]}'].client.get_tenders} ${USERS.users['${ARGUMENTS[0]}'].creation_date} | |
17 | 17 | :FOR ${tender} IN @{tenders} |
18 | 18 | \ log ${tender} |
19 | 19 | \ ${internal_id}= Run Keyword And Return If '${tender.tenderID}' == '${ARGUMENTS[1]}' Get Variable Value ${tender.id} |
... | ... | @@ -26,16 +26,16 @@ ${question_id} 0 |
26 | 26 | Підготувати клієнт для користувача |
27 | 27 | [Arguments] @{ARGUMENTS} |
28 | 28 | [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо |
29 | - ${api_wrapper}= prepare_api_wrapper ${USERS.users['${ARGUMENTS[0]}'].api_key} ${API_HOST_URL} ${api_version} | |
29 | + ${api_wrapper}= prepare_api_wrapper ${USERS.users['${ARGUMENTS[0]}'].api_key} ${API_HOST_URL} ${api_version} | |
30 | 30 | ${creation_date} = get_date |
31 | 31 | Set To Dictionary ${USERS.users['${ARGUMENTS[0]}']} creation_date ${creation_date} |
32 | 32 | Set To Dictionary ${USERS.users['${ARGUMENTS[0]}']} client ${api_wrapper} |
33 | 33 | Log Variables |
34 | - | |
35 | -Підготувати дані для оголошення тендера | |
34 | + | |
35 | +Підготувати дані для оголошення тендера | |
36 | 36 | ${INITIAL_TENDER_DATA}= prepare_test_tender_data |
37 | 37 | [return] ${INITIAL_TENDER_DATA} |
38 | - | |
38 | + | |
39 | 39 | Створити тендер |
40 | 40 | [Arguments] @{ARGUMENTS} |
41 | 41 | ${TENDER_DATA}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} create_tender ${ARGUMENTS[1]} |
... | ... | @@ -61,7 +61,7 @@ ${question_id} 0 |
61 | 61 | Log tender_id: ${TENDER_DATA.data.id} |
62 | 62 | Set Global Variable ${TENDER_DATA} |
63 | 63 | [return] ${TENDER_DATA} |
64 | - | |
64 | + | |
65 | 65 | Пошук тендера по ідентифікатору |
66 | 66 | [Arguments] @{ARGUMENTS} |
67 | 67 | [Documentation] |
... | ... | @@ -191,7 +191,7 @@ ${question_id} 0 |
191 | 191 | ${complaint}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} _create_tender_resource_item ${tender} ${ARGUMENTS[2]} complaints |
192 | 192 | Log object data ${complaint} complaint |
193 | 193 | |
194 | -порівняти скаргу | |
194 | +порівняти скаргу | |
195 | 195 | [Documentation] |
196 | 196 | ... ${ARGUMENTS[0]} == username |
197 | 197 | ... ${ARGUMENTS[1]} == tender_uid |
... | ... | @@ -199,10 +199,10 @@ ${question_id} 0 |
199 | 199 | [Arguments] @{ARGUMENTS} |
200 | 200 | ${internalid}= отримати internal id по UAid ${ARGUMENTS[0]} ${ARGUMENTS[1]} |
201 | 201 | ${tender}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} get_tender ${internalid} |
202 | - ${complaint}= Get Variable Value ${tender.data.complaints[0]} | |
202 | + ${complaint}= Get Variable Value ${tender.data.complaints[0]} | |
203 | 203 | log ${complaint} |
204 | 204 | log ${ARGUMENTS[2]} |
205 | - #TODO: COMPARE | |
205 | + #TODO: COMPARE | |
206 | 206 | #Dictionary Should Contain Sub Dictionary ${complaint} ${ARGUMENTS[2].data} |
207 | 207 | #:FOR ${element} IN ${ARGUMENTS[2].data} |
208 | 208 | #\ log ${element} |
... | ... | @@ -315,9 +315,9 @@ ${question_id} 0 |
315 | 315 | [return] ${uploaded_file} |
316 | 316 | |
317 | 317 | |
318 | - | |
319 | 318 | |
320 | -Завантажити документ | |
319 | + | |
320 | +Завантажити документ | |
321 | 321 | [Documentation] |
322 | 322 | ... ${ARGUMENTS[0]} == username |
323 | 323 | ... ${ARGUMENTS[1]} == filepath |
... | ... | @@ -332,7 +332,7 @@ ${question_id} 0 |
332 | 332 | ${reply}= Call Method ${USERS.users['${ARGUMENTS[0]}'].client} upload_document ${tender} ${ARGUMENTS[1]} |
333 | 333 | Log object data ${reply} reply |
334 | 334 | [return] ${reply} |
335 | - | |
335 | + | |
336 | 336 | Отримати пропозиції |
337 | 337 | [Documentation] |
338 | 338 | ... ${ARGUMENTS[0]} == username | ... | ... |
... | ... | @@ -4,11 +4,10 @@ Library String |
4 | 4 | Library DateTime |
5 | 5 | |
6 | 6 | *** Variables *** |
7 | -${file_path} local_path_to_file("TestDocument.docx") | |
8 | -# ${file_path} /home/vbilos/openprocurement.robottests.buildout/Document.docx | |
9 | 7 | ${mail} test@mail.com |
10 | 8 | ${telephone} +380976535447 |
11 | 9 | |
10 | + | |
12 | 11 | *** Keywords *** |
13 | 12 | Підготувати клієнт для користувача |
14 | 13 | [Arguments] @{ARGUMENTS} |
... | ... | @@ -23,6 +22,7 @@ ${telephone} +380976535447 |
23 | 22 | Click Element id=mForm:j_idt54 |
24 | 23 | Run Keyword And Ignore Error Wait Until Page Contains Element id=mForm:email 10 |
25 | 24 | Input text id=mForm:email ${USERS.users['${username}'].login} |
25 | + Sleep 2 | |
26 | 26 | Input text id=mForm:pwd ${USERS.users['${username}'].password} |
27 | 27 | Click Button id=mForm:login |
28 | 28 | |
... | ... | @@ -31,23 +31,24 @@ ${telephone} +380976535447 |
31 | 31 | [Documentation] |
32 | 32 | ... ${ARGUMENTS[0]} == username |
33 | 33 | ... ${ARGUMENTS[1]} == tender_data |
34 | - ${tender_data}= Add_time_for_GUI_FrontEnds ${ARGUMENTS[1]} | |
35 | - ${items}= Get From Dictionary ${tender_data.data} items | |
36 | - ${title}= Get From Dictionary ${tender_data.data} title | |
37 | - ${description}= Get From Dictionary ${tender_data.data} description | |
38 | - ${budget}= Get From Dictionary ${tender_data.data.value} amount | |
39 | - ${step_rate}= Get From Dictionary ${tender_data.data.minimalStep} amount | |
40 | - ${countryName}= Get From Dictionary ${tender_data.data.procuringEntity.address} countryName | |
34 | + ${file_path}= local_path_to_file TestDocument.docx | |
35 | + ${prepared_tender_data}= Add_data_for_GUI_FrontEnds ${ARGUMENTS[1]} | |
36 | + ${items}= Get From Dictionary ${prepared_tender_data.data} items | |
37 | + ${title}= Get From Dictionary ${prepared_tender_data.data} title | |
38 | + ${description}= Get From Dictionary ${prepared_tender_data.data} description | |
39 | + ${budget}= Get From Dictionary ${prepared_tender_data.data.value} amount | |
40 | + ${step_rate}= Get From Dictionary ${prepared_tender_data.data.minimalStep} amount | |
41 | + ${countryName}= Get From Dictionary ${prepared_tender_data.data.procuringEntity.address} countryName | |
41 | 42 | ${delivery_end_date}= Get From Dictionary ${items[0].deliveryDate} endDate |
42 | 43 | ${delivery_end_date}= convert_date_to_prom_format ${delivery_end_date} |
43 | - ${cpv}= Get From Dictionary ${items[0].classification} description_ua | |
44 | + ${cpv}= Convert To String "Картонки" | |
44 | 45 | ${cpv_id}= Get From Dictionary ${items[0].classification} id |
45 | 46 | ${cpv_id_1}= Get Substring ${cpv_id} 0 3 |
46 | 47 | ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description |
47 | 48 | ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id |
48 | 49 | ${code}= Get From Dictionary ${items[0].unit} code |
49 | 50 | ${quantity}= Get From Dictionary ${items[0]} quantity |
50 | - ${name}= Get From Dictionary ${tender_data.data.procuringEntity.contactPoint} name | |
51 | + ${name}= Get From Dictionary ${prepared_tender_data.data.procuringEntity.contactPoint} name | |
51 | 52 | |
52 | 53 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} |
53 | 54 | Wait Until Page Contains Element xpath=//*[contains(@class, 'ui-button-text ui-c')][./text()='Нова закупівля'] 10 |
... | ... | @@ -79,9 +80,11 @@ ${telephone} +380976535447 |
79 | 80 | Input text id=mForm:data:rPhone ${telephone} |
80 | 81 | Input text id=mForm:data:rMail ${mail} |
81 | 82 | Choose File id=mForm:data:docFile_input ${file_path} |
83 | + Sleep 2 | |
82 | 84 | Run Keyword if '${mode}' == 'multi' Додати предмет items |
83 | 85 | Click Element id=mForm:bSave |
84 | - Sleep 5 | |
86 | + # More smart wait for id is needed there. | |
87 | + Sleep 25 | |
85 | 88 | ${tender_UAid}= Get Text id=mForm:nBid |
86 | 89 | ${tender_UAid}= Get Substring ${tender_UAid} 19 |
87 | 90 | ${Ids} Convert To String ${tender_UAid} |
... | ... | @@ -149,7 +152,6 @@ Set Multi Ids |
149 | 152 | Wait Until Page Contains Element xpath=//div[@id='mForm:data:cDkpp3_panel']/table/tbody/tr/td[1]/span 10 |
150 | 153 | Click Element xpath=//div[@id='mForm:data:cDkpp3_panel']/table/tbody/tr/td[1]/span |
151 | 154 | |
152 | - | |
153 | 155 | Пошук тендера по ідентифікатору |
154 | 156 | [Arguments] @{ARGUMENTS} |
155 | 157 | [Documentation] | ... | ... |
... | ... | @@ -17,7 +17,7 @@ users: |
17 | 17 | homepage: "http://uat.e-tender.biz/#/profile" |
18 | 18 | login: Misha2 |
19 | 19 | password: Password1 |
20 | - browser: firefox | |
20 | + browser: chrome | |
21 | 21 | position: [0, 0] |
22 | 22 | size: [800, 800] |
23 | 23 | E-tender_Provider1: |
... | ... | @@ -26,7 +26,7 @@ users: |
26 | 26 | homepage: "http://uat.e-tender.biz/#/profile" |
27 | 27 | login: st_org |
28 | 28 | password: 12345678 |
29 | - browser: firefox | |
29 | + browser: chrome | |
30 | 30 | position: [700, 0] |
31 | 31 | size: [700, 800] |
32 | 32 | E-tender_Provider2: |
... | ... | @@ -35,46 +35,22 @@ users: |
35 | 35 | homepage: "http://uat.e-tender.biz/#/profile" |
36 | 36 | login: provider2 |
37 | 37 | password: Qa123456 |
38 | - browser: firefox | |
38 | + browser: chrome | |
39 | 39 | position: [700, 0] |
40 | 40 | size: [640, 450] |
41 | 41 | E-tender_Viewer: |
42 | 42 | broker: E-tender |
43 | 43 | username: E-tendertest |
44 | - browser: firefox | |
45 | - position: [0, 0] | |
46 | - size: [640, 450] | |
47 | - Prom_Owner: | |
48 | - broker: Prom | |
49 | - username: Promtest | |
44 | + homepage: "http://uat.e-tender.biz/#/profile" | |
50 | 45 | browser: chrome |
51 | 46 | position: [0, 0] |
52 | 47 | size: [640, 450] |
53 | - Prom_Viewer: | |
54 | - broker: Prom | |
55 | - username: Promtest | |
56 | - browser: chrome | |
57 | - position: [640, 0] | |
58 | - size: [640, 450] | |
59 | - SmartTender_Viewer: | |
60 | - broker: SmartTender | |
61 | - username: SmartTendertest | |
62 | - browser: chrome | |
63 | - position: [0, 450] | |
64 | - size: [640, 450] | |
65 | - Publicbid_Viewer: | |
66 | - broker: Publicbid | |
67 | - username: Publicbid | |
68 | - browser: chrome | |
69 | - position: [0, 450] | |
70 | - size: [640, 450] | |
71 | 48 | Netcast_Owner: |
72 | 49 | broker: Netcast |
73 | 50 | username: Netcasttest |
74 | 51 | homepage: "http://dz2.byustudio.in.ua" |
75 | 52 | login: ovramet.s@gmail.com |
76 | 53 | password: Password1 |
77 | - #browser: firefox | |
78 | 54 | browser: chrome |
79 | 55 | position: [0, 0] |
80 | 56 | size: [700, 800] |
... | ... | @@ -84,7 +60,6 @@ users: |
84 | 60 | homepage: "http://dz2.byustudio.in.ua" |
85 | 61 | login: halyna.khimka@gmail.com |
86 | 62 | password: JHO5VUp5n |
87 | - #browser: firefox | |
88 | 63 | browser: chrome |
89 | 64 | position: [0, 0] |
90 | 65 | size: [600, 800] |
... | ... | @@ -92,40 +67,65 @@ users: |
92 | 67 | broker: Netcast |
93 | 68 | username: Netcasttest |
94 | 69 | homepage: "http://dz2.byustudio.in.ua" |
95 | - #browser: firefox | |
96 | 70 | browser: chrome |
71 | + #browser: chrome | |
97 | 72 | position: [0, 0] |
98 | 73 | size: [600, 800] |
99 | - Publicbid_Owner: | |
100 | - broker: Publicbid | |
101 | - username: Publicbid | |
102 | - homepage: "https://public-bid.com.ua/test/" | |
103 | - login: yaroslav1boyko@gmail.com | |
104 | - password: Password1 | |
105 | - browser: firefox | |
106 | - position: [0, 0] | |
107 | - size: [740, 550] | |
108 | 74 | Newtend_Owner: |
109 | 75 | broker: Newtend |
110 | 76 | username: Newtendtest |
111 | 77 | homepage: "http://dev23.newtend.com/openprocurement/#/home/page/1" |
112 | 78 | login: openprocurement@mailinator.com |
113 | 79 | password: 123123 |
114 | - browser: firefox | |
80 | + browser: chrome | |
115 | 81 | position: [0, 0] |
116 | - size: [640, 450] | |
117 | - Newtend_Provider2: | |
82 | + size: [1000, 1100] | |
83 | + Newtend_Provider1: | |
118 | 84 | broker: Newtend |
119 | 85 | username: Newtendtest |
120 | 86 | homepage: "http://dev23.newtend.com/openprocurement/tenders" |
121 | 87 | login: openprocboss@mailinator.com |
122 | 88 | password: 123123 |
123 | - browser: firefox | |
89 | + browser: chrome | |
124 | 90 | position: [700, 0] |
125 | - size: [640, 450] | |
91 | + size: [800, 700] | |
126 | 92 | Newtend_Viewer: |
127 | 93 | broker: Newtend |
128 | 94 | username: Newtendtest |
129 | - browser: firefox | |
95 | + homepage: "http://dev23.newtend.com/openprocurement/tenders" | |
96 | + browser: chrome | |
97 | + position: [0, 0] | |
98 | + size: [640, 450] | |
99 | + Prom_Owner: | |
100 | + broker: Prom | |
101 | + username: Promtest | |
102 | + browser: chrome | |
130 | 103 | position: [0, 0] |
131 | - size: [640, 450] | |
\ No newline at end of file | ||
104 | + size: [640, 450] | |
105 | + Prom_Viewer: | |
106 | + broker: Prom | |
107 | + username: Promtest | |
108 | + browser: chrome | |
109 | + position: [640, 0] | |
110 | + size: [640, 450] | |
111 | + Publicbid_Owner: | |
112 | + broker: Publicbid | |
113 | + username: Publicbid | |
114 | + homepage: "https://public-bid.com.ua/test/" | |
115 | + login: yaroslav1boyko@gmail.com | |
116 | + password: Password1 | |
117 | + browser: chrome | |
118 | + position: [0, 0] | |
119 | + size: [740, 550] | |
120 | + Publicbid_Viewer: | |
121 | + broker: Publicbid | |
122 | + username: Publicbid | |
123 | + browser: chrome | |
124 | + position: [0, 450] | |
125 | + size: [640, 450] | |
126 | + SmartTender_Viewer: | |
127 | + broker: SmartTender | |
128 | + username: SmartTendertest | |
129 | + browser: chrome | |
130 | + position: [0, 450] | |
131 | + size: [640, 450] | ... | ... |
... | ... | @@ -73,8 +73,7 @@ def test_tender_data(period_interval=2): |
73 | 73 | "classification": { |
74 | 74 | "scheme": u"CPV", |
75 | 75 | "id": u"44617100-9", |
76 | - "description": u"Cartons", | |
77 | - "description_ua": u"Картонки", | |
76 | + "description": u"Cartons" | |
78 | 77 | }, |
79 | 78 | "additionalClassifications": [ |
80 | 79 | { |
... | ... | @@ -243,8 +242,7 @@ def test_tender_data_multiple_lots(period_interval=2): |
243 | 242 | "classification": { |
244 | 243 | "scheme": u"CPV", |
245 | 244 | "id": u"44617100-9", |
246 | - "description": u"Cartons", | |
247 | - "description_ua": u"Картонки", | |
245 | + "description": u"Cartons" | |
248 | 246 | }, |
249 | 247 | "additionalClassifications": [ |
250 | 248 | { |
... | ... | @@ -278,8 +276,7 @@ def test_tender_data_multiple_lots(period_interval=2): |
278 | 276 | "classification": { |
279 | 277 | "scheme": u"CPV", |
280 | 278 | "id": u"44617100-9", |
281 | - "description": u"Cartons", | |
282 | - "description_ua": u"Картонки" | |
279 | + "description": u"Cartons" | |
283 | 280 | }, |
284 | 281 | "additionalClassifications": [ |
285 | 282 | { |
... | ... | @@ -313,8 +310,7 @@ def test_tender_data_multiple_lots(period_interval=2): |
313 | 310 | "classification": { |
314 | 311 | "scheme": u"CPV", |
315 | 312 | "id": u"44617100-9", |
316 | - "description": u"Cartons", | |
317 | - "description_ua": u"Картонки" | |
313 | + "description": u"Cartons" | |
318 | 314 | }, |
319 | 315 | "additionalClassifications": [ |
320 | 316 | { |
... | ... | @@ -348,8 +344,7 @@ def test_tender_data_multiple_lots(period_interval=2): |
348 | 344 | "classification": { |
349 | 345 | "scheme": u"CPV", |
350 | 346 | "id": u"44617100-9", |
351 | - "description": u"Cartons", | |
352 | - "description_ua": u"Картонки" | |
347 | + "description": u"Cartons" | |
353 | 348 | }, |
354 | 349 | "additionalClassifications": [ |
355 | 350 | { | ... | ... |
... | ... | @@ -27,21 +27,6 @@ TIMEZONE = timezone('Europe/Kiev') |
27 | 27 | def get_date(): |
28 | 28 | return datetime.now().isoformat() |
29 | 29 | |
30 | -def convert_date_to_slash_format(isodate): | |
31 | - iso_dt=parse_date(isodate) | |
32 | - date_string = iso_dt.strftime("%d/%m/%Y") | |
33 | - return date_string | |
34 | - | |
35 | -def convert_date_to_etender_format(isodate): | |
36 | - iso_dt=parse_date(isodate) | |
37 | - date_string = iso_dt.strftime("%d-%m-%Y") | |
38 | - return date_string | |
39 | - | |
40 | -def convert_time_to_etender_format(isodate): | |
41 | - iso_dt=parse_date(isodate) | |
42 | - time_string = iso_dt.strftime("%H:%M") | |
43 | - return time_string | |
44 | - | |
45 | 30 | def change_state(arguments): |
46 | 31 | try: |
47 | 32 | if arguments[0] == "shouldfail": |
... | ... | @@ -96,7 +81,6 @@ def load_initial_data_from(file_name): |
96 | 81 | elif file_name.endswith(".yaml"): |
97 | 82 | return fromYAML(file_obj) |
98 | 83 | |
99 | - | |
100 | 84 | def prepare_test_tender_data(period_interval=2, mode='single'): |
101 | 85 | if mode == 'single': |
102 | 86 | return munchify({'data': test_tender_data(period_interval=period_interval)}) |
... | ... | @@ -104,21 +88,16 @@ def prepare_test_tender_data(period_interval=2, mode='single'): |
104 | 88 | return munchify({'data': test_tender_data_multiple_lots(period_interval=period_interval)}) |
105 | 89 | raise ValueError('A very specific bad thing happened') |
106 | 90 | |
107 | - | |
108 | 91 | def run_keyword_and_ignore_keyword_definations(name, *args): |
109 | 92 | """Runs the given keyword with given arguments and returns the status as a Boolean value. |
110 | - | |
111 | 93 | This keyword returns `True` if the keyword that is executed succeeds and |
112 | 94 | `False` if it fails. This is useful, for example, in combination with |
113 | 95 | `Run Keyword If`. If you are interested in the error message or return |
114 | 96 | value, use `Run Keyword And Ignore Error` instead. |
115 | - | |
116 | 97 | The keyword name and arguments work as in `Run Keyword`. |
117 | - | |
118 | 98 | Example: |
119 | 99 | | ${passed} = | `Run Keyword And Return Status` | Keyword | args | |
120 | 100 | | `Run Keyword If` | ${passed} | Another keyword | |
121 | - | |
122 | 101 | New in Robot Framework 2.7.6. |
123 | 102 | """ |
124 | 103 | try: |
... | ... | @@ -128,7 +107,6 @@ def run_keyword_and_ignore_keyword_definations(name, *args): |
128 | 107 | return "FAIL", "" |
129 | 108 | return status, _ |
130 | 109 | |
131 | - | |
132 | 110 | def set_tender_periods(tender): |
133 | 111 | now = datetime.now() |
134 | 112 | tender.data.enquiryPeriod.endDate = (now + timedelta(minutes=2)).isoformat() |
... | ... | @@ -136,17 +114,14 @@ def set_tender_periods(tender): |
136 | 114 | tender.data.tenderPeriod.endDate = (now + timedelta(minutes=4)).isoformat() |
137 | 115 | return tender |
138 | 116 | |
139 | - | |
140 | 117 | def set_access_key(tender, access_token): |
141 | 118 | tender.access = munchify({"token": access_token}) |
142 | 119 | return tender |
143 | 120 | |
144 | - | |
145 | 121 | def set_to_object(obj, attribute, value): |
146 | 122 | xpathset(obj, attribute.replace('.', '/'), value) |
147 | 123 | return obj |
148 | 124 | |
149 | - | |
150 | 125 | def get_from_object(obj, attribute): |
151 | 126 | """Gets data from a dictionary using a dotted accessor-string""" |
152 | 127 | jsonpath_expr = parse_path(attribute) |
... | ... | @@ -155,7 +130,6 @@ def get_from_object(obj, attribute): |
155 | 130 | return return_list[0] |
156 | 131 | return None |
157 | 132 | |
158 | - | |
159 | 133 | def wait_to_date(date_stamp): |
160 | 134 | date = parse(date_stamp) |
161 | 135 | LOGGER.log_message(Message("date: {}".format(date.isoformat()), "INFO")) |
... | ... | @@ -167,6 +141,21 @@ def wait_to_date(date_stamp): |
167 | 141 | return 0 |
168 | 142 | return wait_seconds |
169 | 143 | |
144 | +def convert_date_to_slash_format(isodate): | |
145 | + iso_dt=parse_date(isodate) | |
146 | + date_string = iso_dt.strftime("%d/%m/%Y") | |
147 | + return date_string | |
148 | + | |
149 | +def convert_date_to_etender_format(isodate): | |
150 | + iso_dt=parse_date(isodate) | |
151 | + date_string = iso_dt.strftime("%d-%m-%Y") | |
152 | + return date_string | |
153 | + | |
154 | +def convert_time_to_etender_format(isodate): | |
155 | + iso_dt=parse_date(isodate) | |
156 | + time_string = iso_dt.strftime("%H:%M") | |
157 | + return time_string | |
158 | + | |
170 | 159 | def newtend_date_picker_index(isodate): |
171 | 160 | now = datetime.today() |
172 | 161 | date_str = '01' + str(now.month) + str(now.year) |
... | ... | @@ -179,15 +168,15 @@ def newtend_date_picker_index(isodate): |
179 | 168 | mod = calendar.monthrange(now.year, now.month)[1] + mod |
180 | 169 | return mod + iso_dt.day |
181 | 170 | |
182 | -def Add_time_for_GUI_FrontEnds(INITIAL_TENDER_DATA): | |
171 | +def Add_data_for_GUI_FrontEnds(INITIAL_TENDER_DATA): | |
183 | 172 | now = datetime.now() |
184 | 173 | INITIAL_TENDER_DATA.data.enquiryPeriod['startDate'] = (now + timedelta(minutes=2)).isoformat() |
185 | 174 | INITIAL_TENDER_DATA.data.enquiryPeriod['endDate'] = (now + timedelta(minutes=3)).isoformat() |
186 | 175 | INITIAL_TENDER_DATA.data.tenderPeriod['startDate'] = (now + timedelta(minutes=4)).isoformat() |
187 | 176 | INITIAL_TENDER_DATA.data.tenderPeriod['endDate'] = (now + timedelta(minutes=5)).isoformat() |
188 | 177 | return INITIAL_TENDER_DATA |
189 | - | |
190 | -def local_path_to_file( file_name ): | |
191 | - path = os.getcwd() | |
192 | - path = path.split("brokers", 1)[0] + "documents/" + file_name | |
193 | - return path | |
\ No newline at end of file | ||
178 | + | |
179 | +def local_path_to_file(file_name): | |
180 | + path = os.getcwd() | |
181 | + path = path.split("brokers", 1)[0] + "/src/op_robot_tests/op_robot_tests/tests_files/documents/" + file_name | |
182 | + return path | ... | ... |
... | ... | @@ -387,7 +387,6 @@ ${question_id} 0 |
387 | 387 | ${bid_doc_upload_fail}= Викликати для учасника ${provider1} Завантажити документ в ставку shouldfail ${filepath} ${TENDER['TENDER_UAID']} |
388 | 388 | Set To Dictionary ${USERS.users['${provider1}'].bidresponces} bid_doc_upload_fail ${bid_doc_upload_fail} |
389 | 389 | |
390 | - | |
391 | 390 | Неможливість змінити існуючу документацію цінової пропозиції після закінчення прийому пропозицій |
392 | 391 | [Tags] ${USERS.users['${provider1}'].broker}: |
393 | 392 | ${filepath}= create_fake_doc |
... | ... | @@ -396,9 +395,8 @@ ${question_id} 0 |
396 | 395 | ${bid_doc_modified_failed}= Викликати для учасника ${provider1} Змінити документ в ставці shouldfail ${filepath} ${bidid} ${docid} |
397 | 396 | Set To Dictionary ${USERS.users['${provider}'].bidresponces} bid_doc_modified_failed ${bid_doc_modified_failed} |
398 | 397 | |
399 | - | |
400 | 398 | Вичитати цінову пропозицію |
401 | -# sleep 120 | |
399 | + #sleep 120 | |
402 | 400 | [Tags] ${USERS.users['${provider1}'].broker}: Можливість подати цінову пропозицію |
403 | 401 | ${bidid}= Get Variable Value ${USERS.users['${provider1}'].bidresponces['resp'].data.id} |
404 | 402 | ${token}= Get Variable Value ${USERS.users['${provider1}'].bidresponces['resp'].access.token} | ... | ... |
Please
register
or
login
to post a comment