Showing
7 changed files
with
251 additions
and
87 deletions
... | ... | @@ -7,10 +7,6 @@ Library DateTime |
7 | 7 | ${locator.tenderId} jquery=h3 |
8 | 8 | |
9 | 9 | *** Keywords *** |
10 | -Підготувати дані для оголошення тендера | |
11 | - ${INITIAL_TENDER_DATA}= prepare_test_tender_data | |
12 | - [return] ${INITIAL_TENDER_DATA} | |
13 | - | |
14 | 10 | Підготувати клієнт для користувача |
15 | 11 | [Arguments] @{ARGUMENTS} |
16 | 12 | [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо |
... | ... | @@ -18,7 +14,6 @@ ${locator.tenderId} jquery=h3 |
18 | 14 | Open Browser ${USERS.users['${ARGUMENTS[0]}'].homepage} ${USERS.users['${username}'].browser} alias=${ARGUMENTS[0]} |
19 | 15 | Set Window Size @{USERS.users['${ARGUMENTS[0]}'].size} |
20 | 16 | Set Window Position @{USERS.users['${ARGUMENTS[0]}'].position} |
21 | - | |
22 | 17 | # login |
23 | 18 | Wait Until Page Contains Element id=inputUsername 100 |
24 | 19 | Input text id=inputUsername ${USERS.users['${username}'].login} |
... | ... | @@ -31,31 +26,30 @@ ${locator.tenderId} jquery=h3 |
31 | 26 | [Documentation] |
32 | 27 | ... ${ARGUMENTS[0]} == username |
33 | 28 | ... ${ARGUMENTS[1]} == tender_data |
34 | - | |
35 | - ${items}= Get From Dictionary ${ARGUMENTS[1].data} items | |
36 | - ${title}= Get From Dictionary ${ARGUMENTS[1].data} title | |
37 | - ${description}= Get From Dictionary ${ARGUMENTS[1].data} description | |
38 | - ${budget}= Get From Dictionary ${ARGUMENTS[1].data.value} amount | |
39 | - ${step_rate}= Get From Dictionary ${ARGUMENTS[1].data.minimalStep} amount | |
40 | - ${items_description}= Get From Dictionary ${ARGUMENTS[1].data} description | |
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 | |
41 | 36 | ${quantity}= Get From Dictionary ${items[0]} quantity |
42 | 37 | ${cpv}= Get From Dictionary ${items[0].classification} id |
43 | 38 | ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description |
44 | 39 | ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id |
45 | 40 | ${unit}= Get From Dictionary ${items[0].unit} name |
46 | - ${start_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} startDate | |
41 | + ${start_date}= Get From Dictionary ${tender_data.data.tenderPeriod} startDate | |
47 | 42 | ${start_date}= convert_date_to_etender_format ${start_date} |
48 | - ${start_time}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} startDate | |
43 | + ${start_time}= Get From Dictionary ${tender_data.data.tenderPeriod} startDate | |
49 | 44 | ${start_time}= convert_time_to_etender_format ${start_time} |
50 | - ${end_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate | |
45 | + ${end_date}= Get From Dictionary ${tender_data.data.tenderPeriod} endDate | |
51 | 46 | ${end_date}= convert_date_to_etender_format ${end_date} |
52 | - ${end_time}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate | |
47 | + ${end_time}= Get From Dictionary ${tender_data.data.tenderPeriod} endDate | |
53 | 48 | ${end_time}= convert_time_to_etender_format ${end_time} |
54 | - ${enquiry_end_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate | |
49 | + ${enquiry_end_date}= Get From Dictionary ${tender_data.data.enquiryPeriod} endDate | |
55 | 50 | ${enquiry_end_date}= convert_date_to_etender_format ${enquiry_end_date} |
56 | - ${enquiry_end_time}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate | |
51 | + ${enquiry_end_time}= Get From Dictionary ${tender_data.data.enquiryPeriod} endDate | |
57 | 52 | ${enquiry_end_time}= convert_time_to_etender_format ${enquiry_end_time} |
58 | - | |
59 | 53 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} |
60 | 54 | Wait Until Page Contains Мої закупівлі 100 |
61 | 55 | Click Element xpath=//a[contains(@class, 'ng-binding')][./text()='Мої закупівлі'] |
... | ... | @@ -97,10 +91,18 @@ ${locator.tenderId} jquery=h3 |
97 | 91 | ${tender_UAid}= Wait Until Keyword Succeeds 240sec 2sec get tender UAid |
98 | 92 | ### harcode Idis bacause issues on the E-tender side, to remove, 1 line: |
99 | 93 | ${tender_UAid}= Convert To String UA-2015-08-03-000025 |
100 | - ${id}= Oтримати internal id по UAid ${ARGUMENTS[0]} ${tender_UAid} | |
101 | - ${Ids} Create List ${tender_UAid} ${id} | |
94 | + ${Ids}= Convert To String ${tender_UAid} | |
95 | + Run keyword if '${mode}' == 'multi' Set Multi Ids ${ARGUMENTS[0]} ${tender_UAid} | |
102 | 96 | [return] ${Ids} |
103 | 97 | |
98 | +Set Multi Ids | |
99 | + [Arguments] @{ARGUMENTS} | |
100 | + [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 | + | |
104 | 106 | get tender UAid |
105 | 107 | ${tender_UAid}= Get Text xpath=//div[contains(@class, "panel-heading")] |
106 | 108 | ${tender_UAid}= Get Substring ${tender_UAid} 7 27 |
... | ... | @@ -109,13 +111,12 @@ Oтримати internal id по UAid |
109 | 111 | [Arguments] @{ARGUMENTS} |
110 | 112 | [Documentation] |
111 | 113 | ... ${ARGUMENTS[0]} == username |
112 | - ... ${ARGUMENTS[1]} == tenderid | |
114 | + ... ${ARGUMENTS[1]} == ${tender_UAid} | |
113 | 115 | etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} |
114 | 116 | ${current_location}= Get Location |
115 | 117 | ${tender_id}= Fetch From Right ${current_location} / |
116 | 118 | ## harcode Idis bacause issues on the E-tender side, to remove, 1 line: |
117 | 119 | ${tender_id}= Convert To String 94ffe180019d459787aafe290cd300e2 |
118 | - log ${tender_id} | |
119 | 120 | [return] ${tender_id} |
120 | 121 | |
121 | 122 | Додати предмет |
... | ... | @@ -161,8 +162,7 @@ Oтримати internal id по UAid |
161 | 162 | [Arguments] @{ARGUMENTS} |
162 | 163 | [Documentation] |
163 | 164 | ... ${ARGUMENTS[0]} == username |
164 | - ... ${ARGUMENTS[1]} == tenderId | |
165 | - | |
165 | + ... ${ARGUMENTS[1]} == ${TENDER_UAID} | |
166 | 166 | Switch browser ${ARGUMENTS[0]} |
167 | 167 | Go to ${BROKERS['${USERS.users['${username}'].broker}'].url} |
168 | 168 | Wait Until Page Contains Список закупівель 10 |
... | ... | @@ -179,7 +179,7 @@ Oтримати internal id по UAid |
179 | 179 | [Arguments] @{ARGUMENTS} |
180 | 180 | [Documentation] |
181 | 181 | ... ${ARGUMENTS[0]} == username |
182 | - ... ${ARGUMENTS[1]} == ${INTERNAL_TENDER_ID} | |
182 | + ... ${ARGUMENTS[1]} == ${TENDER_UAID} | |
183 | 183 | ... ${ARGUMENTS[2]} == test_bid_data |
184 | 184 | |
185 | 185 | ${bid}= Get From Dictionary ${ARGUMENTS[2].data.value} amount |
... | ... | @@ -193,14 +193,14 @@ Oтримати internal id по UAid |
193 | 193 | [Arguments] @{ARGUMENTS} |
194 | 194 | [Documentation] |
195 | 195 | ... ${ARGUMENTS[0]} = username |
196 | - ... ${ARGUMENTS[1]} = ${INTERNAL_TENDER_ID} | |
196 | + ... ${ARGUMENTS[1]} = ${TENDER_UAID} | |
197 | 197 | ... ${ARGUMENTS[2]} = question_data |
198 | 198 | |
199 | 199 | ${title}= Get From Dictionary ${ARGUMENTS[2].data} title |
200 | 200 | ${description}= Get From Dictionary ${ARGUMENTS[2].data} description |
201 | 201 | |
202 | 202 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} |
203 | - etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID} | |
203 | + etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
204 | 204 | |
205 | 205 | Wait Until Page Contains Element jquery=a[href^="#/addQuestion/"] 100 |
206 | 206 | Click Element jquery=a[href^="#/addQuestion/"] |
... | ... | @@ -213,14 +213,14 @@ Oтримати internal id по UAid |
213 | 213 | [Arguments] @{ARGUMENTS} |
214 | 214 | [Documentation] |
215 | 215 | ... ${ARGUMENTS[0]} = username |
216 | - ... ${ARGUMENTS[1]} = ${INTERNAL_TENDER_ID} | |
216 | + ... ${ARGUMENTS[1]} = ${TENDER_UAID} | |
217 | 217 | ... ${ARGUMENTS[2]} = 0 |
218 | 218 | ... ${ARGUMENTS[3]} = answer_data |
219 | 219 | |
220 | 220 | ${answer}= Get From Dictionary ${ARGUMENTS[3].data} answer |
221 | 221 | |
222 | 222 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} |
223 | - etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID} | |
223 | + etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
224 | 224 | |
225 | 225 | Click Element xpath=//div[div/pre[1]]/div[1] |
226 | 226 | Input text xpath=//div[textarea]/textarea ${answer} | ... | ... |
... | ... | @@ -14,16 +14,11 @@ ${locator.tenderId} jquery=h3 |
14 | 14 | Open Browser ${BROKERS['${USERS.users['${ARGUMENTS[0]}'].broker}'].url} ${USERS.users['${ARGUMENTS[0]}'].browser} alias=${ARGUMENTS[0]} |
15 | 15 | Set Window Size @{USERS.users['${ARGUMENTS[0]}'].size} |
16 | 16 | Set Window Position @{USERS.users['${ARGUMENTS[0]}'].position} |
17 | - | |
18 | -# login | |
19 | -# Wait Until Page Contains Element name=siteLogin 100 | |
20 | -# Input text name=siteLogin ${BROKERS['${USERS.users['${username}'].broker}'].login} | |
21 | -# Input text name=sitePass ${BROKERS['${USERS.users['${username}'].broker}'].password} | |
22 | -# Click Button xpath=.//*[@id='table1']/tbody/tr/td/form/p[3]/input | |
17 | + Run Keyword And Ignore Error Pre Login ${ARGUMENTS[0]} | |
23 | 18 | |
24 | 19 | Wait Until Page Contains Element jquery=a[href="/cabinet"] |
25 | 20 | Click Element jquery=a[href="/cabinet"] |
26 | - Wait Until Page Contains Element name=email 100 | |
21 | + Wait Until Page Contains Element name=email 10 | |
27 | 22 | Input text name=email mail |
28 | 23 | Sleep 1 |
29 | 24 | Input text name=email ${USERS.users['${username}'].login} |
... | ... | @@ -32,20 +27,29 @@ ${locator.tenderId} jquery=h3 |
32 | 27 | Wait Until Page Contains Element xpath=//button[contains(@class, 'btn')][./text()='Вхід в кабінет'] 100 |
33 | 28 | Click Element xpath=//button[contains(@class, 'btn')][./text()='Вхід в кабінет'] |
34 | 29 | |
30 | +Pre Login | |
31 | + [Arguments] @{ARGUMENTS} | |
32 | + [Documentation] | |
33 | + ... ${ARGUMENTS[0]} == username | |
34 | + Wait Until Page Contains Element name=siteLogin 10 | |
35 | + Input text name=siteLogin ${BROKERS['${USERS.users['${username}'].broker}'].login} | |
36 | + Input text name=sitePass ${BROKERS['${USERS.users['${username}'].broker}'].password} | |
37 | + Click Button xpath=.//*[@id='table1']/tbody/tr/td/form/p[3]/input | |
38 | + | |
35 | 39 | Створити тендер |
36 | 40 | [Arguments] @{ARGUMENTS} |
37 | 41 | [Documentation] |
38 | 42 | ... ${ARGUMENTS[0]} == username |
39 | 43 | ... ${ARGUMENTS[1]} == tender_data |
40 | - | |
41 | - ${items}= Get From Dictionary ${ARGUMENTS[1].data} items | |
42 | - ${title}= Get From Dictionary ${ARGUMENTS[1].data} title | |
43 | - ${description}= Get From Dictionary ${ARGUMENTS[1].data} description | |
44 | - ${budget}= Get From Dictionary ${ARGUMENTS[1].data.value} amount | |
45 | - ${step_rate}= Get From Dictionary ${ARGUMENTS[1].data.minimalStep} amount | |
46 | - ${items_description}= Get From Dictionary ${ARGUMENTS[1].data} description | |
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 | |
47 | 51 | ${quantity}= Get From Dictionary ${items[0]} quantity |
48 | - ${countryName}= Get From Dictionary ${ARGUMENTS[1].data.procuringEntity.address} countryName | |
52 | + ${countryName}= Get From Dictionary ${tender_data.data.procuringEntity.address} countryName | |
49 | 53 | ${delivery_end_date}= Get From Dictionary ${items[0].deliveryDate} endDate |
50 | 54 | ${delivery_end_date}= convert_date_to_slash_format ${delivery_end_date} |
51 | 55 | ${cpv}= Get From Dictionary ${items[0].classification} description_ua |
... | ... | @@ -54,9 +58,9 @@ ${locator.tenderId} jquery=h3 |
54 | 58 | ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description |
55 | 59 | ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id |
56 | 60 | ${dkpp_id1}= Replace String ${dkpp_id} - _ |
57 | - ${enquiry_end_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate | |
61 | + ${enquiry_end_date}= Get From Dictionary ${tender_data.data.enquiryPeriod} endDate | |
58 | 62 | ${enquiry_end_date}= convert_date_to_slash_format ${enquiry_end_date} |
59 | - ${end_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate | |
63 | + ${end_date}= Get From Dictionary ${tender_data.data.tenderPeriod} endDate | |
60 | 64 | ${end_date}= convert_date_to_slash_format ${end_date} |
61 | 65 | |
62 | 66 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} |
... | ... | @@ -93,11 +97,18 @@ ${locator.tenderId} jquery=h3 |
93 | 97 | Wait Until Page Contains Element xpath=//a[contains(@class, 'button pubBtn')] 100 |
94 | 98 | Click Element xpath=//a[contains(@class, 'button pubBtn')] |
95 | 99 | Wait Until Page Contains Тендер опубліковано 100 |
96 | - ${tender_UAid}= Get Text xpath=//*/section[6]/table/tbody/tr[2]/td[2] | |
97 | - ${id}= Get Text xpath=//*/section[6]/table/tbody/tr[1]/td[2] | |
98 | - ${Ids} Create List ${tender_UAid} ${id} | |
100 | + ${tender_UAid}= Get Text xpath=//*/section[6]/table/tbody/tr[2]/td[2] | |
101 | + ${Ids}= Convert To String ${tender_UAid} | |
102 | + Run keyword if '${mode}' == 'multi' Set Multi Ids ${tender_UAid} | |
99 | 103 | [return] ${Ids} |
100 | 104 | |
105 | +Set Multi Ids | |
106 | + [Arguments] @{ARGUMENTS} | |
107 | + [Documentation] | |
108 | + ... ${ARGUMENTS[1]} == ${tender_UAid} | |
109 | + ${id}= Get Text xpath=//*/section[6]/table/tbody/tr[1]/td[2] | |
110 | + ${Ids}= Create List ${tender_UAid} ${id} | |
111 | + | |
101 | 112 | Додати предмет |
102 | 113 | [Arguments] @{ARGUMENTS} |
103 | 114 | [Documentation] | ... | ... |
... | ... | @@ -70,11 +70,17 @@ ${locator.tenderId} jquery=h3 |
70 | 70 | # Get Ids |
71 | 71 | Wait Until Page Contains Element xpath=//div[@class="title"] 30 |
72 | 72 | ${tender_UAid}= Get Text xpath=//div[@class="title"] |
73 | - ${current_location}= Get Location | |
74 | - ${tender_id}= Get Substring ${current_location} -41 -9 | |
75 | - ${Ids} Create List ${tender_UAid} ${tender_id} | |
73 | + ${Ids}= Convert To String ${tender_UAid} | |
74 | + Run keyword if '${mode}' == 'multi' Set Multi Ids ${tender_UAid} | |
76 | 75 | [return] ${Ids} |
77 | 76 | |
77 | +Set Multi Ids | |
78 | + [Arguments] @{ARGUMENTS} | |
79 | + [Documentation] | |
80 | + ... ${ARGUMENTS[0]} == ${tender_UAid} | |
81 | + ${current_location}= Get Location | |
82 | + ${id}= Get Substring ${current_location} -41 -9 | |
83 | + ${Ids}= Create List ${tender_UAid} ${id} | |
78 | 84 | |
79 | 85 | Set datetime |
80 | 86 | [Arguments] @{ARGUMENTS} | ... | ... |
1 | - *** Setting *** | |
1 | +*** Setting *** | |
2 | 2 | Library Selenium2Screenshots |
3 | 3 | Library String |
4 | 4 | Library DateTime |
5 | 5 | |
6 | +*** Variables *** | |
7 | +##Використовую такий шлях у кожного буде мінятись /yboi/. Міняйте на сві шлях до файлу | |
8 | +#${file_path} /home/yboi/openprocurement.robottests.buildout/Document.docx | |
9 | +${file_path} /home/vbilos/openprocurement.robottests.buildout/Document.docx | |
10 | +${mail} test@mail.com | |
11 | +${telephone} +380976535447 | |
12 | + | |
6 | 13 | *** Keywords *** |
7 | 14 | Підготувати клієнт для користувача |
8 | - [Arguments] ${username} | |
15 | + [Arguments] @{ARGUMENTS} | |
9 | 16 | [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо |
10 | - Open Browser ${BROKERS['${USERS.users['${username}'].broker}'].url} ${USERS.users['${username}'].browser} alias=${username} | |
11 | - Set Window Position @{USERS.users['${username}'].position} | |
12 | - Set Window Size @{USERS.users['${username}'].size} | |
13 | - Log Variables | |
17 | + ... ${ARGUMENTS[0]} == username | |
18 | + Open Browser ${USERS.users['${ARGUMENTS[0]}'].homepage} ${USERS.users['${username}'].browser} alias=${ARGUMENTS[0]} | |
19 | + Set Window Size @{USERS.users['${ARGUMENTS[0]}'].size} | |
20 | + Set Window Position @{USERS.users['${ARGUMENTS[0]}'].position} | |
21 | + | |
22 | +# login | |
23 | + Run Keyword And Ignore Error Wait Until Page Contains Element id=mForm:j_idt54 10 | |
24 | + Click Element id=mForm:j_idt54 | |
25 | + Run Keyword And Ignore Error Wait Until Page Contains Element id=mForm:email 10 | |
26 | + Input text id=mForm:email ${USERS.users['${username}'].login} | |
27 | + Input text id=mForm:pwd ${USERS.users['${username}'].password} | |
28 | + Click Button id=mForm:login | |
29 | + | |
30 | +Створити тендер | |
31 | + [Arguments] @{ARGUMENTS} | |
32 | + [Documentation] | |
33 | + ... ${ARGUMENTS[0]} == username | |
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 | |
42 | + ${delivery_end_date}= Get From Dictionary ${items[0].deliveryDate} endDate | |
43 | + ${delivery_end_date}= convert_date_to_prom_format ${delivery_end_date} | |
44 | + ${cpv}= Get From Dictionary ${items[0].classification} description_ua | |
45 | + ${cpv_id}= Get From Dictionary ${items[0].classification} id | |
46 | + ${cpv_id_1}= Get Substring ${cpv_id} 0 3 | |
47 | + ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description | |
48 | + ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id | |
49 | + ${code}= Get From Dictionary ${items[0].unit} code | |
50 | + ${quantity}= Get From Dictionary ${items[0]} quantity | |
51 | + ${name}= Get From Dictionary ${tender_data.data.procuringEntity.contactPoint} name | |
52 | + | |
53 | + Selenium2Library.Switch Browser ${ARGUMENTS[0]} | |
54 | + Wait Until Page Contains Element xpath=//*[contains(@class, 'ui-button-text ui-c')][./text()='Нова закупівля'] 10 | |
55 | + Click Element xpath=//*[contains(@class, 'ui-button-text ui-c')][./text()='Нова закупівля'] | |
56 | + Wait Until Page Contains Element id=mForm:data:name | |
57 | + Input text id=mForm:data:name ${title} | |
58 | + Input text id=mForm:data:desc ${description} | |
59 | + Input text id=mForm:data:budget ${budget} | |
60 | + Input text id=mForm:data:step ${step_rate} | |
61 | + Click Element xpath=//*[@id='mForm:data:vat']/tbody/tr/td[1]//span | |
62 | + Input text id=mForm:data:dEPr_input ${delivery_end_date} | |
63 | + Click Element id=mForm:data:cKind_label | |
64 | + Click Element xpath=//div[@id='mForm:data:cKind_panel']//li[3] | |
65 | + Input text id=mForm:data:cCpvGr_input ${cpv_id_1} | |
66 | + Wait Until Page Contains Element xpath=.//*[@id='mForm:data:cCpvGr_panel']/table/tbody/tr/td[2]/span 10 | |
67 | + Click Element xpath=.//*[@id='mForm:data:cCpvGr_panel']/table/tbody/tr/td[2]/span | |
68 | + Input text id=mForm:data:subject0 ${dkpp_desc} | |
69 | + Input text id=mForm:data:cCpv0_input ${cpv_id} | |
70 | + Wait Until Page Contains Element xpath=//div[@id='mForm:data:cCpv0_panel']//td[1]/span 10 | |
71 | + Click Element xpath=//div[@id='mForm:data:cCpv0_panel']//td[1]/span | |
72 | + Input text id=mForm:data:unit0_input ${code} | |
73 | + Wait Until Page Contains Element xpath=//div[@id='mForm:data:unit0_panel']//tr/td[1] 10 | |
74 | + Click Element xpath=//div[@id='mForm:data:unit0_panel']//tr/td[1] | |
75 | + Input text id=mForm:data:amount0 ${quantity} | |
76 | + Input text id=mForm:data:cDkpp0_input ${dkpp_id} | |
77 | + Wait Until Page Contains Element xpath=//div[@id='mForm:data:cDkpp0_panel']//tr[1]/td[2]/span 10 | |
78 | + Click Element xpath=//div[@id='mForm:data:cDkpp0_panel']//tr[1]/td[2]/span | |
79 | + Input text id=mForm:data:rName ${name} | |
80 | + Input text id=mForm:data:rPhone ${telephone} | |
81 | + Input text id=mForm:data:rMail ${mail} | |
82 | + Choose File id=mForm:data:docFile_input ${file_path} | |
83 | + Run Keyword if '${mode}' == 'multi' Додати предмет items | |
84 | + Click Element id=mForm:bSave | |
85 | + Sleep 5 | |
86 | + ${tender_UAid}= Get Text id=mForm:nBid | |
87 | + ${tender_UAid}= Get Substring ${tender_UAid} 19 | |
88 | + ${Ids} Convert To String ${tender_UAid} | |
89 | + Run keyword if '${mode}' == 'multi' Set Multi Ids ${tender_UAid} | |
90 | + [return] ${Ids} | |
91 | + | |
92 | +Set Multi Ids | |
93 | + [Arguments] @{ARGUMENTS} | |
94 | + [Documentation] | |
95 | + ... ${ARGUMENTS[0]} == ${tender_UAid} | |
96 | + ${id}= Get Text id=mForm:nBid | |
97 | + ${Ids} Create List ${tender_UAid} ${id} | |
98 | + | |
99 | +Додати предмет | |
100 | + [Arguments] @{ARGUMENTS} | |
101 | + [Documentation] | |
102 | + ... ${ARGUMENTS[0]} == items | |
103 | + ${dkpp_desc1}= Get From Dictionary ${items[1].additionalClassifications[0]} description | |
104 | + ${dkpp_id11}= Get From Dictionary ${items[1].additionalClassifications[0]} id | |
105 | + ${dkpp_desc2}= Get From Dictionary ${items[2].additionalClassifications[0]} description | |
106 | + ${dkpp_id2}= Get From Dictionary ${items[2].additionalClassifications[0]} id | |
107 | + ${dkpp_desc3}= Get From Dictionary ${items[3].additionalClassifications[0]} description | |
108 | + ${dkpp_id3}= Get From Dictionary ${items[3].additionalClassifications[0]} id | |
109 | + | |
110 | + Wait Until Page Contains Element xpath=//button[@class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"] 10 | |
111 | + Wait Until Page Contains Element xpath=//button[contains(@class, 'ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only')] 10 | |
112 | + Wait Until Page Contains Element xpath=//button[@id="mForm:data:j_idt911"]|//button[@id="mForm:data:j_idt726"] 10 | |
113 | + Click Element xpath=//button[@id="mForm:data:j_idt911"]|//button[@id="mForm:data:j_idt726"] | |
114 | + Wait Until Page Contains Element id=mForm:data:subject1 10 | |
115 | + Input text id=mForm:data:subject1 ${dkpp_desc1} | |
116 | + Input text id=mForm:data:cCpv1_input ${cpv_id} | |
117 | + Wait Until Page Contains Element xpath=//div[@id='mForm:data:cCpv1_panel']/table/tbody/tr/td[1]/span 10 | |
118 | + Click Element xpath=//div[@id='mForm:data:cCpv1_panel']/table/tbody/tr/td[1]/span | |
119 | + Input text id=mForm:data:unit1_input ${code} | |
120 | + Wait Until Page Contains Element xpath=//div[@id='mForm:data:unit1_panel']/table/tbody/tr/td[1] 10 | |
121 | + Click Element xpath=//div[@id='mForm:data:unit1_panel']/table/tbody/tr/td[1] | |
122 | + Input text id=mForm:data:amount1 ${quantity} | |
123 | + Input text id=mForm:data:cDkpp1_input ${dkpp_id11} | |
124 | + Wait Until Page Contains Element xpath=//div[@id='mForm:data:cDkpp1_panel']/table/tbody/tr/td[1]/span 10 | |
125 | + Click Element xpath=//div[@id='mForm:data:cDkpp1_panel']/table/tbody/tr/td[1]/span | |
126 | + Click Element xpath=//button[@id="mForm:data:j_idt911"]|//button[@id="mForm:data:j_idt726"] | |
127 | + Wait Until Page Contains Element id=mForm:data:subject2 10 | |
128 | + Input text id=mForm:data:subject2 ${dkpp_desc2} | |
129 | + Input text id=mForm:data:cCpv2_input ${cpv_id} | |
130 | + Wait Until Page Contains Element xpath=//div[@id='mForm:data:cCpv2_panel']/table/tbody/tr/td[1]/span 10 | |
131 | + Click Element xpath=//div[@id='mForm:data:cCpv2_panel']/table/tbody/tr/td[1]/span | |
132 | + Input text id=mForm:data:unit2_input ${code} | |
133 | + Wait Until Page Contains Element xpath=//div[@id='mForm:data:unit2_panel']/table/tbody/tr/td[1] 10 | |
134 | + Click Element xpath=//div[@id='mForm:data:unit2_panel']/table/tbody/tr/td[1] | |
135 | + Input text id=mForm:data:amount2 ${quantity} | |
136 | + Input text id=mForm:data:cDkpp2_input ${dkpp_id2} | |
137 | + Wait Until Page Contains Element xpath=//div[@id='mForm:data:cDkpp2_panel']/table/tbody/tr/td[1]/span 10 | |
138 | + Click Element xpath=//div[@id='mForm:data:cDkpp2_panel']/table/tbody/tr/td[1]/span | |
139 | + Click Element xpath=//button[@id="mForm:data:j_idt911"]|//button[@id="mForm:data:j_idt726"] | |
140 | + Wait Until Page Contains Element id=mForm:data:subject3 10 | |
141 | + Input text id=mForm:data:subject3 ${dkpp_desc3} | |
142 | + Input text id=mForm:data:cCpv3_input ${cpv_id} | |
143 | + Wait Until Page Contains Element xpath=//div[@id='mForm:data:cCpv3_panel']/table/tbody/tr/td[1]/span 10 | |
144 | + Click Element xpath=//div[@id='mForm:data:cCpv3_panel']/table/tbody/tr/td[1]/span | |
145 | + Input text id=mForm:data:unit3_input ${code} | |
146 | + Wait Until Page Contains Element xpath=//div[@id='mForm:data:unit3_panel']/table/tbody/tr/td[1] 10 | |
147 | + Click Element xpath=//div[@id='mForm:data:unit3_panel']/table/tbody/tr/td[1] | |
148 | + Input text id=mForm:data:amount3 ${quantity} | |
149 | + Input text id=mForm:data:cDkpp3_input ${dkpp_id3} | |
150 | + Wait Until Page Contains Element xpath=//div[@id='mForm:data:cDkpp3_panel']/table/tbody/tr/td[1]/span 10 | |
151 | + Click Element xpath=//div[@id='mForm:data:cDkpp3_panel']/table/tbody/tr/td[1]/span | |
152 | + | |
14 | 153 | |
15 | 154 | Пошук тендера по ідентифікатору |
16 | 155 | [Arguments] @{ARGUMENTS} | ... | ... |
... | ... | @@ -91,8 +91,8 @@ def test_tender_data(period_interval=2): |
91 | 91 | } |
92 | 92 | ], |
93 | 93 | "enquiryPeriod": { |
94 | - "startDate": (now + timedelta(minutes=2)).isoformat(), | |
95 | - "endDate": (now + timedelta(minutes=3)).isoformat() | |
94 | + "startDate": (now).isoformat(), | |
95 | + "endDate": (now + timedelta(minutes=1)).isoformat() | |
96 | 96 | }, |
97 | 97 | "tenderPeriod": { |
98 | 98 | "startDate": (now + timedelta(minutes=2)).isoformat(), |
... | ... | @@ -366,12 +366,12 @@ def test_tender_data_multiple_lots(period_interval=2): |
366 | 366 | } |
367 | 367 | ], |
368 | 368 | "enquiryPeriod": { |
369 | - "startDate": (now + timedelta(minutes=3)).isoformat(), | |
370 | - "endDate": (now + timedelta(minutes=4)).isoformat() | |
369 | + "startDate": (now).isoformat(), | |
370 | + "endDate": (now + timedelta(minutes=1)).isoformat() | |
371 | 371 | }, |
372 | 372 | "tenderPeriod": { |
373 | - "startDate": (now + timedelta(minutes=4)).isoformat(), | |
374 | - "endDate": (now + timedelta(minutes=(5+period_interval))).isoformat() | |
373 | + "startDate": (now + timedelta(minutes=2)).isoformat(), | |
374 | + "endDate": (now + timedelta(minutes=(2+period_interval))).isoformat() | |
375 | 375 | } |
376 | 376 | } |
377 | 377 | ... | ... |
... | ... | @@ -176,3 +176,11 @@ def newtend_date_picker_index(isodate): |
176 | 176 | if now.day>iso_dt.day: |
177 | 177 | mod = calendar.monthrange(now.year, now.month)[1] + mod |
178 | 178 | return mod + iso_dt.day |
179 | + | |
180 | +def Add_time_for_GUI_FrontEnds(INITIAL_TENDER_DATA): | |
181 | + now = datetime.now() | |
182 | + INITIAL_TENDER_DATA.data.enquiryPeriod['startDate'] = (now + timedelta(minutes=2)).isoformat() | |
183 | + INITIAL_TENDER_DATA.data.enquiryPeriod['endDate'] = (now + timedelta(minutes=3)).isoformat() | |
184 | + INITIAL_TENDER_DATA.data.tenderPeriod['startDate'] = (now + timedelta(minutes=4)).isoformat() | |
185 | + INITIAL_TENDER_DATA.data.tenderPeriod['endDate'] = (now + timedelta(minutes=5)).isoformat() | |
186 | + return INITIAL_TENDER_DATA | |
\ No newline at end of file | ... | ... |
... | ... | @@ -26,7 +26,7 @@ ${question_id} 0 |
26 | 26 | *** Test Cases *** |
27 | 27 | Можливість оголосити однопредметний тендер |
28 | 28 | [Tags] ${USERS.users['${tender_owner}'].broker}: Можливість оголосити тендер |
29 | - [Documentation] Створення закупівлі замовником, обовязково має повертати UAID закупівлі (номер тендера), | |
29 | + [Documentation] Створення закупівлі замовником, обовязково має повертати UAID закупівлі (номер тендера), | |
30 | 30 | ${TENDER_UAID}= Викликати для учасника ${tender_owner} Створити тендер ${INITIAL_TENDER_DATA} |
31 | 31 | ${LAST_MODIFICATION_DATE}= Get Current Date |
32 | 32 | Set To Dictionary ${TENDER} TENDER_UAID ${TENDER_UAID} |
... | ... | @@ -38,12 +38,12 @@ ${question_id} 0 |
38 | 38 | [Documentation] Закупівельник ${USERS.users['${tender_owner}'].broker} завантажує документацію до оголошеної закупівлі |
39 | 39 | ${filepath}= create_fake_doc |
40 | 40 | ${doc_upload_reply}= Викликати для учасника ${tender_owner} Завантажити документ ${filepath} ${TENDER['TENDER_UAID']} |
41 | - ${file_upload_process_data} = Create Dictionary filepath=${filepath} doc_upload_reply=${doc_upload_reply} | |
41 | + ${file_upload_process_data} = Create Dictionary filepath=${filepath} doc_upload_reply=${doc_upload_reply} | |
42 | 42 | log ${file_upload_process_data} |
43 | 43 | Set To Dictionary ${USERS.users['${tender_owner}']} file_upload_process_data ${file_upload_process_data} |
44 | 44 | Log ${USERS.users['${tender_owner}']} |
45 | - | |
46 | - | |
45 | + | |
46 | + | |
47 | 47 | Можливість подати скаргу на умови |
48 | 48 | [Tags] ${USERS.users['${provider}'].broker}: Можливість подати скаргу на умови |
49 | 49 | [Documentation] Користувач ${USERS.users['${provider}'].broker} намагається подати скаргу на умови оголошеної закупівлі |
... | ... | @@ -226,10 +226,10 @@ ${question_id} 0 |
226 | 226 | [Tags] ${USERS.users['${provider}'].broker}: Можливість подати цінову пропозицію |
227 | 227 | ${bid}= test bid data |
228 | 228 | Log ${bid} |
229 | - ${bidresponces}= Create Dictionary | |
229 | + ${bidresponces}= Create Dictionary | |
230 | 230 | ${bid_before_biddperiod_resp}= Викликати для учасника ${provider} Подати цінову пропозицію shouldfail ${TENDER['TENDER_UAID']} ${bid} |
231 | 231 | Set To Dictionary ${bidresponces} bid_before_biddperiod_resp ${bid_before_biddperiod_resp} |
232 | - Set To Dictionary ${USERS.users['${provider}']} bidresponces ${bidresponces} | |
232 | + Set To Dictionary ${USERS.users['${provider}']} bidresponces ${bidresponces} | |
233 | 233 | log ${USERS.users['${provider}']} |
234 | 234 | |
235 | 235 | ####### |
... | ... | @@ -285,7 +285,7 @@ ${question_id} 0 |
285 | 285 | ${fixbidto50000resp}= Викликати для учасника ${provider} Змінити цінову пропозицію ${TENDER['TENDER_UAID']} ${USERS.users['${provider}'].bidresponces['resp']} |
286 | 286 | Set To Dictionary ${USERS.users['${provider}'].bidresponces} fixbidto50000resp ${fixbidto50000resp} |
287 | 287 | log ${fixbidto50000resp} |
288 | - | |
288 | + | |
289 | 289 | Можливість змінити повторну цінову пропозицію до 10 |
290 | 290 | [Tags] ${USERS.users['${provider}'].broker}: Можливість змінити цінову пропозицію |
291 | 291 | Set To Dictionary ${USERS.users['${provider}'].bidresponces['resp'].data.value} amount 10 |
... | ... | @@ -298,16 +298,16 @@ ${question_id} 0 |
298 | 298 | [Tags] ${USERS.users['${provider}'].broker}: Можливість прийняти пропозицію переможця |
299 | 299 | log ${USERS.users['${provider}'].broker} |
300 | 300 | ${filepath}= create_fake_doc |
301 | - ${bid_doc_upload}= Викликати для учасника ${provider} Завантажити документ в ставку ${filepath} ${TENDER['TENDER_UAID']} | |
301 | + ${bid_doc_upload}= Викликати для учасника ${provider} Завантажити документ в ставку ${filepath} ${TENDER['TENDER_UAID']} | |
302 | 302 | Set To Dictionary ${USERS.users['${provider}'].bidresponces} bid_doc_upload ${bid_doc_upload} |
303 | - | |
303 | + | |
304 | 304 | порівняти документ |
305 | 305 | [Tags] ${USERS.users['${provider}'].broker}: вичитати документ |
306 | 306 | ${url}= Get Variable Value ${USERS.users['${provider}'].bidresponces['bid_doc_upload']['upload_responce'].data.url} |
307 | - ${doc} ${flnnm}= Викликати для учасника ${provider} отримати документ ${TENDER['TENDER_UAID']} ${url} | |
308 | - | |
307 | + ${doc} ${flnnm}= Викликати для учасника ${provider} отримати документ ${TENDER['TENDER_UAID']} ${url} | |
308 | + | |
309 | 309 | FIXME: finish the keyword |
310 | - | |
310 | + | |
311 | 311 | Should Be Equal ${flcntnt} ${doc} |
312 | 312 | Should Be Equal ${flpth} ${flnnm} |
313 | 313 | |
... | ... | @@ -331,25 +331,25 @@ ${question_id} 0 |
331 | 331 | Дочекатись дати початоку прийому пропозицій |
332 | 332 | ${bid}= test bid data |
333 | 333 | Log ${bid} |
334 | - ${bidresponces}= Create Dictionary | |
334 | + ${bidresponces}= Create Dictionary | |
335 | 335 | ${resp}= Викликати для учасника ${provider1} Подати цінову пропозицію ${TENDER['TENDER_UAID']} ${bid} |
336 | 336 | Set To Dictionary ${bidresponces} resp ${resp} |
337 | 337 | Set To Dictionary ${USERS.users['${provider1}']} bidresponces ${bidresponces} |
338 | 338 | log ${resp} |
339 | 339 | log ${USERS.users['${provider1}'].bidresponces} |
340 | - | |
340 | + | |
341 | 341 | Неможливість побачити цінові пропозиції учасників під час прийому пропозицій |
342 | 342 | [Tags] ${USERS.users['${viewer}'].broker}: Можливість подати цінову пропозицію |
343 | - | |
343 | + | |
344 | 344 | FIXME: finish the keyword |
345 | - | |
346 | - ${field_date}= Викликати для учасника ${viewer} отримати інформацію із тендера | |
345 | + | |
346 | + ${field_date}= Викликати для учасника ${viewer} отримати інформацію із тендера | |
347 | 347 | |
348 | 348 | Завантажити документ другим учасником |
349 | 349 | [Tags] ${USERS.users['${provider1}'].broker}: Можливість прийняти пропозицію переможця |
350 | 350 | log ${USERS.users['${provider1}'].broker} |
351 | 351 | ${filepath}= create_fake_doc |
352 | - ${bid_doc_upload}= Викликати для учасника ${provider1} Завантажити документ в ставку ${filepath} ${TENDER['TENDER_UAID']} | |
352 | + ${bid_doc_upload}= Викликати для учасника ${provider1} Завантажити документ в ставку ${filepath} ${TENDER['TENDER_UAID']} | |
353 | 353 | Set To Dictionary ${USERS.users['${provider1}'].bidresponces} bid_doc_upload ${bid_doc_upload} |
354 | 354 | |
355 | 355 | Можливість побачити скаргу користувачем під час подачі пропозицій |
... | ... | @@ -384,21 +384,21 @@ ${question_id} 0 |
384 | 384 | Неможливість завантажити документ другим учасником після закінчення прийому пропозицій |
385 | 385 | [Tags] ${USERS.users['${provider1}'].broker}: Неможливість документ першим учасником після закінчення прийому пропозицій |
386 | 386 | ${filepath}= create_fake_doc |
387 | - ${bid_doc_upload_fail}= Викликати для учасника ${provider1} Завантажити документ в ставку shouldfail ${filepath} ${TENDER['TENDER_UAID']} | |
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 | 390 | |
391 | 391 | Неможливість змінити існуючу документацію цінової пропозиції після закінчення прийому пропозицій |
392 | - [Tags] ${USERS.users['${provider1}'].broker}: | |
392 | + [Tags] ${USERS.users['${provider1}'].broker}: | |
393 | 393 | ${filepath}= create_fake_doc |
394 | 394 | ${bidid}= Get Variable Value ${USERS.users['${provider1}'].bidresponces['resp'].data.id} |
395 | 395 | ${docid}= Get Variable Value ${USERS.users['${provider1}'].bidresponces['bid_doc_upload']['upload_responce'].data.id} |
396 | 396 | ${bid_doc_modified_failed}= Викликати для учасника ${provider1} Змінити документ в ставці shouldfail ${filepath} ${bidid} ${docid} |
397 | 397 | Set To Dictionary ${USERS.users['${provider}'].bidresponces} bid_doc_modified_failed ${bid_doc_modified_failed} |
398 | - | |
398 | + | |
399 | 399 | |
400 | 400 | Вичитати цінову пропозицію |
401 | - sleep 120 | |
401 | +# sleep 120 | |
402 | 402 | [Tags] ${USERS.users['${provider1}'].broker}: Можливість подати цінову пропозицію |
403 | 403 | ${bidid}= Get Variable Value ${USERS.users['${provider1}'].bidresponces['resp'].data.id} |
404 | 404 | ${token}= Get Variable Value ${USERS.users['${provider1}'].bidresponces['resp'].access.token} | ... | ... |
Please
register
or
login
to post a comment