Commit 1cfdd4a9f23b314f07815705f17a5656b0835e82

Authored by biviktorqc
2 parents eabeee5f c9bc870a

Merge branch 'pc2' into pc2y

... ... @@ -27,30 +27,30 @@ ${file_path} /home/yboi/openprocurement.robottests.buildout/Document.docx
27 27 [Arguments] @{ARGUMENTS}
28 28 [Documentation]
29 29 ... ${ARGUMENTS[0]} == username
30   - ... ${ARGUMENTS[1]} == tender_data
31   - ${tender_data}= Add_time_for_GUI_FrontEnds ${ARGUMENTS[1]}
32   - ${items}= Get From Dictionary ${tender_data.data} items
33   - ${title}= Get From Dictionary ${tender_data.data} title
34   - ${description}= Get From Dictionary ${tender_data.data} description
35   - ${budget}= Get From Dictionary ${tender_data.data.value} amount
36   - ${step_rate}= Get From Dictionary ${tender_data.data.minimalStep} amount
37   - ${items_description}= Get From Dictionary ${tender_data.data} description
  30 + ... ${ARGUMENTS[1]} == initial_tender_data
  31 + ${prepared_tender_data}= Add_data_for_GUI_FrontEnds ${ARGUMENTS[1]}
  32 + ${items}= Get From Dictionary ${prepared_tender_data.data} items
  33 + ${title}= Get From Dictionary ${prepared_tender_data.data} title
  34 + ${description}= Get From Dictionary ${prepared_tender_data.data} description
  35 + ${budget}= Get From Dictionary ${prepared_tender_data.data.value} amount
  36 + ${step_rate}= Get From Dictionary ${prepared_tender_data.data.minimalStep} amount
  37 + ${items_description}= Get From Dictionary ${prepared_tender_data.data} description
38 38 ${quantity}= Get From Dictionary ${items[0]} quantity
39 39 ${cpv}= Get From Dictionary ${items[0].classification} id
40 40 ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description
41 41 ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id
42 42 ${unit}= Get From Dictionary ${items[0].unit} name
43   - ${start_date}= Get From Dictionary ${tender_data.data.tenderPeriod} startDate
  43 + ${start_date}= Get From Dictionary ${prepared_tender_data.data.tenderPeriod} startDate
44 44 ${start_date}= convert_date_to_etender_format ${start_date}
45   - ${start_time}= Get From Dictionary ${tender_data.data.tenderPeriod} startDate
  45 + ${start_time}= Get From Dictionary ${prepared_tender_data.data.tenderPeriod} startDate
46 46 ${start_time}= convert_time_to_etender_format ${start_time}
47   - ${end_date}= Get From Dictionary ${tender_data.data.tenderPeriod} endDate
  47 + ${end_date}= Get From Dictionary ${prepared_tender_data.data.tenderPeriod} endDate
48 48 ${end_date}= convert_date_to_etender_format ${end_date}
49   - ${end_time}= Get From Dictionary ${tender_data.data.tenderPeriod} endDate
  49 + ${end_time}= Get From Dictionary ${prepared_tender_data.data.tenderPeriod} endDate
50 50 ${end_time}= convert_time_to_etender_format ${end_time}
51   - ${enquiry_end_date}= Get From Dictionary ${tender_data.data.enquiryPeriod} endDate
  51 + ${enquiry_end_date}= Get From Dictionary ${prepared_tender_data.data.enquiryPeriod} endDate
52 52 ${enquiry_end_date}= convert_date_to_etender_format ${enquiry_end_date}
53   - ${enquiry_end_time}= Get From Dictionary ${tender_data.data.enquiryPeriod} endDate
  53 + ${enquiry_end_time}= Get From Dictionary ${prepared_tender_data.data.enquiryPeriod} endDate
