Skip to content

feat: добавлено решение финального проекта#4

Open
Airflp wants to merge 3 commits intomainfrom
develop
Open

feat: добавлено решение финального проекта#4
Airflp wants to merge 3 commits intomainfrom
develop

Conversation

@Airflp
Copy link
Owner

@Airflp Airflp commented Feb 22, 2026

No description provided.

from utils.config import BASE_URL, STELLAR_EMAIL, STELLAR_PASSWORD


def test_go_to_personal_account(driver):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно исправить здесь и далее: Для корректного запуска тестов необходимо код с шагами теста поместить в тестовый метод (нейминг начинается с test_), а метод - в тестовый класс (нейминг начинается с Test). Необходимо привести к такому формату все модули внутри пакета tests

wait.until(EC.element_to_be_clickable(ConstructorPage.FILLINGS)).click()
wait.until(EC.element_to_be_clickable(ConstructorPage.BUNS)).click()

assert True

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Необходимо исправить: это проверка-заглушка. Нужно убедиться что переключение по табам произошло успешно, а не просто кликать по ним. В идеале, реализовать один параметризованный тест

driver.find_element(*LoginPage.LOGIN_BUTTON).click()

wait.until(EC.url_changes(f"{BASE_URL}/login"))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Необходимо исправить: в модулях с тестами должны быть только тесты. Вспомогательные функции стоит вынести в модуль helpers

Comment on lines +26 to +47
def test_login_from_main_page(driver):
driver.get(BASE_URL)
driver.find_element(*MainPage.LOGIN_BUTTON).click()
login(driver)


def test_login_from_personal_account(driver):
driver.get(BASE_URL)
driver.find_element(*MainPage.PERSONAL_ACCOUNT).click()
login(driver)


def test_login_from_registration_page(driver):
driver.get(f"{BASE_URL}/register")
driver.find_element(*RegistrationPage.LOGIN_LINK).click()
login(driver)


def test_login_from_forgot_password_page(driver):
driver.get(f"{BASE_URL}/forgot-password")
driver.find_element(*ForgotPasswordPage.LOGIN_LINK).click()
login(driver)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Необходимо исправить: эти тесты ничего не проверяют. Проверки необходимо осуществлять с помощью assert-инструкций

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Необходимо исправить: тут явно не хватает тестов

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants