Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 20 additions & 29 deletions test_data/specialists_page_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,23 @@


class SpecialistsPageData:
tab_title = ["Специалисты | BrainUp", "Specialists | BrainUp"]
tab_title = ("Специалисты | BrainUp", "Specialists | BrainUp")

page_title = ["Специалисты", "Specialists"]
page_title = ("Специалисты", "Specialists")

text_on_page = ["Обучающая программа BrainUp разработана совместно с лучшими специалистами "
text_on_page = ("Обучающая программа BrainUp разработана совместно с лучшими специалистами "
"в области сурдопедагогики из России и Беларуси",
"The BrainUp training program was developed jointly with the best specialists "
"in the field of deaf education from Russia and Belarus"]
"in the field of deaf education from Russia and Belarus")

specialists_names = [
["Гарбарук Екатерина Сергеевна", "Прошина Любовь Александровна", "Березкина Ксения Сергеевна",
"Метельская Наталья Николаевна", "Королева Инна Васильевна", "Юлия Кибалова", "Платоненко Дарья Сергеевна",
"Сивенкова Кристина Александровна"],
["Ekaterina Garbaruk", "Lubov Proshina", "Ksenia Berezkina", "Natalia Metelskaya", "Inna Koroleva",
"Yulia Kibalova", "Daria Platonenko", "Kristina Sivenkova"]
]
specialists_names = ("Гарбарук Екатерина Сергеевна", "Прошина Любовь Александровна", "Березкина Ксения Сергеевна",
"Метельская Наталья Николаевна", "Королева Инна Васильевна", "Юлия Кибалова",
"Платоненко Дарья Сергеевна", "Сивенкова Кристина Александровна",
"Ekaterina Garbaruk", "Lubov Proshina", "Ksenia Berezkina", "Natalia Metelskaya",
"Inna Koroleva", "Yulia Kibalova", "Daria Platonenko", "Kristina Sivenkova")

specialists_professions = [
["Кандидат биологических наук, специалист Лаборатории слуха и речи ПСПбГМУ, специалист "
specialists_professions = (
"Кандидат биологических наук, специалист Лаборатории слуха и речи ПСПбГМУ, специалист "
"в области диагностики слуховых нарушений",
"Сурдопедагог, РНПЦ оториноларингологии, опыт работы более 10 лет",
"Сурдопедагог, Городской ресурсный центр для детей с нарушением слуха, опыт работы более 10 лет",
Expand All @@ -30,8 +28,8 @@ class SpecialistsPageData:
'автор серии методических пособий "Учусь слушать и говорить"',
"Сурдопедагог, дефектолог, Лаборатория слуха и речи ПСПбГМУ, опыт работы более 10 лет",
"Сурдопедагог, РНПЦ оториноларингологии, опыт работы более 3 лет",
"Сурдопедагог, СПб Сурдоцентр, молодой специалист"],
["Candidate of Biological Sciences, expert at the Laboratory of Hearing and Speech "
"Сурдопедагог, СПб Сурдоцентр, молодой специалист",
"Candidate of Biological Sciences, expert at the Laboratory of Hearing and Speech "
"(The Pavlov First Saint Petersburg State Medical University), expert in diagnosis of aural disorders",
"Teacher of the deaf, Belarusian Republican Scientific and Practical Center of Otorhinolaryngology, "
"10+ years of experience",
Expand All @@ -43,25 +41,18 @@ class SpecialistsPageData:
"(The Pavlov First Saint Petersburg State Medical University), 10+ years of experience",
"Teacher of the deaf, Belarusian Republican Scientific and Practical Center of Otorhinolaryngology, "
"3+ years of experience",
"Teacher of the deaf, Saint Petersburg Center of Otorhinolaryngology, young professional"]
]
"Teacher of the deaf, Saint Petersburg Center of Otorhinolaryngology, young professional")

all_specialists_link_text = ["Все Специалисты", "All Specialists"]
all_specialists_link_text = ("Все Специалисты", "All Specialists")

all_specialists_link_href = f"{Links.URL_MAIN_PAGE}specialists#"

all_specialists_link_status_code = 200
all_specialists_link_status_code = (200,)

images_src = [
"https://brnup.s3.eu-north-1.amazonaws.com/pictures/specialists/garbaruk.png",
"https://brnup.s3.eu-north-1.amazonaws.com/pictures/specialists/proshina.png",
"https://brnup.s3.eu-north-1.amazonaws.com/pictures/specialists/berezkina.png",
"https://brnup.s3.eu-north-1.amazonaws.com/pictures/specialists/metelskaya.png",
"https://brnup.s3.eu-north-1.amazonaws.com/pictures/specialists/koroleva.png",
"https://brnup.s3.eu-north-1.amazonaws.com/pictures/specialists/kibalova.png",
"https://brnup.s3.eu-north-1.amazonaws.com/pictures/specialists/platonenko.png",
"https://brnup.s3.eu-north-1.amazonaws.com/pictures/specialists/sivenkova.png"
]
s = 'https://brnup.s3.eu-north-1.amazonaws.com/pictures/specialists/'
e = '.png'
images_src = (f'{s}garbaruk{e}', f'{s}proshina{e}', f'{s}berezkina{e}', f'{s}metelskaya{e}',
f'{s}koroleva{e}', f'{s}kibalova{e}', f'{s}platonenko{e}', f'{s}sivenkova{e}')

