Commit 2c7ce0f994175c480d1a34a5fcc6988b68a2464d
1 parent
058d76ea
-m 1-st version of Create Tender + Cannot_add_bid
Showing
2 changed files
with
137 additions
and
8 deletions
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | Library Selenium2Screenshots | 2 | Library Selenium2Screenshots |
3 | Library String | 3 | Library String |
4 | Library DateTime | 4 | Library DateTime |
5 | +Library op_robot_tests.tests_files.etender_service | ||
5 | 6 | ||
6 | *** Variables *** | 7 | *** Variables *** |
7 | ${locator.tenderId} jquery=h3 | 8 | ${locator.tenderId} jquery=h3 |
@@ -16,13 +17,107 @@ ${locator.enquiryPeriod.startDate} jquery=tender-procedure-info>div.row:contai | @@ -16,13 +17,107 @@ ${locator.enquiryPeriod.startDate} jquery=tender-procedure-info>div.row:contai | ||
16 | ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contains("Завершення періоду уточнень:")>:eq(1)> | 17 | ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contains("Завершення періоду уточнень:")>:eq(1)> |
17 | 18 | ||
18 | *** Keywords *** | 19 | *** Keywords *** |
20 | +Підготувати дані для оголошення тендера | ||
21 | + ${INITIAL_TENDER_DATA}= prepare_test_tender_data | ||
22 | + [return] ${INITIAL_TENDER_DATA} | ||
23 | + | ||
19 | Підготувати клієнт для користувача | 24 | Підготувати клієнт для користувача |
20 | - [Arguments] ${username} | 25 | + [Arguments] @{ARGUMENTS} |
21 | [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо | 26 | [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 | 27 | + ... ${ARGUMENTS[0]} == username |
28 | + Open Browser ${USERS.users['${ARGUMENTS[0]}'].homepage} alias=${ARGUMENTS[0]} | ||
29 | + Set Window Size @{USERS.users['${ARGUMENTS[0]}'].size} | ||
30 | + Set Window Position @{USERS.users['${ARGUMENTS[0]}'].position} | ||
31 | + | ||
32 | +# login | ||
33 | + Wait Until Page Contains Element id=inputUsername 100 | ||
34 | + Input text id=inputUsername ${USERS.users['${username}'].login} | ||
35 | + Input text id=inputPassword ${USERS.users['${username}'].password} | ||
36 | + Click Button id=btn_submit | ||
37 | + | ||
38 | +Створити тендер | ||
39 | + [Arguments] @{ARGUMENTS} | ||
40 | + [Documentation] | ||
41 | + ... ${ARGUMENTS[0]} == username | ||
42 | + ... ${ARGUMENTS[1]} == tender_data | ||
43 | + | ||
44 | + ${items}= Get From Dictionary ${ARGUMENTS[1].data} items | ||
45 | + ${title}= Get From Dictionary ${ARGUMENTS[1].data} title | ||
46 | + ${description}= Get From Dictionary ${ARGUMENTS[1].data} description | ||
47 | + ${budget}= Get From Dictionary ${ARGUMENTS[1].data.value} amount | ||
48 | + ${step_rate}= Get From Dictionary ${ARGUMENTS[1].data.minimalStep} amount | ||
49 | + ${items_description}= Get From Dictionary ${ARGUMENTS[1].data} description | ||
50 | + ${quantity}= Get From Dictionary ${items[0]} quantity | ||
51 | + ${cpv}= Get From Dictionary ${items[0].classification} id | ||
52 | + ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description | ||
53 | + ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id | ||
54 | + ${unit}= Get From Dictionary ${items[0].unit} name | ||
55 | + ${start_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} startDate | ||
56 | + ${start_date}= convert_date_to_etender_format ${start_date} | ||
57 | + ${start_time}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} startDate | ||
58 | + ${start_time}= convert_time_to_etender_format ${start_time} | ||
59 | + ${end_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate | ||
60 | + ${end_date}= convert_date_to_etender_format ${end_date} | ||
61 | + ${end_time}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate | ||
62 | + ${end_time}= convert_time_to_etender_format ${end_time} | ||
63 | + ${enquiry_end_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate | ||
64 | + ${enquiry_end_date}= convert_date_to_etender_format ${enquiry_end_date} | ||
65 | + ${enquiry_end_time}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate | ||
66 | + ${enquiry_end_time}= convert_time_to_etender_format ${enquiry_end_time} | ||
67 | + | ||
68 | + Selenium2Library.Switch Browser ${ARGUMENTS[0]} | ||
69 | + Wait Until Page Contains Мої закупівлі 100 | ||
70 | + Click Element xpath=//a[contains(@class, 'ng-binding')][./text()='Мої закупівлі'] | ||
71 | + Wait Until Page Contains Element xpath=//a[contains(@class, 'btn btn-info')] | ||
72 | + Click Element xpath=//a[contains(@class, 'btn btn-info')] | ||
73 | + Wait Until Page Contains Element id=title | ||
74 | + Input text id=title ${title} | ||
75 | + Input text id=description ${description} | ||
76 | + Input text id=value ${budget} | ||
77 | + Click Element xpath=//div[contains(@class, 'form-group col-sm-6')]//input[@type='checkbox'] | ||
78 | + Input text id=minimalStep ${step_rate} | ||
79 | + Input text id=itemsDescription ${items_description} | ||
80 | + Input text id=itemsQuantity ${quantity} | ||
81 | + Click Element xpath=//select[@name="itemsUnit"]/option[@value='kilogram'] | ||
82 | + Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='enqPEndDate'] ${enquiry_end_date} | ||
83 | + 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} | ||
84 | + | ||
85 | + Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='startDate'] ${start_date} | ||
86 | + 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} | ||
87 | + Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='endDate'] ${end_date} | ||
88 | + 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} | ||
89 | + | ||
90 | + Click Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#classification'] | ||
91 | + Wait Until Page Contains Оберіть класифікатор CPV 100 | ||
92 | + Input text xpath=//div[contains(@class, 'modal-content')]//input[@ng-model='searchstring'] ${cpv} | ||
93 | + Wait Until Page Contains Картонки 100 | ||
94 | + Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-table-rowselected ng-scope ng-table')]//tr[1]//td[1] | ||
95 | + Wait Until Page Contains 44617100-9 Картонки 100 | ||
96 | + Click Element xpath=//div[contains(@class, 'modal-content')]//button[@ng-click='choose()'] | ||
97 | + | ||
98 | + Click Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'] | ||
99 | + Wait Until Page Contains Класифікатор ДКПП 100 | ||
100 | + Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc} | ||
101 | + Wait Until Page Contains ${dkpp_id} 100 | ||
102 | + Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-table-rowselected ng-scope ng-table')]//tr[2]//td[1] | ||
103 | + Wait Until Page Contains 17.21.1 "Папір і картон гофровані, паперова й картонна тара" 100 | ||
104 | + Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()'] | ||
105 | + Click Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit'] | ||
106 | + Wait Until Page Contains [ТЕСТУВАННЯ] 100 | ||
107 | + Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-scope ng-table')]//tr[1]//a | ||
108 | + ${tender_UAid}= Wait Until Keyword Succeeds 240sec 2sec get tender UAid | ||
109 | + ${current_location}= Get Location | ||
110 | + ${tender_id}= Fetch From Right ${current_location} / | ||
111 | +### harcode Idis bacause issues on the E-tender side, to remove, 2 lines: | ||
112 | + ${tender_id}= Convert To String 94ffe180019d459787aafe290cd300e2 | ||
113 | + ${tender_UAid}= Convert To String UA-2015-06-12-000038 | ||
114 | + ${Ids} Create List ${tender_id} ${tender_UAid} | ||
115 | + [return] ${Ids} | ||
116 | + | ||
117 | +get tender UAid | ||
118 | + ${tender_UAid}= Get Text xpath=//div[contains(@class, "panel-heading")] | ||
119 | + ${tender_UAid}= Get Substring ${tender_UAid} 7 27 | ||
120 | + [return] ${tender_UAid} | ||
26 | 121 | ||
27 | Пошук тендера по ідентифікатору | 122 | Пошук тендера по ідентифікатору |
28 | [Arguments] @{ARGUMENTS} | 123 | [Arguments] @{ARGUMENTS} |
@@ -30,11 +125,12 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai | @@ -30,11 +125,12 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai | ||
30 | ... ${ARGUMENTS[0]} == username | 125 | ... ${ARGUMENTS[0]} == username |
31 | ... ${ARGUMENTS[1]} == tenderId | 126 | ... ${ARGUMENTS[1]} == tenderId |
32 | ... ${ARGUMENTS[2]} == id | 127 | ... ${ARGUMENTS[2]} == id |
128 | + | ||
33 | Switch browser ${ARGUMENTS[0]} | 129 | Switch browser ${ARGUMENTS[0]} |
34 | ${current_location}= Get Location | 130 | ${current_location}= Get Location |
35 | Run keyword if '${BROKERS['${USERS.users['${username}'].broker}'].url}/#/tenderDetailes/${ARGUMENTS[2]}'=='${current_location}' Reload Page | 131 | 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} | 132 | Go to ${BROKERS['${USERS.users['${username}'].broker}'].url} |
37 | - Wait Until Page Contains E-TENDER - центр електронної торгівлі 10 | 133 | + Wait Until Page Contains Список закупівель 10 |
38 | sleep 1 | 134 | sleep 1 |
39 | Input Text jquery=input[ng-change='search()'] ${ARGUMENTS[1]} | 135 | Input Text jquery=input[ng-change='search()'] ${ARGUMENTS[1]} |
40 | Click Link jquery=a[ng-click='search()'] | 136 | Click Link jquery=a[ng-click='search()'] |
@@ -129,7 +225,7 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai | @@ -129,7 +225,7 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai | ||
129 | 225 | ||
130 | отримати інформацію про items[${item_id}].description | 226 | отримати інформацію про items[${item_id}].description |
131 | відмітити на сторінці поле з тендера items[${item_id}].description jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Детальний опис предмету закупівлі:")>:eq(1)> | 227 | відмітити на сторінці поле з тендера 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)> | 228 | + ${return_value}= Get Text jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Детальний опис предмету закупівлі:")>:eq(1)> |
133 | [return] ${return_value} | 229 | [return] ${return_value} |
134 | 230 | ||
135 | отримати інформацію про items[${item_id}].quantity | 231 | отримати інформацію про items[${item_id}].quantity |
@@ -180,4 +276,19 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai | @@ -180,4 +276,19 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai | ||
180 | отримати інформацію про questions[${question_id}].answer | 276 | отримати інформацію про questions[${question_id}].answer |
181 | відмітити на сторінці поле з тендера question answer jquery=tender-questions>div:eq(1)>div:last> | 277 | відмітити на сторінці поле з тендера question answer jquery=tender-questions>div:eq(1)>div:last> |
182 | ${return_value}= Get Text jquery=tender-questions>div:eq(1)>div:last> | 278 | ${return_value}= Get Text jquery=tender-questions>div:eq(1)>div:last> |
183 | - [return] ${return_value} | ||
279 | + [return] ${return_value} | ||
280 | + | ||
281 | +Подати цінову пропозицію | ||
282 | + [Arguments] @{ARGUMENTS} | ||
283 | + [Documentation] | ||
284 | + ... ${ARGUMENTS[0]} == username | ||
285 | + ... ${ARGUMENTS[1]} == ${INTERNAL_TENDER_ID} | ||
286 | + ... ${ARGUMENTS[2]} == test_bid_data | ||
287 | + | ||
288 | + ${bid}= Get From Dictionary ${ARGUMENTS[2].data.value} amount | ||
289 | + Selenium2Library.Switch Browser ${ARGUMENTS[0]} | ||
290 | + etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID} | ||
291 | + Wait Until Page Contains Інформація про процедуру закупівлі 100 | ||
292 | + Wait Until Page Contains Element id=amount 10 | ||
293 | + Input text id=amount ${bid} | ||
294 | + Click Element xpath=//button[contains(@class, 'btn btn-success')][./text()='Реєстрація пропозиції'] |
@@ -8,6 +8,24 @@ users: | @@ -8,6 +8,24 @@ users: | ||
8 | browser: chrome | 8 | browser: chrome |
9 | position: [0, 0] | 9 | position: [0, 0] |
10 | size: [640, 450] | 10 | size: [640, 450] |
11 | + E-tender_Owner: | ||
12 | + broker: E-tender | ||
13 | + username: E-tendertest | ||
14 | + homepage: "http://uat.e-tender.biz/#/profile" | ||
15 | + login: st_org | ||
16 | + password: 12345678 | ||
17 | + browser: firefox | ||
18 | + position: [0, 0] | ||
19 | + size: [640, 450] | ||
20 | + E-tender_Provider2: | ||
21 | + broker: E-tender | ||
22 | + username: E-tendertest | ||
23 | + homepage: "http://uat.e-tender.biz/#/profile" | ||
24 | + login: provider2 | ||
25 | + password: Qa123456 | ||
26 | + browser: firefox | ||
27 | + position: [0, 0] | ||
28 | + size: [640, 450] | ||
11 | E-tender_Viewer: | 29 | E-tender_Viewer: |
12 | broker: E-tender | 30 | broker: E-tender |
13 | username: E-tendertest | 31 | username: E-tendertest |
Please
register
or
login
to post a comment