54 54 ${enquiry_end_time}= convert_time_to_etender_format ${enquiry_end_time}
55 55 Selenium2Library.Switch Browser ${ARGUMENTS[0]}
56 56 Wait Until Page Contains Мої закупівлі 100
... ... @@ -344,4 +344,4 @@ Set Multi Ids
344 344 отримати інформацію про questions[${question_id}].answer
345 345 відмітити на сторінці поле з тендера question answer jquery=tender-questions>div:eq(1)>div:last>
346 346 ${return_value}= Get Text jquery=tender-questions>div:eq(1)>div:last>
347   - [return] ${return_value}
\ No newline at end of file
  347 + [return] ${return_value}
... ...
... ... @@ -41,26 +41,26 @@ Pre Login
41 41 [Documentation]
42 42 ... ${ARGUMENTS[0]} == username
43 43 ... ${ARGUMENTS[1]} == tender_data
44   - ${tender_data}= Add_time_for_GUI_FrontEnds ${ARGUMENTS[1]}
45   - ${items}= Get From Dictionary ${tender_data.data} items
46   - ${title}= Get From Dictionary ${tender_data.data} title
47   - ${description}= Get From Dictionary ${tender_data.data} description
48   - ${budget}= Get From Dictionary ${tender_data.data.value} amount
49   - ${step_rate}= Get From Dictionary ${tender_data.data.minimalStep} amount
50   - ${items_description}= Get From Dictionary ${tender_data.data} description
  44 + ${prepared_tender_data}= Add_data_for_GUI_FrontEnds ${ARGUMENTS[1]}
  45 + ${items}= Get From Dictionary ${prepared_tender_data.data} items
  46 + ${title}= Get From Dictionary ${prepared_tender_data.data} title
  47 + ${description}= Get From Dictionary ${prepared_tender_data.data} description
  48 + ${budget}= Get From Dictionary ${prepared_tender_data.data.value} amount
  49 + ${step_rate}= Get From Dictionary ${prepared_tender_data.data.minimalStep} amount
  50 + ${items_description}= Get From Dictionary ${prepared_tender_data.data} description
51 51 ${quantity}= Get From Dictionary ${items[0]} quantity
52   - ${countryName}= Get From Dictionary ${tender_data.data.procuringEntity.address} countryName
  52 + ${countryName}= Get From Dictionary ${prepared_tender_data.data.procuringEntity.address} countryName
53 53 ${delivery_end_date}= Get From Dictionary ${items[0].deliveryDate} endDate
54 54 ${delivery_end_date}= convert_date_to_slash_format ${delivery_end_date}
55   - ${cpv}= Get From Dictionary ${items[0].classification} description_ua
  55 + ${cpv}= Convert To String Картонки
56 56 ${cpv_id}= Get From Dictionary ${items[0].classification} id
57 57 ${cpv_id1}= Replace String ${cpv_id} - _
58 58 ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description
59 59 ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id
60 60 ${dkpp_id1}= Replace String ${dkpp_id} - _
61   - ${enquiry_end_date}= Get From Dictionary ${tender_data.data.enquiryPeriod} endDate
  61 + ${enquiry_end_date}= Get From Dictionary ${prepared_tender_data.data.enquiryPeriod} endDate
62 62 ${enquiry_end_date}= convert_date_to_slash_format ${enquiry_end_date}
63   - ${end_date}= Get From Dictionary ${tender_data.data.tenderPeriod} endDate
  63 + ${end_date}= Get From Dictionary ${prepared_tender_data.data.tenderPeriod} endDate
