Showing
7 changed files
with
497 additions
and
92 deletions
@@ -17,31 +17,166 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai | @@ -17,31 +17,166 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai | ||
17 | 17 | ||
18 | *** Keywords *** | 18 | *** Keywords *** |
19 | Підготувати клієнт для користувача | 19 | Підготувати клієнт для користувача |
20 | - [Arguments] ${username} | 20 | + [Arguments] @{ARGUMENTS} |
21 | [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо | 21 | [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо |
22 | - Open Browser ${BROKERS['${USERS.users['${username}'].broker}'].url} ${USERS.users['${username}'].browser} alias=${username} | ||
23 | - Set Window Position @{USERS.users['${username}'].position} | ||
24 | - Set Window Size @{USERS.users['${username}'].size} | ||
25 | - Log Variables | 22 | + ... ${ARGUMENTS[0]} == username |
23 | + Open Browser ${USERS.users['${ARGUMENTS[0]}'].homepage} ${USERS.users['${username}'].browser} alias=${ARGUMENTS[0]} | ||
24 | + Set Window Size @{USERS.users['${ARGUMENTS[0]}'].size} | ||
25 | + Set Window Position @{USERS.users['${ARGUMENTS[0]}'].position} | ||
26 | + | ||
27 | +# login | ||
28 | + Wait Until Page Contains Element id=inputUsername 100 | ||
29 | + Input text id=inputUsername ${USERS.users['${username}'].login} | ||
30 | + Wait Until Page Contains Element id=inputPassword 100 | ||
31 | + Input text id=inputPassword ${USERS.users['${username}'].password} | ||
32 | + Click Button id=btn_submit | ||
33 | + | ||
34 | +Створити тендер | ||
35 | + [Arguments] @{ARGUMENTS} | ||
36 | + [Documentation] | ||
37 | + ... ${ARGUMENTS[0]} == username | ||
38 | + ... ${ARGUMENTS[1]} == tender_data | ||
39 | + | ||
40 | + ${items}= Get From Dictionary ${ARGUMENTS[1].data} items | ||
41 | + ${title}= Get From Dictionary ${ARGUMENTS[1].data} title | ||
42 | + ${description}= Get From Dictionary ${ARGUMENTS[1].data} description | ||
43 | + ${budget}= Get From Dictionary ${ARGUMENTS[1].data.value} amount | ||
44 | + ${step_rate}= Get From Dictionary ${ARGUMENTS[1].data.minimalStep} amount | ||
45 | + ${items_description}= Get From Dictionary ${ARGUMENTS[1].data} description | ||
46 | + ${quantity}= Get From Dictionary ${items[0]} quantity | ||
47 | + ${cpv}= Get From Dictionary ${items[0].classification} id | ||
48 | + ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description | ||
49 | + ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id | ||
50 | + ${unit}= Get From Dictionary ${items[0].unit} name | ||
51 | + ${start_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} startDate | ||
52 | + ${start_date}= convert_date_to_etender_format ${start_date} | ||
53 | + ${start_time}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} startDate | ||
54 | + ${start_time}= convert_time_to_etender_format ${start_time} | ||
55 | + ${end_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate | ||
56 | + ${end_date}= convert_date_to_etender_format ${end_date} | ||
57 | + ${end_time}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate | ||
58 | + ${end_time}= convert_time_to_etender_format ${end_time} | ||
59 | + ${enquiry_end_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate | ||
60 | + ${enquiry_end_date}= convert_date_to_etender_format ${enquiry_end_date} | ||
61 | + ${enquiry_end_time}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate | ||
62 | + ${enquiry_end_time}= convert_time_to_etender_format ${enquiry_end_time} | ||
63 | + | ||
64 | + Selenium2Library.Switch Browser ${ARGUMENTS[0]} | ||
65 | + Wait Until Page Contains Мої закупівлі 100 | ||
66 | + Click Element xpath=//a[contains(@class, 'ng-binding')][./text()='Мої закупівлі'] | ||
67 | + Wait Until Page Contains Element xpath=//a[contains(@class, 'btn btn-info')] | ||
68 | + Click Element xpath=//a[contains(@class, 'btn btn-info')] | ||
69 | + Wait Until Page Contains Element id=title | ||
70 | + Input text id=title ${title} | ||
71 | + Input text id=description ${description} | ||
72 | + Input text id=value ${budget} | ||
73 | + Click Element xpath=//div[contains(@class, 'form-group col-sm-6')]//input[@type='checkbox'] | ||
74 | + Input text id=minimalStep ${step_rate} | ||
75 | + Input text id=itemsDescription ${items_description} | ||
76 | + Input text id=itemsQuantity ${quantity} | ||
77 | + Wait Until Page Contains Element xpath=//select[@name="itemsUnit"]/option[@value='kilogram'] 100 | ||
78 | + Click Element xpath=//select[@name="itemsUnit"]/option[@value='kilogram'] | ||
79 | + Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='enqPEndDate'] ${enquiry_end_date} | ||
80 | + 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} | ||
81 | + Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='startDate'] ${start_date} | ||
82 | + 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} | ||
83 | + Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='endDate'] ${end_date} | ||
84 | + 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} | ||
85 | + Click Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#classification'] | ||
86 | + Wait Until Element Is Visible xpath=//div[contains(@role,'dialog')] | ||
87 | + Input text xpath=//div[contains(@class, 'modal-content')]//input[@ng-model='searchstring'] ${cpv} | ||
88 | + Wait Until Page Contains ${cpv} | ||
89 | + Click Element xpath=//td[contains(., '${cpv}')] | ||
90 | + Click Element xpath=//div[contains(@class, 'modal-content')]//button[@ng-click='choose()'] | ||
91 | + Click Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'] | ||
92 | + Wait Until Element Is Visible xpath=//div[contains(@id,'addClassification')] | ||
93 | + Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc} | ||
94 | + Wait Until Page Contains ${dkpp_id} | ||
95 | + Click Element xpath=//td[contains(., '${dkpp_id}')] | ||
96 | + Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()'] | ||
97 | + Run Keyword if '${mode}' == 'multi' Додати предмет items | ||
98 | + Wait Until Page Contains Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit'] | ||
99 | + Click Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit'] | ||
100 | + Wait Until Page Contains [ТЕСТУВАННЯ] 100 | ||
101 | + Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-scope ng-table')]//tr[1]//a | ||
102 | + ${tender_UAid}= Wait Until Keyword Succeeds 240sec 2sec get tender UAid | ||
103 | +## harcode Idis bacause issues on the E-tender side, to remove, 1 line: | ||
104 | + ${tender_UAid}= Convert To String UA-2015-08-03-000025 | ||
105 | + ${id}= Oтримати internal id по UAid ${ARGUMENTS[0]} ${tender_UAid} | ||
106 | + ${Ids} Create List ${tender_UAid} ${id} | ||
107 | + [return] ${Ids} | ||
108 | + | ||
109 | + | ||
110 | +get tender UAid | ||
111 | + ${tender_UAid}= Get Text xpath=//div[contains(@class, "panel-heading")] | ||
112 | + ${tender_UAid}= Get Substring ${tender_UAid} 7 27 | ||
113 | + | ||
114 | + | ||
115 | +Oтримати internal id по UAid | ||
116 | + [Arguments] @{ARGUMENTS} | ||
117 | + [Documentation] | ||
118 | + ... ${ARGUMENTS[0]} == username | ||
119 | + ... ${ARGUMENTS[1]} == tenderid | ||
120 | + etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | ||
121 | + ${current_location}= Get Location | ||
122 | + ${tender_id}= Fetch From Right ${current_location} / | ||
123 | +## harcode Idis bacause issues on the E-tender side, to remove, 1 line: | ||
124 | + ${tender_id}= Convert To String 94ffe180019d459787aafe290cd300e2 | ||
125 | + log ${tender_id} | ||
126 | + [return] ${tender_id} | ||
127 | + | ||
128 | +Додати предмет | ||
129 | + [Arguments] @{ARGUMENTS} | ||
130 | + [Documentation] | ||
131 | + ... ${ARGUMENTS[0]} == items | ||
132 | + ${dkpp_desc1}= Get From Dictionary ${items[1].additionalClassifications[0]} description | ||
133 | + ${dkpp_id1}= Get From Dictionary ${items[1].additionalClassifications[0]} id | ||
134 | + ${dkpp_desc2}= Get From Dictionary ${items[2].additionalClassifications[0]} description | ||
135 | + ${dkpp_id2}= Get From Dictionary ${items[2].additionalClassifications[0]} id | ||
136 | + ${dkpp_desc3}= Get From Dictionary ${items[3].additionalClassifications[0]} description | ||
137 | + ${dkpp_id3}= Get From Dictionary ${items[3].additionalClassifications[0]} id | ||
138 | + | ||
139 | + Wait Until Page Contains Element xpath=.//*[@id='myform']/tender-form/div/button 100 | ||
140 | + Click Element xpath=.//*[@id='myform']/tender-form/div/button | ||
141 | + Sleep 2 | ||
142 | + Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[2] | ||
143 | + Wait Until Element Is Visible xpath=//div[contains(@id,'addClassification')] | ||
144 | + Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc1} | ||
145 | + Wait Until Page Contains ${dkpp_id1} | ||
146 | + Click Element xpath=//td[contains(., '${dkpp_id1}')] | ||
147 | + Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()'] | ||
148 | + Sleep 2 | ||
149 | + Click Element xpath=.//*[@id='myform']/tender-form/div/button | ||
150 | + Sleep 2 | ||
151 | + Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[3] | ||
152 | + Wait Until Element Is Visible xpath=//div[contains(@id,'addClassification')] | ||
153 | + Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc2} | ||
154 | + Wait Until Page Contains ${dkpp_id2} | ||
155 | + Click Element xpath=//td[contains(., '${dkpp_id2}')] | ||
156 | + Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()'] | ||
157 | + Sleep 2 | ||
158 | + Click Element xpath=.//*[@id='myform']/tender-form/div/button | ||
159 | + Sleep 2 | ||
160 | + Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[4] | ||
161 | + Wait Until Element Is Visible xpath=//div[contains(@id,'addClassification')] | ||
162 | + Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc3} | ||
163 | + Wait Until Page Contains ${dkpp_id3} | ||
164 | + Click Element xpath=//td[contains(., '${dkpp_id3}')] | ||
165 | + Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()'] | ||
26 | 166 | ||
27 | Пошук тендера по ідентифікатору | 167 | Пошук тендера по ідентифікатору |
28 | [Arguments] @{ARGUMENTS} | 168 | [Arguments] @{ARGUMENTS} |
29 | [Documentation] | 169 | [Documentation] |
30 | ... ${ARGUMENTS[0]} == username | 170 | ... ${ARGUMENTS[0]} == username |
31 | ... ${ARGUMENTS[1]} == tenderId | 171 | ... ${ARGUMENTS[1]} == tenderId |
32 | - ... ${ARGUMENTS[2]} == id | 172 | + |
33 | Switch browser ${ARGUMENTS[0]} | 173 | Switch browser ${ARGUMENTS[0]} |
34 | - ${current_location}= Get Location | ||
35 | - Run keyword if '${BROKERS['${USERS.users['${username}'].broker}'].url}/#/tenderDetailes/${ARGUMENTS[2]}'=='${current_location}' Reload Page | ||
36 | Go to ${BROKERS['${USERS.users['${username}'].broker}'].url} | 174 | Go to ${BROKERS['${USERS.users['${username}'].broker}'].url} |
37 | - Wait Until Page Contains E-TENDER - центр електронної торгівлі 10 | 175 | + Wait Until Page Contains Список закупівель 10 |
38 | sleep 1 | 176 | sleep 1 |
39 | Input Text jquery=input[ng-change='search()'] ${ARGUMENTS[1]} | 177 | Input Text jquery=input[ng-change='search()'] ${ARGUMENTS[1]} |
40 | Click Link jquery=a[ng-click='search()'] | 178 | Click Link jquery=a[ng-click='search()'] |
41 | sleep 2 | 179 | sleep 2 |
42 | -# ${last_note_id}= Add pointy note jquery=a[href^="#/tenderDetailes"] Found tender with tenderID "${ARGUMENTS[1]}" width=200 position=bottom | ||
43 | -# sleep 1 | ||
44 | -# Remove element ${last_note_id} | ||
45 | Click Link jquery=a[href^="#/tenderDetailes"] | 180 | Click Link jquery=a[href^="#/tenderDetailes"] |
46 | Wait Until Page Contains ${ARGUMENTS[1]} 10 | 181 | Wait Until Page Contains ${ARGUMENTS[1]} 10 |
47 | sleep 1 | 182 | sleep 1 |
@@ -129,7 +264,7 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai | @@ -129,7 +264,7 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai | ||
129 | 264 | ||
130 | отримати інформацію про items[${item_id}].description | 265 | отримати інформацію про items[${item_id}].description |
131 | відмітити на сторінці поле з тендера items[${item_id}].description jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Детальний опис предмету закупівлі:")>:eq(1)> | 266 | відмітити на сторінці поле з тендера items[${item_id}].description jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Детальний опис предмету закупівлі:")>:eq(1)> |
132 | - ${return_value}= Get Text jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Детальний опис предмету закупівлі:")>:eq(1)> | 267 | + ${return_value}= Get Text jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Детальний опис предмету закупівлі:")>:eq(1)> |
133 | [return] ${return_value} | 268 | [return] ${return_value} |
134 | 269 | ||
135 | отримати інформацію про items[${item_id}].quantity | 270 | отримати інформацію про items[${item_id}].quantity |
@@ -180,4 +315,55 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai | @@ -180,4 +315,55 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai | ||
180 | отримати інформацію про questions[${question_id}].answer | 315 | отримати інформацію про questions[${question_id}].answer |
181 | відмітити на сторінці поле з тендера question answer jquery=tender-questions>div:eq(1)>div:last> | 316 | відмітити на сторінці поле з тендера question answer jquery=tender-questions>div:eq(1)>div:last> |
182 | ${return_value}= Get Text jquery=tender-questions>div:eq(1)>div:last> | 317 | ${return_value}= Get Text jquery=tender-questions>div:eq(1)>div:last> |
183 | - [return] ${return_value} | ||
318 | + [return] ${return_value} | ||
319 | + | ||
320 | +Подати цінову пропозицію | ||
321 | + [Arguments] @{ARGUMENTS} | ||
322 | + [Documentation] | ||
323 | + ... ${ARGUMENTS[0]} == username | ||
324 | + ... ${ARGUMENTS[1]} == ${INTERNAL_TENDER_ID} | ||
325 | + ... ${ARGUMENTS[2]} == test_bid_data | ||
326 | + | ||
327 | + ${bid}= Get From Dictionary ${ARGUMENTS[2].data.value} amount | ||
328 | + etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | ||
329 | + Wait Until Page Contains Інформація про процедуру закупівлі 100 | ||
330 | + Wait Until Page Contains Element id=amount 10 | ||
331 | + Input text id=amount ${bid} | ||
332 | + Click Element xpath=//button[contains(@class, 'btn btn-success')][./text()='Реєстрація пропозиції'] | ||
333 | + | ||
334 | +Задати питання | ||
335 | + [Arguments] @{ARGUMENTS} | ||
336 | + [Documentation] | ||
337 | + ... ${ARGUMENTS[0]} = username | ||
338 | + ... ${ARGUMENTS[1]} = ${INTERNAL_TENDER_ID} | ||
339 | + ... ${ARGUMENTS[2]} = question_data | ||
340 | + | ||
341 | + ${title}= Get From Dictionary ${ARGUMENTS[2].data} title | ||
342 | + ${description}= Get From Dictionary ${ARGUMENTS[2].data} description | ||
343 | + | ||
344 | + Selenium2Library.Switch Browser ${ARGUMENTS[0]} | ||
345 | + etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID} | ||
346 | + | ||
347 | + Wait Until Page Contains Element jquery=a[href^="#/addQuestion/"] 100 | ||
348 | + Click Element jquery=a[href^="#/addQuestion/"] | ||
349 | + Wait Until Page Contains Element id=title | ||
350 | + Input text id=title ${title} | ||
351 | + Input text id=description ${description} | ||
352 | + Click Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit'] | ||
353 | + | ||
354 | +Відповісти на питання | ||
355 | + [Arguments] @{ARGUMENTS} | ||
356 | + [Documentation] | ||
357 | + ... ${ARGUMENTS[0]} = username | ||
358 | + ... ${ARGUMENTS[1]} = ${INTERNAL_TENDER_ID} | ||
359 | + ... ${ARGUMENTS[2]} = 0 | ||
360 | + ... ${ARGUMENTS[3]} = answer_data | ||
361 | + | ||
362 | + ${answer}= Get From Dictionary ${ARGUMENTS[3].data} answer | ||
363 | + | ||
364 | + Selenium2Library.Switch Browser ${ARGUMENTS[0]} | ||
365 | + etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID} | ||
366 | + | ||
367 | + Click Element xpath=//div[div/pre[1]]/div[1] | ||
368 | + Input text xpath=//div[textarea]/textarea ${answer} | ||
369 | + Click Element xpath=//div[textarea]/span/button[1] |
@@ -18,12 +18,167 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai | @@ -18,12 +18,167 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai | ||
18 | 18 | ||
19 | *** Keywords *** | 19 | *** Keywords *** |
20 | Підготувати клієнт для користувача | 20 | Підготувати клієнт для користувача |
21 | - [Arguments] ${username} | 21 | + [Arguments] @{ARGUMENTS} |
22 | [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо | 22 | [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо |
23 | - Open Browser ${BROKERS['${USERS.users['${username}'].broker}'].url} ${USERS.users['${username}'].browser} alias=${username} | ||
24 | - Set Window Position @{USERS.users['${username}'].position} | ||
25 | - Set Window Size @{USERS.users['${username}'].size} | ||
26 | - Log Variables | 23 | + ... ${ARGUMENTS[0]} == username |
24 | + Open Browser ${BROKERS['${USERS.users['${ARGUMENTS[0]}'].broker}'].url} ${USERS.users['${ARGUMENTS[0]}'].browser} alias=${ARGUMENTS[0]} | ||
25 | + Set Window Size @{USERS.users['${ARGUMENTS[0]}'].size} | ||
26 | + Set Window Position @{USERS.users['${ARGUMENTS[0]}'].position} | ||
27 | + | ||
28 | +# login | ||
29 | + Wait Until Page Contains Element name=siteLogin 100 | ||
30 | + Input text name=siteLogin ${BROKERS['${USERS.users['${username}'].broker}'].login} | ||
31 | + Input text name=sitePass ${BROKERS['${USERS.users['${username}'].broker}'].password} | ||
32 | + Click Button xpath=.//*[@id='table1']/tbody/tr/td/form/p[3]/input | ||
33 | + | ||
34 | + Wait Until Page Contains Element jquery=a[href="/cabinet"] | ||
35 | + Click Element jquery=a[href="/cabinet"] | ||
36 | + Wait Until Page Contains Element name=email 100 | ||
37 | + Input text name=email mail | ||
38 | + Sleep 1 | ||
39 | + Input text name=email ${USERS.users['${username}'].login} | ||
40 | + Sleep 2 | ||
41 | + Input text name=psw ${USERS.users['${username}'].password} | ||
42 | + Wait Until Page Contains Element xpath=//button[contains(@class, 'btn')][./text()='Вхід в кабінет'] 100 | ||
43 | + Click Element xpath=//button[contains(@class, 'btn')][./text()='Вхід в кабінет'] | ||
44 | + | ||
45 | +Створити тендер | ||
46 | + [Arguments] @{ARGUMENTS} | ||
47 | + [Documentation] | ||
48 | + ... ${ARGUMENTS[0]} == username | ||
49 | + ... ${ARGUMENTS[1]} == tender_data | ||
50 | + | ||
51 | + ${items}= Get From Dictionary ${ARGUMENTS[1].data} items | ||
52 | + ${title}= Get From Dictionary ${ARGUMENTS[1].data} title | ||
53 | + ${description}= Get From Dictionary ${ARGUMENTS[1].data} description | ||
54 | + ${budget}= Get From Dictionary ${ARGUMENTS[1].data.value} amount | ||
55 | + ${step_rate}= Get From Dictionary ${ARGUMENTS[1].data.minimalStep} amount | ||
56 | + ${items_description}= Get From Dictionary ${ARGUMENTS[1].data} description | ||
57 | + ${quantity}= Get From Dictionary ${items[0]} quantity | ||
58 | + ${countryName}= Get From Dictionary ${ARGUMENTS[1].data.procuringEntity.address} countryName | ||
59 | + ${delivery_end_date}= Get From Dictionary ${items[0].deliveryDate} endDate | ||
60 | + ${delivery_end_date}= convert_date_to_slash_format ${delivery_end_date} | ||
61 | + ${cpv}= Get From Dictionary ${items[0].classification} description_ua | ||
62 | + ${cpv_id}= Get From Dictionary ${items[0].classification} id | ||
63 | + ${cpv_id1}= Replace String ${cpv_id} - _ | ||
64 | + ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description | ||
65 | + ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id | ||
66 | + ${dkpp_id1}= Replace String ${dkpp_id} - _ | ||
67 | + ${enquiry_end_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate | ||
68 | + ${enquiry_end_date}= convert_date_to_slash_format ${enquiry_end_date} | ||
69 | + ${end_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate | ||
70 | + ${end_date}= convert_date_to_slash_format ${end_date} | ||
71 | + | ||
72 | + Selenium2Library.Switch Browser ${ARGUMENTS[0]} | ||
73 | + Wait Until Page Contains Element jquery=a[href="/tenders/new"] 100 | ||
74 | + Click Element jquery=a[href="/tenders/new"] | ||
75 | + Wait Until Page Contains Element name=tender_title 100 | ||
76 | + Input text name=tender_title ${title} | ||
77 | + Input text name=tender_description ${description} | ||
78 | + Input text name=tender_value_amount ${budget} | ||
79 | + Input text name=tender_minimalStep_amount ${step_rate} | ||
80 | + Input text name=items[0][item_description] ${items_description} | ||
81 | + Input text name=items[0][item_quantity] ${quantity} | ||
82 | + Input text name=items[0][item_deliveryAddress_countryName] ${countryName} | ||
83 | + Input text name=items[0][item_deliveryDate_endDate] ${delivery_end_date} | ||
84 | + Click Element xpath=//a[contains(@data-class, 'cpv')][./text()='Визначити за довідником'] | ||
85 | + Select Frame xpath=//iframe[contains(@src,'/js/classifications/cpv/uk.htm?relation=true')] | ||
86 | + Input text id=search ${cpv} | ||
87 | + Wait Until Page Contains ${cpv_id} | ||
88 | + Click Element xpath=//a[contains(@id,'${cpv_id1}')] | ||
89 | + Click Element xpath=.//*[@id='select'] | ||
90 | + Unselect Frame | ||
91 | + Click Element xpath=//a[contains(@data-class, 'dkpp')][./text()='Визначити за довідником'] | ||
92 | + Select Frame xpath=//iframe[contains(@src,'/js/classifications/dkpp/uk.htm?relation=true')] | ||
93 | + Input text id=search ${dkpp_desc} | ||
94 | + Wait Until Page Contains ${dkpp_id} | ||
95 | + Click Element xpath=//a[contains(@id,'${dkpp_id1}')] | ||
96 | + Click Element xpath=.//*[@id='select'] | ||
97 | + Unselect Frame | ||
98 | + Input text name=tender_enquiryPeriod_endDate ${enquiry_end_date} | ||
99 | + Input text name=tender_tenderPeriod_endDate ${end_date} | ||
100 | + Run Keyword if '${mode}' == 'multi' Додати предмет items | ||
101 | + Wait Until Page Contains Element name=do 100 | ||
102 | + Click Element name=do | ||
103 | + Wait Until Page Contains Element xpath=//a[contains(@class, 'button pubBtn')] 100 | ||
104 | + Click Element xpath=//a[contains(@class, 'button pubBtn')] | ||
105 | + Wait Until Page Contains Тендер опубліковано 100 | ||
106 | + ${tender_UAid}= Get Text xpath=//*/section[6]/table/tbody/tr[2]/td[2] | ||
107 | + ${id}= Get Text xpath=//*/section[6]/table/tbody/tr[1]/td[2] | ||
108 | + ${Ids} Create List ${tender_UAid} ${id} | ||
109 | + [return] ${Ids} | ||
110 | + | ||
111 | +Додати предмет | ||
112 | + [Arguments] @{ARGUMENTS} | ||
113 | + [Documentation] | ||
114 | + ... ${ARGUMENTS[0]} == items | ||
115 | + ${dkpp_desc1}= Get From Dictionary ${items[1].additionalClassifications[0]} description | ||
116 | + ${dkpp_id11}= Get From Dictionary ${items[1].additionalClassifications[0]} id | ||
117 | + ${dkpp_1id}= Replace String ${dkpp_id11} - _ | ||
118 | + ${dkpp_desc2}= Get From Dictionary ${items[2].additionalClassifications[0]} description | ||
119 | + ${dkpp_id2}= Get From Dictionary ${items[2].additionalClassifications[0]} id | ||
120 | + ${dkpp_id2_1}= Replace String ${dkpp_id2} - _ | ||
121 | + ${dkpp_desc3}= Get From Dictionary ${items[3].additionalClassifications[0]} description | ||
122 | + ${dkpp_id3}= Get From Dictionary ${items[3].additionalClassifications[0]} id | ||
123 | + ${dkpp_id3_1}= Replace String ${dkpp_id3} - _ | ||
124 | + | ||
125 | + Wait Until Page Contains Element xpath=//a[contains(@class, 'addMultiItem')][./text()='Додати предмет закупівлі'] | ||
126 | + Click Element xpath=//a[contains(@class, 'addMultiItem')][./text()='Додати предмет закупівлі'] | ||
127 | + Wait Until Page Contains Element name=items[1][item_description] 100 | ||
128 | + Input text name=items[1][item_description] ${description} | ||
129 | + Input text name=items[1][item_quantity] ${quantity} | ||
130 | + Click Element xpath=(//a[contains(@data-class, 'cpv')][./text()='Визначити за довідником'])[2] | ||
131 | + Select Frame xpath=//iframe[contains(@src,'/js/classifications/cpv/uk.htm?relation=true')] | ||
132 | + Input text id=search ${cpv} | ||
133 | + Wait Until Page Contains ${cpv_id} | ||
134 | + Click Element xpath=//a[contains(@id,'${cpv_id1}')] | ||
135 | + Click Element xpath=.//*[@id='select'] | ||
136 | + Unselect Frame | ||
137 | + Click Element xpath=(//a[contains(@data-class, 'dkpp')][./text()='Визначити за довідником'])[2] | ||
138 | + Select Frame xpath=//iframe[contains(@src,'/js/classifications/dkpp/uk.htm?relation=true')] | ||
139 | + Input text id=search ${dkpp_desc1} | ||
140 | + Wait Until Page Contains ${dkpp_id11} | ||
141 | + Click Element xpath=//a[contains(@id,'${dkpp_1id}')] | ||
142 | + Click Element xpath=.//*[@id='select'] | ||
143 | + Unselect Frame | ||
144 | + Click Element xpath=//a[contains(@class, 'addMultiItem')][./text()='Додати предмет закупівлі'] | ||
145 | + Wait Until Page Contains Element name=items[2][item_description] 100 | ||
146 | + Input text name=items[2][item_description] ${description} | ||
147 | + Input text name=items[2][item_quantity] ${quantity} | ||
148 | + Click Element xpath=(//a[contains(@data-class, 'cpv')][./text()='Визначити за довідником'])[3] | ||
149 | + Select Frame xpath=//iframe[contains(@src,'/js/classifications/cpv/uk.htm?relation=true')] | ||
150 | + Input text id=search ${cpv} | ||
151 | + Wait Until Page Contains ${cpv_id} | ||
152 | + Click Element xpath=//a[contains(@id,'${cpv_id1}')] | ||
153 | + Click Element xpath=.//*[@id='select'] | ||
154 | + Unselect Frame | ||
155 | + Click Element xpath=(//a[contains(@data-class, 'dkpp')][./text()='Визначити за довідником'])[3] | ||
156 | + Select Frame xpath=//iframe[contains(@src,'/js/classifications/dkpp/uk.htm?relation=true')] | ||
157 | + Input text id=search ${dkpp_desc2} | ||
158 | + Wait Until Page Contains ${dkpp_id2} | ||
159 | + Click Element xpath=//a[contains(@id,'${dkpp_id2_1}')] | ||
160 | + Click Element xpath=.//*[@id='select'] | ||
161 | + Unselect Frame | ||
162 | + Click Element xpath=//a[contains(@class, 'addMultiItem')][./text()='Додати предмет закупівлі'] | ||
163 | + Wait Until Page Contains Element name=items[3][item_description] 100 | ||
164 | + Input text name=items[3][item_description] ${description} | ||
165 | + Input text name=items[3][item_quantity] ${quantity} | ||
166 | + Click Element xpath=(//a[contains(@data-class, 'cpv')][./text()='Визначити за довідником'])[4] | ||
167 | + Select Frame xpath=//iframe[contains(@src,'/js/classifications/cpv/uk.htm?relation=true')] | ||
168 | + Input text id=search ${cpv} | ||
169 | + Wait Until Page Contains ${cpv_id} | ||
170 | + Click Element xpath=//a[contains(@id,'${cpv_id1}')] | ||
171 | + Click Element xpath=.//*[@id='select'] | ||
172 | + Unselect Frame | ||
173 | + Click Element xpath=(//a[contains(@data-class, 'dkpp')][./text()='Визначити за довідником'])[4] | ||
174 | + Select Frame xpath=//iframe[contains(@src,'/js/classifications/dkpp/uk.htm?relation=true')] | ||
175 | + Input text id=search ${dkpp_desc3} | ||
176 | + Wait Until Page Contains ${dkpp_id3} | ||
177 | + Click Element xpath=//a[contains(@id,'${dkpp_id3_1}')] | ||
178 | + Click Element xpath=.//*[@id='select'] | ||
179 | + Unselect Frame | ||
180 | + Input text name=tender_enquiryPeriod_endDate ${enquiry_end_date} | ||
181 | + Input text name=tender_tenderPeriod_endDate ${end_date} | ||
27 | 182 | ||
28 | Пошук тендера по ідентифікатору | 183 | Пошук тендера по ідентифікатору |
29 | [Arguments] @{ARGUMENTS} | 184 | [Arguments] @{ARGUMENTS} |
@@ -26,3 +26,11 @@ Netcast: | @@ -26,3 +26,11 @@ Netcast: | ||
26 | keywords_file: netcast | 26 | keywords_file: netcast |
27 | url: http://dz2.byustudio.in.ua | 27 | url: http://dz2.byustudio.in.ua |
28 | timout_on_wait: 15 | 28 | timout_on_wait: 15 |
29 | + period_interval: 2 | ||
30 | +Netcast: | ||
31 | + keywords_file: netcast | ||
32 | + url: "http://dz2.byustudio.in.ua" | ||
33 | + login: admin | ||
34 | + password: uStudio | ||
35 | + timout_on_wait: 15 | ||
36 | + period_interval: 2 |
@@ -2,11 +2,41 @@ users: | @@ -2,11 +2,41 @@ users: | ||
2 | Tender_Owner: | 2 | Tender_Owner: |
3 | api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 | 3 | api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 |
4 | broker: Quinta | 4 | broker: Quinta |
5 | - Prom_Owner: | ||
6 | - broker: Prom | ||
7 | - username: Promtest | ||
8 | - browser: chrome | 5 | + Tender_Viewer: |
6 | + broker: Quinta | ||
7 | + api_key: "" | ||
8 | + Tender_User: | ||
9 | + api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 | ||
10 | + broker: Quinta | ||
11 | + Tender_User1: | ||
12 | + api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 | ||
13 | + broker: Quinta | ||
14 | + E-tender_Owner: | ||
15 | + broker: E-tender | ||
16 | + username: E-tendertest | ||
17 | + homepage: "http://uat.e-tender.biz/#/profile" | ||
18 | + login: Misha2 | ||
19 | + password: Password1 | ||
20 | + browser: firefox | ||
9 | position: [0, 0] | 21 | position: [0, 0] |
22 | + size: [740, 550] | ||
23 | + E-tender_Provider1: | ||
24 | + broker: E-tender | ||
25 | + username: E-tendertest | ||
26 | + homepage: "http://uat.e-tender.biz/#/profile" | ||
27 | + login: st_org | ||
28 | + password: 12345678 | ||
29 | + browser: firefox | ||
30 | + position: [0, 0] | ||
31 | + size: [640, 450] | ||
32 | + E-tender_Provider2: | ||
33 | + broker: E-tender | ||
34 | + username: E-tendertest | ||
35 | + homepage: "http://uat.e-tender.biz/#/profile" | ||
36 | + login: provider2 | ||
37 | + password: Qa123456 | ||
38 | + browser: firefox | ||
39 | + position: [700, 0] | ||
10 | size: [640, 450] | 40 | size: [640, 450] |
11 | E-tender_Viewer: | 41 | E-tender_Viewer: |
12 | broker: E-tender | 42 | broker: E-tender |
@@ -14,6 +44,12 @@ users: | @@ -14,6 +44,12 @@ users: | ||
14 | browser: chrome | 44 | browser: chrome |
15 | position: [0, 0] | 45 | position: [0, 0] |
16 | size: [640, 450] | 46 | size: [640, 450] |
47 | + Prom_Owner: | ||
48 | + broker: Prom | ||
49 | + username: Promtest | ||
50 | + browser: chrome | ||
51 | + position: [0, 0] | ||
52 | + size: [640, 450] | ||
17 | Prom_Viewer: | 53 | Prom_Viewer: |
18 | broker: Prom | 54 | broker: Prom |
19 | username: Promtest | 55 | username: Promtest |
@@ -31,20 +67,28 @@ users: | @@ -31,20 +67,28 @@ users: | ||
31 | username: Publicbid | 67 | username: Publicbid |
32 | browser: chrome | 68 | browser: chrome |
33 | position: [0, 450] | 69 | position: [0, 450] |
34 | - size: [640, 450] | 70 | + size: [640, 450] |
35 | Netcast_Viewer: | 71 | Netcast_Viewer: |
36 | broker: Netcast | 72 | broker: Netcast |
37 | username: TetcastTest | 73 | username: TetcastTest |
38 | browser: chrome | 74 | browser: chrome |
39 | position: [0, 450] | 75 | position: [0, 450] |
40 | - size: [640, 450] | ||
41 | - Tender_Viewer: | ||
42 | - broker: Quinta | ||
43 | - api_key: "" | ||
44 | - Tender_User: | ||
45 | - api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 | ||
46 | - broker: Quinta | ||
47 | - Tender_User1: | ||
48 | - api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 | ||
49 | - broker: Quinta | ||
50 | - | ||
76 | + size: [640, 450] | ||
77 | + Netcast_Owner: | ||
78 | + broker: Netcast | ||
79 | + username: Netcasttest | ||
80 | + homepage: "http://dz2.byustudio.in.ua" | ||
81 | + login: ovramet.s@gmail.com | ||
82 | + password: Password1 | ||
83 | + browser: firefox | ||
84 | + position: [0, 450] | ||
85 | + size: [640, 450] | ||
86 | + Publicbid_Owner: | ||
87 | + broker: Publicbid | ||
88 | + username: Publicbid | ||
89 | + homepage: "https://public-bid.com.ua/test/" | ||
90 | + login: yaroslav1boyko@gmail.com | ||
91 | + password: Password1 | ||
92 | + browser: firefox | ||
93 | + position: [0, 0] | ||
94 | + size: [740, 550] |
@@ -35,6 +35,7 @@ def test_tender_data(period_interval=2): | @@ -35,6 +35,7 @@ def test_tender_data(period_interval=2): | ||
35 | "contactPoint": { | 35 | "contactPoint": { |
36 | "name": fake.name(), | 36 | "name": fake.name(), |
37 | "telephone": fake.phone_number() | 37 | "telephone": fake.phone_number() |
38 | + | ||
38 | } | 39 | } |
39 | }, | 40 | }, |
40 | "value": { | 41 | "value": { |
@@ -65,7 +66,8 @@ def test_tender_data(period_interval=2): | @@ -65,7 +66,8 @@ def test_tender_data(period_interval=2): | ||
65 | "classification": { | 66 | "classification": { |
66 | "scheme": u"CPV", | 67 | "scheme": u"CPV", |
67 | "id": u"44617100-9", | 68 | "id": u"44617100-9", |
68 | - "description": u"Cartons" | 69 | + "description": u"Cartons", |
70 | + "description_ua": u"Картонки", | ||
69 | }, | 71 | }, |
70 | "additionalClassifications": [ | 72 | "additionalClassifications": [ |
71 | { | 73 | { |
@@ -82,8 +84,8 @@ def test_tender_data(period_interval=2): | @@ -82,8 +84,8 @@ def test_tender_data(period_interval=2): | ||
82 | } | 84 | } |
83 | ], | 85 | ], |
84 | "enquiryPeriod": { | 86 | "enquiryPeriod": { |
85 | - "startDate": (now).isoformat(), | ||
86 | - "endDate": (now + timedelta(minutes=1)).isoformat() | 87 | + "startDate": (now + timedelta(minutes=2)).isoformat(), |
88 | + "endDate": (now + timedelta(minutes=3)).isoformat() | ||
87 | }, | 89 | }, |
88 | "tenderPeriod": { | 90 | "tenderPeriod": { |
89 | "startDate": (now + timedelta(minutes=2)).isoformat(), | 91 | "startDate": (now + timedelta(minutes=2)).isoformat(), |
@@ -133,7 +135,7 @@ def prom_test_tender_data(): | @@ -133,7 +135,7 @@ def prom_test_tender_data(): | ||
133 | { | 135 | { |
134 | "description": fake.catch_phrase(), | 136 | "description": fake.catch_phrase(), |
135 | "deliveryDate": { | 137 | "deliveryDate": { |
136 | - "startDate": (now + timedelta(days=4)).isoformat(), | 138 | + "startDate": (now + timedelta(days=4)).isoformat(), |
137 | "endDate": (now + timedelta(days=5)).isoformat() | 139 | "endDate": (now + timedelta(days=5)).isoformat() |
138 | }, | 140 | }, |
139 | "deliveryLocation": { | 141 | "deliveryLocation": { |
@@ -179,41 +181,41 @@ def prom_test_tender_data(): | @@ -179,41 +181,41 @@ def prom_test_tender_data(): | ||
179 | def test_tender_data_multiple_lots(period_interval=2): | 181 | def test_tender_data_multiple_lots(period_interval=2): |
180 | now = datetime.now() | 182 | now = datetime.now() |
181 | return { | 183 | return { |
182 | - "title": fake.catch_phrase(), | ||
183 | - "mode": "test", | ||
184 | - "submissionMethodDetails": "quick", | ||
185 | - "description": u"Тестовий тендер", | ||
186 | - "description_en": "Test tender", | ||
187 | - "description_ru": "Тестовый тендер", | ||
188 | - "procuringEntity": { | ||
189 | - "name": fake.company(), | ||
190 | - "name_ru": fake_ru.company(), | ||
191 | - "name_en": fake_en.company(), | ||
192 | - "identifier": { | ||
193 | - "scheme": u"UA-EDR", | ||
194 | - "id": u"0000{}".format(fake.pyint()), | ||
195 | - "uri": fake.image_url(width=None, height=None) | ||
196 | - }, | ||
197 | - "address": { | ||
198 | - "countryName": u"Україна", | ||
199 | - "postalCode": fake.postalcode(), | ||
200 | - "region": u"м. Київ", | ||
201 | - "locality": u"м. Київ", | ||
202 | - "streetAddress": fake.street_address() | ||
203 | - }, | ||
204 | - "contactPoint": { | ||
205 | - "name": fake.name(), | ||
206 | - "telephone": fake.phone_number() | ||
207 | - } | ||
208 | - }, | ||
209 | - "value": { | ||
210 | - "amount": 50000.99, | ||
211 | - "currency": u"UAH" | ||
212 | - }, | ||
213 | - "minimalStep": { | ||
214 | - "amount": 100.1, | ||
215 | - "currency": u"UAH" | ||
216 | - }, | 184 | + "title": fake.catch_phrase(), |
185 | + "mode": "test", | ||
186 | + "submissionMethodDetails": "quick", | ||
187 | + "description": u"Тестовий тендер", | ||
188 | + "description_en": "Test tender", | ||
189 | + "description_ru": "Тестовый тендер", | ||
190 | + "procuringEntity": { | ||
191 | + "name": fake.company(), | ||
192 | + "name_ru": fake_ru.company(), | ||
193 | + "name_en": fake_en.company(), | ||
194 | + "identifier": { | ||
195 | + "scheme": u"UA-EDR", | ||
196 | + "id": u"0000{}".format(fake.pyint()), | ||
197 | + "uri": fake.image_url(width=None, height=None) | ||
198 | + }, | ||
199 | + "address": { | ||
200 | + "countryName": u"Україна", | ||
201 | + "postalCode": fake.postalcode(), | ||
202 | + "region": u"м. Київ", | ||
203 | + "locality": u"м. Київ", | ||
204 | + "streetAddress": fake.street_address() | ||
205 | + }, | ||
206 | + "contactPoint": { | ||
207 | + "name": fake.name(), | ||
208 | + "telephone": fake.phone_number() | ||
209 | + } | ||
210 | + }, | ||
211 | + "value": { | ||
212 | + "amount": 50000, | ||
213 | + "currency": u"UAH" | ||
214 | + }, | ||
215 | + "minimalStep": { | ||
216 | + "amount": 100, | ||
217 | + "currency": u"UAH" | ||
218 | + }, | ||
217 | "items": [ | 219 | "items": [ |
218 | { | 220 | { |
219 | "description": fake.catch_phrase(), | 221 | "description": fake.catch_phrase(), |
@@ -234,7 +236,8 @@ def test_tender_data_multiple_lots(period_interval=2): | @@ -234,7 +236,8 @@ def test_tender_data_multiple_lots(period_interval=2): | ||
234 | "classification": { | 236 | "classification": { |
235 | "scheme": u"CPV", | 237 | "scheme": u"CPV", |
236 | "id": u"44617100-9", | 238 | "id": u"44617100-9", |
237 | - "description": u"Cartons" | 239 | + "description": u"Cartons", |
240 | + "description_ua": u"Картонки", | ||
238 | }, | 241 | }, |
239 | "additionalClassifications": [ | 242 | "additionalClassifications": [ |
240 | { | 243 | { |
@@ -249,7 +252,7 @@ def test_tender_data_multiple_lots(period_interval=2): | @@ -249,7 +252,7 @@ def test_tender_data_multiple_lots(period_interval=2): | ||
249 | }, | 252 | }, |
250 | "quantity": fake.pyint() | 253 | "quantity": fake.pyint() |
251 | }, | 254 | }, |
252 | - { | 255 | + { |
253 | "description": fake.catch_phrase(), | 256 | "description": fake.catch_phrase(), |
254 | "deliveryDate": { | 257 | "deliveryDate": { |
255 | "endDate": (now + timedelta(days=5)).isoformat() | 258 | "endDate": (now + timedelta(days=5)).isoformat() |
@@ -283,7 +286,7 @@ def test_tender_data_multiple_lots(period_interval=2): | @@ -283,7 +286,7 @@ def test_tender_data_multiple_lots(period_interval=2): | ||
283 | }, | 286 | }, |
284 | "quantity": fake.pyint() | 287 | "quantity": fake.pyint() |
285 | }, | 288 | }, |
286 | - { | 289 | + { |
287 | "description": fake.catch_phrase(), | 290 | "description": fake.catch_phrase(), |
288 | "deliveryDate": { | 291 | "deliveryDate": { |
289 | "endDate": (now + timedelta(days=5)).isoformat() | 292 | "endDate": (now + timedelta(days=5)).isoformat() |
@@ -317,7 +320,7 @@ def test_tender_data_multiple_lots(period_interval=2): | @@ -317,7 +320,7 @@ def test_tender_data_multiple_lots(period_interval=2): | ||
317 | }, | 320 | }, |
318 | "quantity": fake.pyint() | 321 | "quantity": fake.pyint() |
319 | }, | 322 | }, |
320 | - { | 323 | + { |
321 | "description": fake.catch_phrase(), | 324 | "description": fake.catch_phrase(), |
322 | "deliveryDate": { | 325 | "deliveryDate": { |
323 | "endDate": (now + timedelta(days=5)).isoformat() | 326 | "endDate": (now + timedelta(days=5)).isoformat() |
@@ -353,12 +356,12 @@ def test_tender_data_multiple_lots(period_interval=2): | @@ -353,12 +356,12 @@ def test_tender_data_multiple_lots(period_interval=2): | ||
353 | } | 356 | } |
354 | ], | 357 | ], |
355 | "enquiryPeriod": { | 358 | "enquiryPeriod": { |
356 | - "startDate": (now).isoformat(), | ||
357 | - "endDate": (now + timedelta(minutes=1)).isoformat() | 359 | + "startDate": (now + timedelta(minutes=3)).isoformat(), |
360 | + "endDate": (now + timedelta(minutes=4)).isoformat() | ||
358 | }, | 361 | }, |
359 | "tenderPeriod": { | 362 | "tenderPeriod": { |
360 | - "startDate": (now + timedelta(minutes=2)).isoformat(), | ||
361 | - "endDate": (now + timedelta(minutes=(2+period_interval))).isoformat() | 363 | + "startDate": (now + timedelta(minutes=4)).isoformat(), |
364 | + "endDate": (now + timedelta(minutes=(5+period_interval))).isoformat() | ||
362 | } | 365 | } |
363 | } | 366 | } |
364 | 367 | ||
@@ -460,7 +463,7 @@ def test_bid_data(): | @@ -460,7 +463,7 @@ def test_bid_data(): | ||
460 | } | 463 | } |
461 | } | 464 | } |
462 | }) | 465 | }) |
463 | - | 466 | + |
464 | def auction_bid(): | 467 | def auction_bid(): |
465 | return munchify({ | 468 | return munchify({ |
466 | "data": {"value": { | 469 | "data": {"value": { |
1 | +#!/usr/bin/env python | ||
1 | # -*- coding: utf-8 - | 2 | # -*- coding: utf-8 - |
2 | import os | 3 | import os |
3 | -from tempfile import NamedTemporaryFile | ||
4 | from munch import munchify, Munch, fromYAML | 4 | from munch import munchify, Munch, fromYAML |
5 | from json import load | 5 | from json import load |
6 | from iso8601 import parse_date | 6 | from iso8601 import parse_date |
@@ -23,14 +23,23 @@ from .initial_data import ( | @@ -23,14 +23,23 @@ from .initial_data import ( | ||
23 | 23 | ||
24 | TIMEZONE = timezone('Europe/Kiev') | 24 | TIMEZONE = timezone('Europe/Kiev') |
25 | 25 | ||
26 | -def create_file(content): | ||
27 | - tf = NamedTemporaryFile(delete=False) | ||
28 | - tf.write(content) | ||
29 | - tf.close() | ||
30 | - return tf.name | ||
31 | - | ||
32 | def get_date(): | 26 | def get_date(): |
33 | - return datetime.now().isoformat() | 27 | + return datetime.now().isoformat() |
28 | + | ||
29 | +def convert_date_to_slash_format(isodate): | ||
30 | + iso_dt=parse_date(isodate) | ||
31 | + date_string = iso_dt.strftime("%d/%m/%Y") | ||
32 | + return date_string | ||
33 | + | ||
34 | +def convert_date_to_etender_format(isodate): | ||
35 | + iso_dt=parse_date(isodate) | ||
36 | + date_string = iso_dt.strftime("%d-%m-%Y") | ||
37 | + return date_string | ||
38 | + | ||
39 | +def convert_time_to_etender_format(isodate): | ||
40 | + iso_dt=parse_date(isodate) | ||
41 | + time_string = iso_dt.strftime("%H:%M") | ||
42 | + return time_string | ||
34 | 43 | ||
35 | def change_state(arguments): | 44 | def change_state(arguments): |
36 | try: | 45 | try: |
Please
register
or
login
to post a comment