def __init__(self,
                 email=TestBase.data()['existing_login'],
                 password=TestBase.data()['existing_password']):

        if email == None:
            self._email = TestBase.data()['existing_login']
        else:
            self._email = email
        if password == None:
            self._password = TestBase.data()['existing_password']
        elif password == "WRONG":
            self._password = TestBase.data()['not_existing_password']
        else:
            self._password = password
Beispiel #2
0
    def test_login_success(self, driver):
        welcome_page = WelcomePage(driver)
        login_page = LoginPage(driver)
        main_page = MainPage(driver)

        assert welcome_page.is_opened()
        assert welcome_page.login()
        assert login_page.is_opened()
        assert login_page.proceed_with_email(TestBase.data()['existing_login'])
        assert login_page.proceed_with_password(
            TestBase.data()['existing_password'])
        assert login_page.login()
        assert login_page.is_login_suceed()
        assert main_page.logout()
        assert welcome_page.is_opened()
Beispiel #3
0
    def test_login_fail(self, driver):

        welcome_page = WelcomePage(driver)
        login_page = LoginPage(driver)
        main_page = MainPage(driver)

        assert welcome_page.is_opened()
        assert welcome_page.login()
        assert login_page.is_opened()
        assert login_page.proceed_with_email(
            TestBase.data()['not_existing_login'], attlasian=False)
        assert login_page.proceed_with_password(
            TestBase.data()['not_existing_password'], attlasian=False)
        assert login_page.login(attlasian=False)
        assert login_page.is_login_failed()
        assert login_page.close_dialog()