-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Profile tests #1079
base: master
Are you sure you want to change the base?
Profile tests #1079
Conversation
Можливість створити профіль | ||
${profile_data}= test_profile_data ${CRITERIA['CRITERIA_UAID']} ${USERS.users['${e_admin}'].initial_data.dataType} | ||
${profile_data}= munchify ${profile_data} | ||
${profile_result}= Run As ${e_admin} Створити профіль ${profile_data} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
краще б було якби 'Створити профіль' повертало id, а не всю дані
|
||
Можливість додати ${filed_name} до профіля ${value} по ключу ${key_id} | ||
${profile_data}= Run As ${e_admin} Додати до профіля ${PROFILE['PROFILE_UAID']} ${filed_name} ${value} ${key_id} | ||
Run Keyword If '${filed_name}' == 'criteria' Append To List ${USERS.users['${e_admin}'].initial_profile['criteria']} ${value} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
не можу зрозуміти для чого ти два рази зберігаєш значення і в initial_data і в new_${filed_name}, одного разу мало б бути достатньо
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я записую в initial_profile , initial_data в мене використовується характеристикою,
я записую в кейводрі додати до профайла і для того щоб можна буро звірити додане, я ці дані записую в initial_profile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
не розумію логіку, чому тут треба двічі зберігати ці дані, щоб звірити поля достатньо використати new_${filed_name}
Set To Dictionary ${USERS.users['${e_admin}']} new_${field_name}=${field_value} | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
між ключовими словами має бути по два пусті рядки, поправ всюди
|
||
|
||
Звірити відображення ${field} поля характеристики профіля із ${value} для користувача ${username} по ключу ${id_key} | ||
Звірити поле характеристики в профілі із значенням ${username} ${PROFILE['PROFILE_UAID']} ${value} ${field} ${id_key} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тут трошки не правильна побудова ключового слова, поправ так щоб назва була змістовна і змінні передавалися відповідно
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Звірити відображення поля (Якшо перемістити сюди, то появляється помилка про multy keywords) ${field} характеристики профіля із ${value} для користувача ${username} по ключу ${id_key}
${profile_data}= Call Method ${USERS.users['${username}'].profile_client} patch_profile | ||
... ${profile_id} | ||
... ${data} | ||
Set_To_Object ${USERS.users['${username}'].profile_data} ${fieldname} ${fieldvalue} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
мені здається цей крок лишнім тут
|
||
|
||
Відображення коду класифікатора в профіля | ||
[Tags] ${USERS.users['${viewer}'].broker}: Відображення основних даних профайла |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
переглянь теги для всіх тест кейсів, раз ти десь пишеш профай, раз профіль
... modify_profile | ||
[Setup] Дочекатись синхронізації з майданчиком ${viewer} PROFILE | ||
Remove From Dictionary ${USERS.users['${viewer}'].profile_data} title | ||
Звірити відображення поля title профіля із ${USERS.users['${e_admin}'].new_title} для усіх користувачів |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
якщо ти хочеш звіряти для усіх користувачів, тоді Remove From Dictionary треба зробити для всіх користувачів
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
краще зробити звірення для одного користувача
[Teardown] Оновити LAST_MODIFICATION_DATE PROFILE | ||
${field_value}= create_unit_en | ||
Можливість змінити поле unit профіля на ${field_value} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
по два відступи, поправ всюди!
... viewer e_admin | ||
... ${USERS.users['${viewer}'].broker} ${USERS.users['${e_admin}'].broker} | ||
... profile_view | ||
${key} Вибрати значення для вимоги ${USERS.users['${viewer}'].profile_data.criteria[0].requirementGroups[0].requirements[0]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тут не має бути ${key}=?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Вибрати значення для вимоги" це метод повертає ключ який є в характеристиці
del data['additionalClassification'] | ||
del data['id'] | ||
del data['author'] | ||
return data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
не зрозуміла для чого цей метод?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
цей метод для видалення даних, які не потрібні для метода патч
Set To Dictionary ${USERS.users['${e_admin}']} initial_profile=${profile_data} | ||
Log ${USERS.users['${e_admin}']} | ||
Set To Dictionary ${PROFILE} PROFILE_UAID=${profile_result} | ||
log ${profile_result} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
дотримуйся одного стилю в виклику ключових слів, бажано щоб всі були з великої букви
Run As ${e_admin} Видалити профіль ${PROFILE['PROFILE_UAID']} | ||
|
||
|
||
Видалити дані |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
додай тут до назви 'з профіля' або щось типу того, щоб було зрозуміло, до чого це ключове слово
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
і де ти використовуєш це ключове слово?
Remove From Dictionary ${USERS.users['${viewer}'].profile_data.${path['path']}[${path['index']}]} ${field} | ||
|
||
|
||
Вибрати значення для вимоги |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
це також де використовуєш?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
для вимоги в requirements
|
||
Можливість додати ${filed_name} до профіля ${value} по ключу ${key_id} | ||
${profile_data}= Run As ${e_admin} Додати до профіля ${PROFILE['PROFILE_UAID']} ${filed_name} ${value} ${key_id} | ||
Run Keyword If '${filed_name}' == 'criteria' Append To List ${USERS.users['${e_admin}'].initial_profile['criteria']} ${value} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
не розумію логіку, чому тут треба двічі зберігати ці дані, щоб звірити поля достатньо використати new_${filed_name}
return data_type | ||
|
||
|
||
def choose_currency(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ці методи, де рандомно вибирається валюта і податок, лишні, позабирай їх
@@ -47,6 +47,11 @@ def get_fake_funder_scheme(): | |||
return fake.funder_scheme() | |||
|
|||
|
|||
def create_value_amount(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
вже є схожий метод create_fake_amount, дороби його щоб працював для твоїх тестів і для інших
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я зробив що create_value_amount є основним і добавив для інших тестів раніше було тільки така функція round(random.uniform(3000, 99999999.99), 2)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ти виніс це в окремий метод, але при цьому є схожий метод create_fake_amount, можна його допрацювати і мати один метод
|
||
|
||
def create_requirements(criteria_uaid, data_type): | ||
field_value = random.choice(["minValue", "maxValue", "expectedValue"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
можливо щоб було всі три значення одночасно?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В характеристиці можна вибрати один із трьох
@@ -47,6 +47,11 @@ def get_fake_funder_scheme(): | |||
return fake.funder_scheme() | |||
|
|||
|
|||
def create_value_amount(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ти виніс це в окремий метод, але при цьому є схожий метод create_fake_amount, можна його допрацювати і мати один метод
Звірити відображення поля value.currency профіля для усіх користувачів | ||
|
||
|
||
Відображення податока на додану вартість в профіля |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'податока', переглянь всі назви тест кейсів, в тебе часто помилки зустрічаються!
|
||
Відображення змін в податку на додану вартість в профіля | ||
[Tags] ${USERS.users['${viewer}'].broker}: Редагування профіля | ||
... viewer e_admin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
і поправ теги, бо не всюди правильні ролі вказані
Можливість знайти профіль по ідентифікатору для усіх користувачів | ||
|
||
|
||
Відображення коду класифікатора в профіля |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
у профілі повинно бути, поправ для всіх тестів
Можливість змінити поле criteria[0].description профіля на ${field_value} | ||
|
||
|
||
Відображення змін у опису характеристики |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
у описі
This change is