def test_ForgotPasswordUnSuccess2(self):
     url_1 = self.base_url + '/password-reset'
     text1 = 'Please, enter the valid email address associated to BiziBAZA and enter a new password.'
     driver = self.driver
     driver.get(self.base_url)
     LoginPage.clickForgotPasswordButton(self)
     self.assertEqual(url_1, HelperTestBase.getURL(self))
     self.assertEqual(text1, ForgotPasswordPage.getSupportMessage(self))
     ForgotPasswordPage.typeEmail(self, '')
     self.assertEqual(url_1, HelperTestBase.getURL(self))
     self.assertIs(False, HelperTestBase.checkElementEnabled(self, "[data-test-id='resetBtn']"))
    def test_ForgotPasswordStartClose(self):
        url = self.base_url + '/login'
        url1 = self.base_url + '/password-reset'
        text1 = 'Please, enter the valid email address associated to BiziBAZA and enter a new password.'
        driver = self.driver
        driver.get(self.base_url)
        LoginPage.clickForgotPasswordButton(self)

        self.assertEqual(text1, ForgotPasswordPage.getSupportMessage(self))
        self.assertIs(HelperTestBase.checkElementPresent(self, "[data-test-id='emailInput']"), True)
        self.assertIs(HelperTestBase.checkElementPresent(self, "[data-test-id='resendBtn']"), True)
        HelperTestBase.clickAndWait(self, "[data-test-id='loginLink']")
        self.assertEqual(url, HelperTestBase.getURL(self))
    def test_ForgotPasswordSuccess(self):
        url_1 = self.base_url + '/password-reset'
        text = 'Please, enter the valid email address associated to BiziBAZA and enter a new password.'
        text1 = 'Success!'
        text2 = 'Reset instruction has been sent to your email address.'
        driver = self.driver
        driver.maximize_window()
        driver.get(self.base_url)
        LoginPage.clickForgotPasswordButton(self)

        self.assertEqual(text, ForgotPasswordPage.getSupportMessage(self))
        ForgotPasswordPage.typeEmail(self, '*****@*****.**')
        ForgotPasswordPage.clickSendButton(self)
        self.assertEqual(text1, HelperTestBase.getModalHeader(self))
        self.assertEqual(text2, HelperTestBase.getModalMessage(self))
        HelperTestBase.clickYesButton(self)
 def test_ForgotPasswordUnSuccess4(self):
     url_1 = self.base_url + '/password-reset'
     text1 = 'Please, enter the valid email address associated to BiziBAZA and enter a new password.'
     text2 = 'Unable to send an email:'
     text3 = 'User with email:[email protected], not found'
     driver = self.driver
     driver.get(self.base_url)
     LoginPage.clickForgotPasswordButton(self)
     self.assertEqual(url_1, HelperTestBase.getURL(self))
     self.assertEqual(text1, ForgotPasswordPage.getSupportMessage(self))
     ForgotPasswordPage.typeEmail(self, '*****@*****.**')
     ForgotPasswordPage.clickSendButton(self)
     self.assertEqual(url_1, HelperTestBase.getURL(self))
     self.assertEqual(text2, HelperTestBase.getModalHeader(self))
     self.assertEqual(text3, HelperTestBase.getModalMessage(self))
     HelperTestBase.clickYesButton(self)