Commit fce0fa0ebe6302d7578b0739cfa013033bc45275

Authored by Taras Kozlovskyi
1 parent 2aafde64

Added tests configs

  1 +*** Setting ***
  2 +Library Selenium2Screenshots
  3 +
  4 +*** Keywords ***
  5 +Підготувати клієнт для користувача
  6 + [Arguments] ${username}
  7 + [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо
  8 + Open Browser ${BROKERS['${USERS.users['${username}'].broker}'].url} ${USERS.users['${username}'].browser} ${username}
  9 + Set Window Position @{USERS.users['${username}'].position}
  10 + Set Window Size @{USERS.users['${username}'].size}
  11 + Log Variables
  12 +
  13 +Створити тендер
  14 + [Arguments] @{ARGUMENTS}
  15 + Log Variables
  16 +
  17 +
  18 +Звірити інформацію про тендер
  19 + [Arguments] ${username}
  20 + Go to ${BROKERS['${USERS.users['${username}'].broker}'].url}/#/tenderDetailes/${TENDER_DATA.data.id}
  21 + Wait Until Page Contains ${TENDER_DATA.data.tenderID} 10
  22 + ${last_note_id}= Add pointy note css=h3.panel-title Verify information about the tender position=bottom
  23 + :FOR ${field} IN @{important_fields}
  24 + \ Page Should Contain ${TENDER_DATA.data.${field}}
  25 + \ Remove element ${last_note_id}
  26 + \ ${last_note_id}= Add pointy note css=h3.panel-title checked information about field "${field}" width=200 color=green position=bottom
  27 + \ sleep 1
\ No newline at end of file
... ...
  1 +*** Settings ***
  2 +Library op_robot_tests.tests_files.brokers.openprocurement_client_helper
  3 +
  4 +*** Keywords ***
  5 +Підготувати клієнт для користувача
  6 + [Arguments] ${username}
  7 + [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо
  8 + ${api_wrapper}= prepare_api_wrapper ${BROKERS['${USERS.users['${username}'].broker}'].api_key}
  9 + Set To Dictionary ${USERS.users['${username}']} client ${api_wrapper}
  10 + Log Variables
  11 +
  12 +Створити тендер
  13 + [Arguments] ${username}
  14 + ${INITIAL_TENDER_DATA}= prepare_test_tender_data
  15 + Log object data ${INITIAL_TENDER_DATA}
  16 + ${TENDER_DATA}= Call Method ${USERS.users['${username}'].client} create_tender ${INITIAL_TENDER_DATA}
  17 + Log object data ${TENDER_DATA} cteated_tender
  18 + ${access_token}= Get Variable Value ${TENDER_DATA.access.token}
  19 + Set To Dictionary ${USERS.users['${username}']} access_token ${access_token}
  20 + Log access_token: ${access_token}
  21 + Log tender_id: ${TENDER_DATA.data.id}
  22 + Log Variables
  23 + Set Global Variable ${TENDER_DATA}
  24 +
  25 +Звірити інформацію про тендер
  26 + [Arguments] ${username}
  27 + ${tender}= Call Method ${USERS.users['${username}'].client} get_tender ${TENDER_DATA.data.id}
  28 + Log object data ${tender}
  29 + :FOR ${field} IN @{important_fields}
  30 + \ Page Should Contain ${TENDER_DATA.data.${field}}
  31 + \ Log Учасник ${username} звірив поле "${field}" warn
\ No newline at end of file
... ...
  1 +from openprocurement_client.client import Client
  2 +
  3 +
  4 +def prepare_api_wrapper(key=''):
  5 + return Client(key)
... ...
  1 +E-tender:
  2 + broker_api: etender
  3 + url: http://services.e-tender.biz:100
  4 +Quinta:
  5 + api_key: e9c3ccb8e8124f26941d5f9639a4ebc3
  6 + broker_api: openprocurement_client
... ...
  1 +tender_owner: Taras
  2 +users:
  3 + Taras:
  4 + broker: Quinta
  5 + Andew:
  6 + broker: E-tender
  7 + username: test
  8 + browser: chrome
  9 + position: [1060, 0]
  10 + size: [860, 1000]
  11 + Andew1:
  12 + broker: Quinta
\ No newline at end of file
... ...
Please register or login to post a comment