64 64 ${end_date}= convert_date_to_slash_format ${end_date}
65 65
66 66 Selenium2Library.Switch Browser ${ARGUMENTS[0]}
... ... @@ -191,15 +191,56 @@ Set Multi Ids
191 191 ${current_location}= Get Location
192 192 Run keyword if '${BROKERS['${USERS.users['${username}'].broker}'].url}/#/tenderDetailes/${ARGUMENTS[2]}'=='${current_location}' Reload Page
193 193 Go to ${BROKERS['${USERS.users['${username}'].broker}'].url}
194   - Wait Until Page Contains E-TENDER - центр електронної торгівлі 10
195   - sleep 1
196   - Input Text jquery=input[ng-change='search()'] ${ARGUMENTS[1]}
197   - Click Link jquery=a[ng-click='search()']
198   - sleep 2
199   - ${last_note_id}= Add pointy note jquery=a[href^="#/tenderDetailes"] Found tender with tenderID "${ARGUMENTS[1]}" width=200 position=bottom
200   - sleep 1
201   - Remove element ${last_note_id}
202   - Click Link jquery=a[href^="#/tenderDetailes"]
  194 + Wait Until Page Contains Держзакупівлі.онлайн 10
  195 +# sleep 1
  196 + Click Element xpath=//a[text()='Закупівлі']
  197 + Click Element xpath=//select[@name='filter[object]']/option[@value='tenderID']
  198 + Input text xpath=//input[@name='filter[search]'] ${ARGUMENTS[1]}
  199 + Click Element xpath=//button[@class='btn'][./text()='Пошук']
203 200 Wait Until Page Contains ${ARGUMENTS[1]} 10
204 201 sleep 1
205   - Capture Page Screenshot
\ No newline at end of file
  202 + Capture Page Screenshot
  203 +
  204 +Задати питання
  205 + [Arguments] @{ARGUMENTS}
  206 + [Documentation]
  207 + ... ${ARGUMENTS[0]} == username
  208 + ... ${ARGUMENTS[1]} == tenderId
  209 + ... ${ARGUMENTS[2]} == id
  210 + ${title}= Get From Dictionary ${ARGUMENTS[2].data} title
  211 + ${description}= Get From Dictionary ${ARGUMENTS[2].data} description
  212 +
  213 + Selenium2Library.Switch Browser ${ARGUMENTS[0]}
  214 + netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID}
  215 +
  216 + Click Element xpath=//a[@class='reverse tenderLink']
  217 + Wait Until Page Contains Element xpath=//a[@class='reverse openCPart'][span[text()='Обговорення']] 20
  218 + Click Element xpath=//a[@class='reverse openCPart'][span[text()='Обговорення']]
  219 + Wait Until Page Contains Element name=title
  220 + Input text name=title ${title}
  221 + Input text xpath=//textarea[@name='description'] ${description}
  222 + Click Element xpath=//div[contains(@class, 'buttons')]//button[@type='submit']
  223 + Wait Until Page Contains ${title} 30
  224 + Capture Page Screenshot
  225 +
  226 +Відповісти на питання
  227 + [Arguments] @{ARGUMENTS}
  228 + [Documentation]
  229 + ... ${ARGUMENTS[0]} = username
  230 + ... ${ARGUMENTS[1]} = ${INTERNAL_TENDER_ID}
  231 + ... ${ARGUMENTS[2]} = 0
  232 + ... ${ARGUMENTS[3]} = answer_data
  233 +
  234 + ${answer}= Get From Dictionary ${ARGUMENTS[3].data} answer
  235 + Selenium2Library.Switch Browser ${ARGUMENTS[0]}
  236 + netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID}
  237 +
  238 + Click Element xpath=//a[@class='reverse tenderLink']
  239 + Click Element xpath=//a[@class='reverse openCPart'][span[text()='Обговорення']]
  240 + Input text xpath=//textarea[@name='answer'] ${answer}
  241 + Click Element xpath=//div[1]/div[3]/form/div/table/tbody/tr/td[2]/button
  242 + Wait Until Page Contains ${answer} 30
  243 + Capture Page Screenshot
  244 +
  245 +# KEYWORD: BuiltIn.Log ${TENDER}
  246 +# 18:11:57.979 INFO {u'LAST_MODIFICATION_DATE': '2015-08-11 18:11:57.974', u'TENDER_UAID': u'UA-2015-08-11-000050'}
