Commit 2126d17dcf4708f308dd77e22c380c698556cdf1
1 parent
6af98aa8
Improve mechanism of broker and role selection
This change introduces an ability to select current broker and role independently.
Showing
4 changed files
with
29 additions
and
24 deletions
... | ... | @@ -11,27 +11,42 @@ Library op_robot_tests.tests_files.brokers.openprocurement_client_helper |
11 | 11 | |
12 | 12 | *** Keywords *** |
13 | 13 | TestSuiteSetup |
14 | - Завантажуємо дані про користувачів і майданчики ${LOAD_USERS} | |
14 | + Завантажуємо дані про користувачів і майданчики | |
15 | 15 | Підготовка початкових даних |
16 | 16 | |
17 | +Set Suite Variable With Default Value | |
18 | + [Arguments] ${suite_var} ${def_value} | |
19 | + ${tmp}= Get Variable Value ${${suite_var}} ${def_value} | |
20 | + Set Suite Variable ${${suite_var}} ${tmp} | |
21 | + | |
17 | 22 | Завантажуємо дані про користувачів і майданчики |
18 | - [Arguments] ${active_users} | |
19 | - log ${active_users} | |
23 | + Log ${broker} | |
24 | + Log ${role} | |
20 | 25 | |
21 | 26 | ${file_path}= Get Variable Value ${BROKERS_FILE} brokers.yaml |
22 | 27 | ${BROKERS}= load_initial_data_from ${file_path} |
23 | 28 | log ${BROKERS} |
24 | 29 | Set Global Variable ${BROKERS} |
30 | + | |
25 | 31 | ${brokers_list}= Get Dictionary Items ${BROKERS} |
26 | 32 | log ${brokers_list} |
33 | + | |
27 | 34 | ${file_path}= Get Variable Value ${USERS_FILE} users.yaml |
28 | 35 | ${USERS}= load_initial_data_from ${file_path} |
29 | 36 | Set Global Variable ${USERS} |
37 | + | |
38 | + Set Suite Variable With Default Value ${role} ${BROKERS['${broker}'].roles.${role}} | |
39 | + Set Suite Variable With Default Value tender_owner Tender_Owner | |
40 | + Set Suite Variable With Default Value provider Tender_User | |
41 | + Set Suite Variable With Default Value provider1 Tender_User1 | |
42 | + Set Suite Variable With Default Value viewer Tender_Viewer | |
43 | + ${active_users}= Create Dictionary tender_owner ${tender_owner} provider ${provider} provider1 ${provider1} viewer ${viewer} | |
44 | + | |
30 | 45 | ${users_list}= Get Dictionary Items ${USERS.users} |
31 | 46 | :FOR ${username} ${user_data} IN @{users_list} |
32 | 47 | \ log ${active_users} |
33 | 48 | \ log ${username} |
34 | - \ ${status}= Run Keyword And Return Status List Should Contain Value ${active_users} ${username} | |
49 | + \ ${status}= Run Keyword And Return Status Dictionary Should Contain Value ${active_users} ${username} | |
35 | 50 | \ Run Keyword If '${status}' == 'True' Завантажуємо бібліотеку з реалізацією ${BROKERS['${USERS.users['${username}'].broker}'].keywords_file} майданчики |
36 | 51 | \ Run Keyword If '${status}' == 'True' Викликати для учасника ${username} Підготувати клієнт для користувача |
37 | 52 | ... | ... |
... | ... | @@ -10,12 +10,10 @@ Suite Setup TestSuiteSetup |
10 | 10 | Suite Teardown Close all browsers |
11 | 11 | |
12 | 12 | *** Variables *** |
13 | -${mode} multi | |
13 | +${mode} multi | |
14 | 14 | |
15 | -${tender_owner} Tender_Owner | |
16 | -${provider} Tender_User | |
17 | -${viewer} Tender_Viewer | |
18 | -${LOAD_USERS} ["${tender_owner}", "${provider}", "${viewer}"] | |
15 | +${role} viewer | |
16 | +${broker} Quinta | |
19 | 17 | |
20 | 18 | *** Test Cases *** |
21 | 19 | Можливість оголосити багатопредметний тендер | ... | ... |
... | ... | @@ -10,16 +10,12 @@ Suite Setup TestSuiteSetup |
10 | 10 | Suite Teardown Close all browsers |
11 | 11 | |
12 | 12 | *** Variables *** |
13 | -${mode} single | |
13 | +${mode} single | |
14 | 14 | |
15 | -${tender_owner} Tender_Owner | |
16 | -${provider} Tender_User | |
17 | -${provider1} Tender_User1 | |
18 | -${viewer} Tender_Viewer | |
15 | +${role} viewer | |
16 | +${broker} Quinta | |
19 | 17 | |
20 | -${LOAD_USERS} ["${tender_owner}", "${provider}", "${provider1}", "${viewer}"] | |
21 | - | |
22 | -${question_id} 0 | |
18 | +${question_id} 0 | |
23 | 19 | |
24 | 20 | *** Test Cases *** |
25 | 21 | Можливість оголосити однопредметний тендер | ... | ... |
... | ... | @@ -10,14 +10,10 @@ Suite Setup TestSuiteSetup |
10 | 10 | Suite Teardown Close all browsers |
11 | 11 | |
12 | 12 | *** Variables *** |
13 | -${mode} single | |
13 | +${mode} single | |
14 | 14 | |
15 | -${tender_owner} Tender_Owner | |
16 | -${provider} Tender_User | |
17 | -${provider1} Tender_User1 | |
18 | -${viewer} Tender_Viewer | |
19 | - | |
20 | -${LOAD_USERS} ["${tender_owner}", "${provider}", "${provider1}", "${viewer}"] | |
15 | +${role} viewer | |
16 | +${broker} Quinta | |
21 | 17 | |
22 | 18 | *** Test Cases *** |
23 | 19 | Можливість оголосити однопредметний тендер | ... | ... |
Please
register
or
login
to post a comment