Exemplo n.º 1
0
 def prepare_data_for_showing_only_logs_for_current_organization(self):
     confirmation_page, email = register_and_get_email(self.driver)
     account_activate_page = ActivateAccountPage(self.driver)
     dbmanager = DatabaseManager()
     activation_code = dbmanager.get_activation_code(email.lower())
     account_activate_page.activate_account(activation_code)
     self.login(credential={USERNAME: email, PASSWORD: "******"})
 def setUpClass(cls):
     cls.driver = setup_driver()
     registration_confirmation_page, cls.email = register_and_get_email(cls.driver)
     assert REGISTRATION_SUCCESS_MESSAGE == registration_confirmation_page.registration_success_message()
     cls.account_activate_page = ActivateAccountPage(cls.driver)
     cls.postgres_dbmanager = DatabaseManager()
     cls.activation_code = cls.postgres_dbmanager.get_activation_code(cls.email.lower())
     cls.account_activate_page.activate_account(cls.activation_code)
Exemplo n.º 3
0
 def do_org_registartion(self):
     registration_confirmation_page, self.email = register_and_get_email(
         self.driver)
     self.assertEquals(
         registration_confirmation_page.registration_success_message(),
         fetch_(SUCCESS_MESSAGE,
                from_(REGISTRATION_DATA_FOR_SUCCESSFUL_REGISTRATION)))
     activate_account(self.driver, self.email.lower())
     return self.set_organization_number()
Exemplo n.º 4
0
    def setUp(self):
        super(TestActivateAccount, self).setUp()
        registration_confirmation_page, self.email = register_and_get_email(
            self.driver)
        self.assertEquals(
            registration_confirmation_page.registration_success_message(),
            REGISTRATION_SUCCESS_MESSAGE)

        self.account_activate_page = ActivateAccountPage(self.driver)
        self.dbmanager = DatabaseManager()
        self.activation_code = self.dbmanager.get_activation_code(
            self.email.lower())
        self.account_activate_page.activate_account(self.activation_code)
Exemplo n.º 5
0
    def test_should_show_default_datasender_for_newly_created_datasender(self):
        registration_confirmation_page, self.email = register_and_get_email(self.driver)
        assert REGISTRATION_SUCCESS_MESSAGE == registration_confirmation_page.registration_success_message()
        self.account_activate_page = ActivateAccountPage(self.driver)
        self.postgres_dbmanager = DatabaseManager()
        self.activation_code = self.postgres_dbmanager.get_activation_code(self.email.lower())
        self.account_activate_page.activate_account(self.activation_code)

        
        self.page = AllDataSendersPage(self.driver)
        self.page.load()
        
        all_ds_page = self.page
        self.assertEqual(1, all_ds_page.get_datasenders_count())
Exemplo n.º 6
0
 def test_successful_login_with_uppercased_email(self):
     registration_confirmation_page, self.email = register_and_get_email(
         self.driver)
     assert REGISTRATION_SUCCESS_MESSAGE == registration_confirmation_page.registration_success_message(
     )
     self.account_activate_page = ActivateAccountPage(self.driver)
     self.postgres_dbmanager = DatabaseManager()
     self.activation_code = self.postgres_dbmanager.get_activation_code(
         self.email.lower())
     self.account_activate_page.activate_account(self.activation_code)
     self.driver.go_to(LOGOUT)
     self.driver.go_to(DATA_WINNER_LOGIN_PAGE)
     login_page = LoginPage(self.driver)
     dashboard_page = login_page.do_successful_login_with({
         USERNAME:
         self.email.upper(),
         PASSWORD:
         u"ngo001"
     })
     self.assertEqual(dashboard_page.welcome_message(),
                      u"Welcome Mickey Gö!")
 def prepare_data_for_showing_only_logs_for_current_organization(cls):
     confirmation_page, cls.email = register_and_get_email(cls.driver)
     account_activate_page = ActivateAccountPage(cls.driver)
     dbmanager = DatabaseManager()
     activation_code = dbmanager.get_activation_code(cls.email.lower())
     account_activate_page.activate_account(activation_code)
Exemplo n.º 8
0
 def do_org_registartion(self):
     registration_confirmation_page, self.email = register_and_get_email(self.driver)
     self.assertEquals(registration_confirmation_page.registration_success_message(),
                       fetch_(SUCCESS_MESSAGE, from_(REGISTRATION_DATA_FOR_SUCCESSFUL_REGISTRATION)))