Ejemplo n.º 1
0
    def test_login_with_expired_trial_account(self):
        self.driver.go_to(DATA_WINNER_LOGIN_PAGE)
        dbmanager = DatabaseManager()
        dbmanager.update_active_date_to_expired(
            EXPIRED_TRIAL_ACCOUNT[USERNAME], 365)
        login_page = LoginPage(self.driver)
        time.sleep(2)
        login_page.login_with(EXPIRED_TRIAL_ACCOUNT)

        self.assertEqual(login_page.get_error_message(),
                         fetch_(ERROR_MESSAGE, from_(EXPIRED_TRIAL_ACCOUNT)))
Ejemplo n.º 2
0
    def test_login_with_expired_trial_account(self):
        self.driver.go_to(DATA_WINNER_LOGIN_PAGE)
        dbmanager = DatabaseManager()
        dbmanager.update_active_date_to_expired(
            EXPIRED_TRIAL_ACCOUNT[USERNAME], 31)
        login_page = LoginPage(self.driver)
        login_page.login_with(EXPIRED_TRIAL_ACCOUNT)
        expired_trail_account_page = ExpiredTrialPage(self.driver)
        self.assertEqual(expired_trail_account_page.get_error_message(),
                         fetch_(ERROR_MESSAGE, from_(EXPIRED_TRIAL_ACCOUNT)))

        subscribe_button = expired_trail_account_page.get_subscribe_button()
        self.assertEqual("Subscribe Now", subscribe_button[0].text)