images_alt = "user avatar"

Expand Down
8 changes: 4 additions & 4 deletions test_data/start_unauthorized_page_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ class StartUnauthorizedPageData:
page_subtitles = ["BRAINUP", "ОНЛАЙН ЗАНЯТИЯ", "РАЗВИТИЕ"]

text_on_page = {
"text_in_section1": [
"text_in_section1": (
"Наш сайт - это платформа интерактивных упражнений для взрослых и детей от семи лет с когнитивными "
"проблемами восприятия речи, которая помогает тренировать способности слушать и понимать",
"Our site is a platform of interactive exercises for adults and children from the age of seven with "
"cognitive speech perception problems, which helps to train the ability to listen and understand."],
"cognitive speech perception problems, which helps to train the ability to listen and understand."),

"text_in_section2": [
"text_in_section2": (
"Тренируйтесь всего от 30 минут в день для развития и получения результата",

"Первая бесплатная онлайн программа для взрослых и детей с когнитивными проблемами восприятия речи. "
Expand All @@ -36,7 +36,7 @@ class StartUnauthorizedPageData:
"Занимаясь по нашей программе, вы сможете, развивать слух в различных акустических ситуациях; "
"тренировать слуховую память, прослушивая упражнения столько раз, сколько необходимо именно вам. "
"А также, расширить словарный запас в интересной игровой форме и в дальшейшем использовать новые слова "
"в общении с друзьями и знакомыми."]
"в общении с друзьями и знакомыми.")
}

login_link_text = ["Начать", "Login"]
Expand Down
14 changes: 7 additions & 7 deletions tests/specialists_page_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_sp_01_01_verify_page_presence_and_visibility(self, driver, specialists_
page = SpecialistsPage(driver)
page_content_presence = page.check_presence_of_page_content()
page_content_visibility = page.check_visibility_of_page_content()
assert page_content_presence is not None, "The page content is absent in DOM"
assert page_content_presence, "The page content is absent in DOM"
assert page_content_visibility, "The page content is invisible"

@allure.title("""Verify the composition and visibility of elements
Expand Down Expand Up @@ -110,10 +110,10 @@ def test_sp_02_04_verify_name_and_profession_in_cards(self, driver, specialists_
name_values = page.get_name_values_in_cards()
profession_values = page.get_profession_values_in_cards()
assert name_values, "Name values in cards are empty"
assert name_values in SpecialistsPageData.specialists_names, \
"Names in specialist cards mismatch the valid values"
assert all(element in SpecialistsPageData.specialists_names for element in name_values), \
"Names in specialist cards mismatch valid values"
assert profession_values, "Profession values in cards are empty"
assert profession_values in SpecialistsPageData.specialists_professions, \
assert all(element in SpecialistsPageData.specialists_professions for element in profession_values), \
"Professions in specialist cards mismatch valid values"

@allure.title("Verify text in the 'All Specialists' link")
Expand All @@ -135,7 +135,7 @@ def test_sp_03_01_verify_all_specialists_link(self, driver, specialists_page_ope
assert link_href, "Link href is empty"
assert link_href == SpecialistsPageData.all_specialists_link_href, \
"The attribute 'href' of the link mismatches the valid value"
assert link_status_code == SpecialistsPageData.all_specialists_link_status_code, \
assert link_status_code in SpecialistsPageData.all_specialists_link_status_code, \
"The status code of the link mismatches the valid value"

@allure.title("""Verify that the 'All Specialists' link leads an unauthorized user
Expand Down Expand Up @@ -170,10 +170,10 @@ def test_sp_04_01_verify_images_attributes_in_cards(self, driver, specialists_pa
images_src = page.get_images_src()
images_alt = page.get_images_alt()
assert images_src, "The 'src' attribute value of some card images is empty"
assert images_src == SpecialistsPageData.images_src, \
assert all(element in SpecialistsPageData.images_src for element in images_src), \
"The 'src' attribute of the card images mismatches valid values"
assert images_alt, "The 'alt' attribute value of some card images is empty"
assert all(image_alt == SpecialistsPageData.images_alt for image_alt in images_alt), \
assert all(element == SpecialistsPageData.images_alt for element in images_alt), \
"The 'alt' attribute value of some card images is empty or mismatches valid values"

@allure.title("Verify sizes of images in specialist cards in the grid")
Expand Down
Loading