Skip to content

create the basic test structure and add tests to verify that registration and login are successful - #4

Open
lanovenkyi-web wants to merge 3 commits into
Romapsp:masterfrom
lanovenkyi-web:hw_1_Auto_BugBusters
Open

create the basic test structure and add tests to verify that registration and login are successful#4
lanovenkyi-web wants to merge 3 commits into
Romapsp:masterfrom
lanovenkyi-web:hw_1_Auto_BugBusters

Conversation

@lanovenkyi-web

Copy link
Copy Markdown

Creation of the “Polako Gedonist” core set of automated tests
Addition of the “Authorization” test and the “Registration” test

Comment thread tes/test_example.py Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Всю папку с файликом удали

Comment thread test_env.py Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Этот файл нам тоже не нужен. Удаляй

Comment thread BugBusters/tests/test_login.py Outdated
app.auth.open_login_form()
app.auth.login(Constants.EMAIL, Constants.PASSWORD)
app.page.wait_for_load_state("networkidle")
app.auth.should_be_link_to_profile() No newline at end of file

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Название метода не очевидное.
"Должно быть соедининено с профилем"?

@@ -0,0 +1,5 @@
from BugBusters.data.constants import Constants

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Точно не знаю, но гляньте, может константы тоже можно засунуть в инициализацию и не импортировать их каждый раз.


def test_create_event_page(app):
app.event_create.navigate(f"{Constants.BASE_URL}/events/create")
app.event_create.fill_creation_form("Party") No newline at end of file

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

"Party" > в переменную

@@ -0,0 +1,5 @@
from BugBusters.data.constants import Constants

def test_create_event_page(app):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Название теста не очень.
"Создать страницу с событием"
Такого функционала на сайте нет

Comment on lines +11 to +14
def create(self, title, desc):
self.title_field.fill(title)
self.desc_field.fill(desc)
self.page.click('#btn-create')

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Мне кажется, этих методов не хватит, чтобы создать мероприятие

Comment on lines +9 to +11
def update_name(self, name):
self.first_name.fill(name)
self.page.click('button.save') No newline at end of file

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Метод выглядит пока не готовым

Comment thread BugBusters/pages/registration_page.py Outdated
def __init__(self, page):
super().__init__(page)
self.login_btn = page.locator("a, button").get_by_text("Sign In")
self.no_account_link = page.get_by_text("Don't have an account", exact=False)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

get by text не лучшее решение, когда сайт поддерживает 2 и более языка.

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