\ No newline at end of file
... ...
... ... @@ -15,7 +15,6 @@ ${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}
... ... @@ -31,18 +30,18 @@ ${locator.tenderId} jquery=h3
31 30 [Arguments] @{ARGUMENTS}
32 31 [Documentation]
33 32 ... ${ARGUMENTS[0]} == username
34   - ... ${ARGUMENTS[1]} == tender_data
35   -
  33 + ... ${ARGUMENTS[1]} == initial_tender_data
36 34 ## 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
  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 + ${start_date}= Get From Dictionary ${prepared_tender_data.data.tenderPeriod} startDate
  42 + ${end_date}= Get From Dictionary ${prepared_tender_data.data.tenderPeriod} endDate
  43 + ${enquiry_start_date}= Get From Dictionary ${prepared_tender_data.data.enquiryPeriod} startDate
  44 + ${enquiry_end_date}= Get From Dictionary ${prepared_tender_data.data.enquiryPeriod} endDate
46 45
47 46 Selenium2Library.Switch Browser ${ARGUMENTS[0]}
48 47 Go To ${USERS.users['${username}'].homepage}
... ... @@ -109,7 +108,7 @@ Set datetime
109 108 ## Get values for item
110 109 ${items_description}= Get From Dictionary ${ARGUMENTS[0]} description
111 110 ${quantity}= Get From Dictionary ${ARGUMENTS[0]} quantity
112   - ${cpv}= Get From Dictionary ${ARGUMENTS[0].classification} description_ua
  111 + ${cpv}= Convert To String Картонки
113 112 ${dkpp_desc}= Get From Dictionary ${ARGUMENTS[0].additionalClassifications[0]} description
114 113 ${dkpp_id}= Get From Dictionary ${ARGUMENTS[0].additionalClassifications[0]} id
115 114 ${unit}= Get From Dictionary ${ARGUMENTS[0].unit} name
... ... @@ -161,10 +160,6 @@ Set datetime
161 160
162 161
163 162
164   -
165   -
166   -
167   -
168 163 #### Not reworked for Newtend ####
169 164
170 165 Oтримати internal id по UAid
... ...
... ... @@ -9,11 +9,11 @@ ${question_id} 0
9 9 *** Keywords ***
10 10 отримати internal id по UAid
11 11 [Arguments] @{ARGUMENTS}
12   - [Documentation]
  12 + [Documentation]
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
... ...
... ... @@ -32,23 +32,23 @@ ${telephone} +380976535447
32 32 [Documentation]
33 33 ... ${ARGUMENTS[0]} == username
34 34 ... ${ARGUMENTS[1]} == tender_data
35   - ${tender_data}= Add_time_for_GUI_FrontEnds ${ARGUMENTS[1]}
36   - ${items}= Get From Dictionary ${tender_data.data} items
37   - ${title}= Get From Dictionary ${tender_data.data} title
38   - ${description}= Get From Dictionary ${tender_data.data} description
39   - ${budget}= Get From Dictionary ${tender_data.data.value} amount
40   - ${step_rate}= Get From Dictionary ${tender_data.data.minimalStep} amount
41   - ${countryName}= Get From Dictionary ${tender_data.data.procuringEntity.address} countryName
  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
42 42 ${delivery_end_date}= Get From Dictionary ${items[0].deliveryDate} endDate
43 43 ${delivery_end_date}= convert_date_to_prom_format ${delivery_end_date}
44   - ${cpv}= Get From Dictionary ${items[0].classification} description_ua
  44 + ${cpv}= Convert To String "Картонки"
45 45 ${cpv_id}= Get From Dictionary ${items[0].classification} id
46 46 ${cpv_id_1}= Get Substring ${cpv_id} 0 3
47 47 ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description
48 48 ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id
49 49 ${code}= Get From Dictionary ${items[0].unit} code
50 50 ${quantity}= Get From Dictionary ${items[0]} quantity
51   - ${name}= Get From Dictionary ${tender_data.data.procuringEntity.contactPoint} name
  51 + ${name}= Get From Dictionary ${prepared_tender_data.data.procuringEntity.contactPoint} name
