Showing
1 changed file
with
16 additions
and
19 deletions
@@ -3,7 +3,6 @@ Library Selenium2Screenshots | @@ -3,7 +3,6 @@ Library Selenium2Screenshots | ||
3 | Library String | 3 | Library String |
4 | Library DateTime | 4 | Library DateTime |
5 | Library Selenium2Library | 5 | Library Selenium2Library |
6 | -Library ApiCommands | ||
7 | Library Collections | 6 | Library Collections |
8 | 7 | ||
9 | 8 | ||
@@ -14,6 +13,11 @@ ${LOGIN} r.zaporozhets@smartweb.com.ua | @@ -14,6 +13,11 @@ ${LOGIN} r.zaporozhets@smartweb.com.ua | ||
14 | ${PASSWORD} 1234 | 13 | ${PASSWORD} 1234 |
15 | 14 | ||
16 | *** Keywords *** | 15 | *** Keywords *** |
16 | +Підготувати дані для оголошення тендера | ||
17 | + ${INITIAL_TENDER_DATA}= prepare_prom_test_tender_data | ||
18 | + [return] ${INITIAL_TENDER_DATA} | ||
19 | + | ||
20 | + | ||
17 | Підготувати клієнт для користувача | 21 | Підготувати клієнт для користувача |
18 | [Arguments] ${username} | 22 | [Arguments] ${username} |
19 | log many @{ARGUMENTS} | 23 | log many @{ARGUMENTS} |
@@ -33,36 +37,31 @@ Login | @@ -33,36 +37,31 @@ Login | ||
33 | Input text id=password ${PASSWORD} | 37 | Input text id=password ${PASSWORD} |
34 | Click Button id=submit_login_button | 38 | Click Button id=submit_login_button |
35 | 39 | ||
36 | -#TODO: tender data should pass as args make converter from client initial data to prom initial data | ||
37 | - | ||
38 | Створити тендер | 40 | Створити тендер |
39 | [Arguments] @{ARGUMENTS} | 41 | [Arguments] @{ARGUMENTS} |
40 | log many @{ARGUMENTS} | 42 | log many @{ARGUMENTS} |
41 | - | ||
42 | Go to homepage | 43 | Go to homepage |
43 | - Sleep 10 | ||
44 | Wait Until Page Contains Element id=phone_email | 44 | Wait Until Page Contains Element id=phone_email |
45 | - | ||
46 | Login | 45 | Login |
47 | - Sleep 3 | ||
48 | 46 | ||
49 | ${start_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} startDate | 47 | ${start_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} startDate |
48 | + ${start_date}= convert_date_to_prom_format ${start_date} | ||
50 | ${end_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate | 49 | ${end_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate |
51 | - | ||
52 | - ${enquiry_start_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} startDate | 50 | + ${end_date}= convert_date_to_prom_format ${end_date} |
53 | ${enquiry_end_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate | 51 | ${enquiry_end_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate |
52 | + ${enquiry_end_date}= convert_date_to_prom_format ${enquiry_end_date} | ||
54 | 53 | ||
55 | ${items}= Get From Dictionary ${ARGUMENTS[1].data} items | 54 | ${items}= Get From Dictionary ${ARGUMENTS[1].data} items |
56 | ${delivery_date}= Get From Dictionary ${items[0].deliveryDate} endDate | 55 | ${delivery_date}= Get From Dictionary ${items[0].deliveryDate} endDate |
57 | - | ||
58 | ${title}= Get From Dictionary ${ARGUMENTS[1].data} title | 56 | ${title}= Get From Dictionary ${ARGUMENTS[1].data} title |
59 | ${description}= Get From Dictionary ${ARGUMENTS[1].data} description | 57 | ${description}= Get From Dictionary ${ARGUMENTS[1].data} description |
60 | - | ||
61 | ${quantity}= Get From Dictionary ${items[0]} quantity | 58 | ${quantity}= Get From Dictionary ${items[0]} quantity |
62 | ${budget}= Get From Dictionary ${ARGUMENTS[1].data.value} amount | 59 | ${budget}= Get From Dictionary ${ARGUMENTS[1].data.value} amount |
63 | ${step_rate}= Get From Dictionary ${ARGUMENTS[1].data.minimalStep} amount | 60 | ${step_rate}= Get From Dictionary ${ARGUMENTS[1].data.minimalStep} amount |
64 | 61 | ||
62 | + Wait Until Page Contains Element id=js-btn-0 | ||
65 | Click Element id=js-btn-0 | 63 | Click Element id=js-btn-0 |
64 | + Wait Until Page Contains Element id=title | ||
66 | Input text id=title ${title} | 65 | Input text id=title ${title} |
67 | Input text id=descr ${description} | 66 | Input text id=descr ${description} |
68 | Input text id=quantity ${quantity} | 67 | Input text id=quantity ${quantity} |
@@ -74,22 +73,20 @@ Login | @@ -74,22 +73,20 @@ Login | ||
74 | Click Element xpath=//a[contains(@data-target, 'container-dkpp')] | 73 | Click Element xpath=//a[contains(@data-target, 'container-dkpp')] |
75 | Click Element xpath=//div[contains(@class, 'qa_container_dkpp_popup')]//input[@type='checkbox'][@value='4'] | 74 | Click Element xpath=//div[contains(@class, 'qa_container_dkpp_popup')]//input[@type='checkbox'][@value='4'] |
76 | Click Element xpath=//div[contains(@class, 'qa_container_dkpp_popup')]//a[contains(@data-target, 'classifiers-inputs-dkpp')] | 75 | Click Element xpath=//div[contains(@class, 'qa_container_dkpp_popup')]//a[contains(@data-target, 'classifiers-inputs-dkpp')] |
77 | - Sleep 3 | ||
78 | Input text id=dt_enquiry ${enquiry_end_date} | 76 | Input text id=dt_enquiry ${enquiry_end_date} |
79 | - Sleep 5 | ||
80 | Input text id=dt_tender_start ${start_date} | 77 | Input text id=dt_tender_start ${start_date} |
81 | - Sleep 5 | ||
82 | Input text id=dt_tender_end ${end_date} | 78 | Input text id=dt_tender_end ${end_date} |
83 | - Sleep 5 | ||
84 | Input text id=step ${step_rate} | 79 | Input text id=step ${step_rate} |
85 | - Sleep 5 | ||
86 | Click Button id=submit_button | 80 | Click Button id=submit_button |
81 | + | ||
87 | Wait Until Page Contains Element xpath=//td[@id="qa_state_purchase_id"]/p | 82 | Wait Until Page Contains Element xpath=//td[@id="qa_state_purchase_id"]/p |
88 | - ${id}= Get Text xpath=//td[@id="qa_state_purchase_id"]/p | ||
89 | 83 | ||
90 | - log ${id} | ||
91 | - Should Not Be Equal As Strings ${id} ожидание... | 84 | + ${id}= Wait Until Keyword Succeeds 60sec 1sec get tender id |
85 | + [return] ${id} | ||
92 | 86 | ||
87 | +get tender id | ||
88 | + ${id}= Get Text xpath=//td[@id="qa_state_purchase_id"]/p | ||
89 | + Should Not Be Equal As Strings ${id} ожидание... | ||
93 | [return] ${id} | 90 | [return] ${id} |
94 | 91 | ||
95 | Пошук тендера по ідентифікатору | 92 | Пошук тендера по ідентифікатору |
Please
register
or
login
to post a comment