Skip to content
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

Login test #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
38 changes: 36 additions & 2 deletions python_oop.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,43 @@
- Run all your testsuite using calling methods for suite_object
"""


class TestRunBuilder:
pass
login_url = 'https://react-redux.realworld.io/#/login?_k=2vjfqt'

def __init__(self, email, password):
self.email = email
self.password = password
if '@' in email and len(email) < 25:
print(f"{email} - valid email")
else:
print(f"{email} - invalid email")
if len(password) > 8 and len(password) < 20:
print(f"{password} - valid password")
else:
print(f"{password} - invalid password")


def login_flow(self):
print(f'- Open login page {self.login_url}')
print(f'- Fill Username field as {self.email}')
print(f'- Fill Password field as {self.password}')
print('- Click on [Sign in] button')




run1 = TestRunBuilder('[email protected]', 'kasurasfyev')
run1.login_flow()
run2 = TestRunBuilder('[email protected]', 'kasdasdadasdasdasdaurasfyev')
run2.login_flow()









# test_run_smoke = TestRunBuilder(username, user_email, user_password)
# test_run_sanity = TestRunBuilder(username, user_email, user_password)
Expand Down