From c77426eb8201411ea9319f3d02e9e6fe3b1b29d2 Mon Sep 17 00:00:00 2001 From: alexey-kurbetyev Date: Mon, 20 Jul 2020 22:24:58 +0300 Subject: [PATCH] Login test --- python_oop.py | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/python_oop.py b/python_oop.py index 9332b4b..a504618 100644 --- a/python_oop.py +++ b/python_oop.py @@ -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('alex@gmail.com', 'kasurasfyev') +run1.login_flow() +run2 = TestRunBuilder('alexdsadasdasdada@gmail.com', 'kasdasdadasdasdasdaurasfyev') +run2.login_flow() + + + + + + + + # test_run_smoke = TestRunBuilder(username, user_email, user_password) # test_run_sanity = TestRunBuilder(username, user_email, user_password)