Commit 59886f6d1ab2552a9de1a2c8d96b959323117f51

Authored by biviktorqc
2 parents 9eba9c34 0ebd3cae

Merge branch 'pc2' into pc2y

Conflicts:
	op_robot_tests/tests_files/brokers/publicbid.robot
... ... @@ -117,6 +117,16 @@ Set Multi Ids
117 117 ${id}= Get Text xpath=//div[contains(@class, "panel-heading")]
118 118 ${Ids}= Create List ${tender_UAid} ${id}
119 119
  120 +Oтримати internal id по UAid
  121 + [Arguments] @{ARGUMENTS}
  122 + [Documentation]
  123 + ... ${ARGUMENTS[0]} == username
  124 + ... ${ARGUMENTS[1]} == ${tender_UAid}
  125 + etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]}
  126 + ${current_location}= Get Location
  127 + ${tender_id}= Fetch From Right ${current_location} /
  128 + [return] ${tender_id}
  129 +
120 130 Додати предмет
121 131 [Arguments] @{ARGUMENTS}
122 132 [Documentation]
... ...
... ... @@ -186,10 +186,7 @@ Set Multi Ids
186 186 [Documentation]
187 187 ... ${ARGUMENTS[0]} == username
188 188 ... ${ARGUMENTS[1]} == tenderId
189   - ... ${ARGUMENTS[2]} == id
190 189 Switch browser ${ARGUMENTS[0]}
191   - ${current_location}= Get Location
192   - Run keyword if '${BROKERS['${USERS.users['${username}'].broker}'].url}/#/tenderDetailes/${ARGUMENTS[2]}'=='${current_location}' Reload Page
193 190 Go to ${BROKERS['${USERS.users['${username}'].broker}'].url}
194 191 Wait Until Page Contains Держзакупівлі.онлайн 10
195 192 # sleep 1
... ... @@ -205,13 +202,13 @@ Set Multi Ids
205 202 [Arguments] @{ARGUMENTS}
206 203 [Documentation]
207 204 ... ${ARGUMENTS[0]} == username
208   - ... ${ARGUMENTS[1]} == tenderId
209   - ... ${ARGUMENTS[2]} == id
  205 + ... ${ARGUMENTS[1]} == tenderUaId
  206 + ... ${ARGUMENTS[2]} == questionId
210 207 ${title}= Get From Dictionary ${ARGUMENTS[2].data} title
211 208 ${description}= Get From Dictionary ${ARGUMENTS[2].data} description
212 209
213 210 Selenium2Library.Switch Browser ${ARGUMENTS[0]}
214   - netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID}
  211 + netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]}
215 212
216 213 Click Element xpath=//a[@class='reverse tenderLink']
217 214 Wait Until Page Contains Element xpath=//a[@class='reverse openCPart'][span[text()='Обговорення']] 20
... ... @@ -227,20 +224,17 @@ Set Multi Ids
227 224 [Arguments] @{ARGUMENTS}
228 225 [Documentation]
229 226 ... ${ARGUMENTS[0]} = username
230   - ... ${ARGUMENTS[1]} = ${INTERNAL_TENDER_ID}
  227 + ... ${ARGUMENTS[1]} = tenderUaId
231 228 ... ${ARGUMENTS[2]} = 0
232 229 ... ${ARGUMENTS[3]} = answer_data
233 230
234 231 ${answer}= Get From Dictionary ${ARGUMENTS[3].data} answer
235 232 Selenium2Library.Switch Browser ${ARGUMENTS[0]}
236   - netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID}
  233 + netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]}
237 234
238 235 Click Element xpath=//a[@class='reverse tenderLink']
239 236 Click Element xpath=//a[@class='reverse openCPart'][span[text()='Обговорення']]
240 237 Input text xpath=//textarea[@name='answer'] ${answer}
241 238 Click Element xpath=//div[1]/div[3]/form/div/table/tbody/tr/td[2]/button
242 239 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
  240 + Capture Page Screenshot
\ No newline at end of file
... ...
... ... @@ -9,7 +9,7 @@ ${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}
... ...
... ... @@ -4,12 +4,11 @@ Library String
4 4 Library DateTime
5 5
6 6 *** Variables ***
7   -##Використовую такий шлях у кожного буде мінятись /yboi/. Міняйте на сві шлях до файлу
8   -#${file_path} /home/yboi/openprocurement.robottests.buildout/Document.docx
9   -${file_path} /home/yboi/openprocurement.robottests.buildout/Document.docx
  7 +${file_path} local_path_to_file("TestDocument.docx")
10 8 ${mail} test@mail.com
11 9 ${telephone} +380976535447
12 10
  11 +
13 12 *** Keywords ***
14 13 Підготувати клієнт для користувача
15 14 [Arguments] @{ARGUMENTS}
... ...
... ... @@ -35,7 +35,7 @@ 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:
... ... @@ -81,9 +81,9 @@ users:
81 81 homepage: "http://dev23.newtend.com/openprocurement/#/home/page/1"
82 82 login: openprocurement@mailinator.com
83 83 password: 123123
84   - browser: firefox
  84 + browser: chrome
85 85 position: [0, 0]
86   - size: [640, 450]
  86 + size: [1100, 1000]
87 87 Netcast_Owner:
88 88 broker: Netcast
89 89 username: Netcasttest
... ... @@ -99,7 +99,7 @@ users:
99 99 homepage: "http://dz2.byustudio.in.ua"
100 100 login: halyna.khimka@gmail.com
101 101 password: JHO5VUp5n
102   - browser: firefox
  102 + browser: chrome
103 103 position: [0, 900]
104 104 size: [920, 580]
105 105 Publicbid_Owner:
... ... @@ -117,12 +117,12 @@ users:
117 117 homepage: "http://dev23.newtend.com/openprocurement/tenders"
118 118 login: openprocboss@mailinator.com
119 119 password: 123123
120   - browser: firefox
  120 + browser: chrome
121 121 position: [700, 0]
122 122 size: [640, 450]
123 123 Newtend_Viewer:
124 124 broker: Newtend
125 125 username: Newtendtest
126   - browser: firefox
  126 + browser: chrome
127 127 position: [0, 0]
128 128 size: [640, 450]
\ No newline at end of file
... ...
  1 +#!/usr/bin/env python
1 2 # -*- coding: utf-8 -
2 3 import os
3 4 from munch import munchify, Munch, fromYAML
... ... @@ -137,7 +138,6 @@ def wait_to_date(date_stamp):
137 138 if wait_seconds < 0:
138 139 return 0
139 140 return wait_seconds
140   -#!/usr/bin/env python
141 141
142 142 def convert_date_to_slash_format(isodate):
143 143 iso_dt=parse_date(isodate)
... ... @@ -172,22 +172,9 @@ def Add_data_for_GUI_FrontEnds(INITIAL_TENDER_DATA):
172 172 INITIAL_TENDER_DATA.data.enquiryPeriod['endDate'] = (now + timedelta(minutes=3)).isoformat()
173 173 INITIAL_TENDER_DATA.data.tenderPeriod['startDate'] = (now + timedelta(minutes=4)).isoformat()
174 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   -
193   - return INITIAL_TENDER_DATA
\ No newline at end of file
  175 + return INITIAL_TENDER_DATA
  176 +
  177 +def local_path_to_file( file_name ):
  178 + path = os.getcwd()
  179 + path = path.split("brokers", 1)[0] + "documents/" + file_name
  180 + return path
... ...
Please register or login to post a comment