Commit 147d9d47f4eff82f01b1b6d8038a783d26c7a6c9

Authored by biviktorqc
1 parent 0452ea07

Marge latests mastet to this branch

... ... @@ -106,12 +106,9 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai
106 106 Wait Until Page Contains [ТЕСТУВАННЯ] 100
107 107 Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-scope ng-table')]//tr[1]//a
108 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
  109 +### harcode Idis bacause issues on the E-tender side, to remove, 1 line:
113 110 ${tender_UAid}= Convert To String UA-2015-06-12-000038
114   - ${Ids} Create List ${tender_id} ${tender_UAid}
  111 + ${Ids} Create List ${tender_UAid}
115 112 [return] ${Ids}
116 113
117 114 get tender UAid
... ... @@ -119,25 +116,32 @@ get tender UAid
119 116 ${tender_UAid}= Get Substring ${tender_UAid} 7 27
120 117 [return] ${tender_UAid}
121 118
  119 +Oтримати internal id по UAid
  120 + [Arguments] @{ARGUMENTS}
  121 + [Documentation]
  122 + ... ${ARGUMENTS[0]} == username
  123 + ... ${ARGUMENTS[1]} == tenderid
  124 + etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]}
  125 + ${current_location}= Get Location
  126 + ${tender_id}= Fetch From Right ${current_location} /
  127 +### harcode Idis bacause issues on the E-tender side, to remove, 1 line:
  128 + ${tender_id}= Convert To String 94ffe180019d459787aafe290cd300e2
  129 + log ${internal_id}
  130 + [return] ${internal_id}
  131 +
122 132 Пошук тендера по ідентифікатору
123 133 [Arguments] @{ARGUMENTS}
124 134 [Documentation]
125 135 ... ${ARGUMENTS[0]} == username
126 136 ... ${ARGUMENTS[1]} == tenderId
127   - ... ${ARGUMENTS[2]} == id
128 137
129 138 Switch browser ${ARGUMENTS[0]}
130   - ${current_location}= Get Location
131   - Run keyword if '${BROKERS['${USERS.users['${username}'].broker}'].url}/#/tenderDetailes/${ARGUMENTS[2]}'=='${current_location}' Reload Page
132 139 Go to ${BROKERS['${USERS.users['${username}'].broker}'].url}
133 140 Wait Until Page Contains Список закупівель 10
134 141 sleep 1
135 142 Input Text jquery=input[ng-change='search()'] ${ARGUMENTS[1]}
136 143 Click Link jquery=a[ng-click='search()']
137 144 sleep 2
138   -# ${last_note_id}= Add pointy note jquery=a[href^="#/tenderDetailes"] Found tender with tenderID "${ARGUMENTS[1]}" width=200 position=bottom
139   -# sleep 1
140   -# Remove element ${last_note_id}
141 145 Click Link jquery=a[href^="#/tenderDetailes"]
142 146 Wait Until Page Contains ${ARGUMENTS[1]} 10
143 147 sleep 1
... ... @@ -283,11 +287,10 @@ get tender UAid
283 287 [Documentation]
284 288 ... ${ARGUMENTS[0]} == username
285 289 ... ${ARGUMENTS[1]} == ${INTERNAL_TENDER_ID}
286   - ... ${ARGUMENTS[2]} == test_bid_data
  290 + ... ${ARGUMENTS[2]} == test_bid_data
287 291
288 292 ${bid}= Get From Dictionary ${ARGUMENTS[2].data.value} amount
289   - Selenium2Library.Switch Browser ${ARGUMENTS[0]}
290   - etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID}
  293 + etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]}
291 294 Wait Until Page Contains Інформація про процедуру закупівлі 100
292 295 Wait Until Page Contains Element id=amount 10
293 296 Input text id=amount ${bid}
... ...
... ... @@ -24,7 +24,7 @@ users:
24 24 login: provider2
25 25 password: Qa123456
26 26 browser: firefox
27   - position: [0, 0]
  27 + position: [700, 0]
28 28 size: [640, 450]
29 29 E-tender_Viewer:
30 30 broker: E-tender
... ...
  1 +from iso8601 import parse_date
  2 +from robot.output import LOGGER
  3 +from robot.output.loggerhelper import Message
  4 +from robot.libraries.BuiltIn import BuiltIn
  5 +from robot.errors import HandlerExecutionFailed
  6 +from datetime import datetime, timedelta, date
  7 +from dateutil.parser import parse
  8 +from dateutil.tz import tzlocal
  9 +from pytz import timezone
  10 +from jsonpath_rw import parse as parse_path
  11 +import time
  12 +from op_robot_tests.tests_files.initial_data import (
  13 + test_tender_data
  14 +)
  15 +
  16 +TIMEZONE = timezone('Europe/Kiev')
  17 +
  18 +def convert_date_to_etender_format(isodate):
  19 + iso_dt=parse_date(isodate)
  20 + date_string = iso_dt.strftime("%d-%m-%Y")
  21 + return date_string
  22 +
  23 +def convert_time_to_etender_format(isodate):
  24 + iso_dt=parse_date(isodate)
  25 + time_string = iso_dt.strftime("%H:%M")
  26 + return time_string
\ No newline at end of file
... ...
Please register or login to post a comment