52 52
53 53 Selenium2Library.Switch Browser ${ARGUMENTS[0]}
54 54 Wait Until Page Contains Element xpath=//*[contains(@class, 'ui-button-text ui-c')][./text()='Нова закупівля'] 10
... ...
... ... @@ -90,17 +90,17 @@ users:
90 90 login: ovramet.s@gmail.com
91 91 password: Password1
92 92 browser: firefox
93   - position: [0, 450]
94   - size: [640, 450]
95   - Newtend_Provider1:
96   - broker: Newtend
97   - username: Newtendtest
98   - homepage: "http://dev23.newtend.com/openprocurement/tenders"
99   - login: qtest@mailinator.com
100   - password: 123123
  93 + position: [0, 0]
  94 + size: [920, 580]
  95 + Netcast_Provider1:
  96 + broker: Netcast
  97 + username: Netcasttest
  98 + homepage: "http://dz2.byustudio.in.ua"
  99 + login: halyna.khimka@gmail.com
  100 + password: JHO5VUp5n
101 101 browser: firefox
102   - position: [0, 450]
103   - size: [640, 450]
  102 + position: [0, 900]
  103 + size: [920, 580]
104 104 Publicbid_Owner:
105 105 broker: Publicbid
106 106 username: Publicbid
... ...
... ... @@ -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 {
... ...
1   -#!/usr/bin/env python
2 1 # -*- coding: utf-8 -
3 2 import os
4 3 from munch import munchify, Munch, fromYAML
... ... @@ -27,21 +26,6 @@ TIMEZONE = timezone('Europe/Kiev')
27 26 def get_date():
28 27 return datetime.now().isoformat()
29 28
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 29 def change_state(arguments):
46 30 try:
47 31 if arguments[0] == "shouldfail":
... ... @@ -94,7 +78,6 @@ def load_initial_data_from(file_name):
94 78 elif file_name.endswith(".yaml"):
95 79 return fromYAML(file_obj)
96 80
97   -
98 81 def prepare_test_tender_data(period_interval=2, mode='single'):
99 82 if mode == 'single':
100 83 return munchify({'data': test_tender_data(period_interval=period_interval)})
... ... @@ -102,21 +85,16 @@ def prepare_test_tender_data(period_interval=2, mode='single'):
102 85 return munchify({'data': test_tender_data_multiple_lots(period_interval=period_interval)})
103 86 raise ValueError('A very specific bad thing happened')
104 87
105   -
106 88 def run_keyword_and_ignore_keyword_definations(name, *args):
107 89 """Runs the given keyword with given arguments and returns the status as a Boolean value.
108   -
109 90 This keyword returns `True` if the keyword that is executed succeeds and
110 91 `False` if it fails. This is useful, for example, in combination with
111 92 `Run Keyword If`. If you are interested in the error message or return
112 93 value, use `Run Keyword And Ignore Error` instead.
113   -
114 94 The keyword name and arguments work as in `Run Keyword`.
115   -
116 95 Example:
117 96 | ${passed} = | `Run Keyword And Return Status` | Keyword | args |
118 97 | `Run Keyword If` | ${passed} | Another keyword |
119   -
120 98 New in Robot Framework 2.7.6.
121 99 """
122 100 try:
... ... @@ -126,7 +104,6 @@ def run_keyword_and_ignore_keyword_definations(name, *args):
126 104 return "FAIL", ""
127 105 return status, _
128 106
129   -
130 107 def set_tender_periods(tender):
131 108 now = datetime.now()
132 109 tender.data.enquiryPeriod.endDate = (now + timedelta(minutes=2)).isoformat()
... ... @@ -134,17 +111,14 @@ def set_tender_periods(tender):
134 111 tender.data.tenderPeriod.endDate = (now + timedelta(minutes=4)).isoformat()
135 112 return tender
136 113
137   -
138 114 def set_access_key(tender, access_token):
139 115 tender.access = munchify({"token": access_token})
140 116 return tender
141 117
142   -
143 118 def set_to_object(obj, attribute, value):
144 119 xpathset(obj, attribute.replace('.', '/'), value)
145 120 return obj
146 121
147   -
148 122 def get_from_object(obj, attribute):
149 123 """Gets data from a dictionary using a dotted accessor-string"""
150 124 jsonpath_expr = parse_path(attribute)
... ... @@ -153,7 +127,6 @@ def get_from_object(obj, attribute):
153 127 return return_list[0]
154 128 return None
155 129
156   -
157 130 def wait_to_date(date_stamp):
158 131 date = parse(date_stamp)
159 132 LOGGER.log_message(Message("date: {}".format(date.isoformat()), "INFO"))
... ... @@ -164,6 +137,22 @@ def wait_to_date(date_stamp):
164 137 if wait_seconds < 0:
165 138 return 0
166 139 return wait_seconds
  140 +#!/usr/bin/env python
  141 +
  142 +def convert_date_to_slash_format(isodate):
  143 + iso_dt=parse_date(isodate)
  144 + date_string = iso_dt.strftime("%d/%m/%Y")
  145 + return date_string
  146 +
  147 +def convert_date_to_etender_format(isodate):
  148 + iso_dt=parse_date(isodate)
  149 + date_string = iso_dt.strftime("%d-%m-%Y")
  150 + return date_string
  151 +
  152 +def convert_time_to_etender_format(isodate):
  153 + iso_dt=parse_date(isodate)
  154 + time_string = iso_dt.strftime("%H:%M")
  155 + return time_string
167 156
168 157 def newtend_date_picker_index(isodate):
169 158 now = datetime.today()
... ... @@ -177,10 +166,28 @@ def newtend_date_picker_index(isodate):
177 166 mod = calendar.monthrange(now.year, now.month)[1] + mod
178 167 return mod + iso_dt.day
179 168
180   -def Add_time_for_GUI_FrontEnds(INITIAL_TENDER_DATA):
  169 +def Add_data_for_GUI_FrontEnds(INITIAL_TENDER_DATA):
181 170 now = datetime.now()
182 171 INITIAL_TENDER_DATA.data.enquiryPeriod['startDate'] = (now + timedelta(minutes=2)).isoformat()
183 172 INITIAL_TENDER_DATA.data.enquiryPeriod['endDate'] = (now + timedelta(minutes=3)).isoformat()
184 173 INITIAL_TENDER_DATA.data.tenderPeriod['startDate'] = (now + timedelta(minutes=4)).isoformat()
185 174 INITIAL_TENDER_DATA.data.tenderPeriod['endDate'] = (now + timedelta(minutes=5)).isoformat()
  175 +
  176 +##len(dict.items()[0])
  177 +##len(dict[key])
  178 +
  179 +
  180 + #LOGGER.log_message(Message("itemsss: {}".format(INITIAL_TENDER_DATA.data.items[0]), "INFO"))
  181 +
  182 + #item_len = len(INITIAL_TENDER_DATA.data.items)
  183 +
  184 + #LOGGER.log_message(Message("item_len: {}".format(item_len), "INFO"))
  185 +
  186 + #for i in range(len(INITIAL_TENDER_DATA.data.items)):
  187 + #dict.update(INITIAL_TENDER_DATA.data.items.classification['description_ua'] = "Картонки"
  188 +# INITIAL_TENDER_DATA.data.items.classification.update({'description_ua': 'Картонки'})
  189 +
  190 +# for itm in INITIAL_TENDER_DATA.data.items:
  191 +# itm.classification['description_ua'] = u"Картонки"
  192 +
186 193 return INITIAL_TENDER_DATA
\ No newline at end of file
... ...
... ... @@ -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