Beispiel #1
0
class AkvoWebTestCase(SeleniumTestCase):

    def setUp(self):
        SeleniumTestCase.setUp(self)
        self.navigator = SeleniumNavigator(self.selenium)
        self.rsr = RSRNavigator(self.selenium)

    def open_home_page(self):
        self.rsr.open_home_page()
        self.assert_title_is("Akvo.org - See it happen")
class UserAdminTestCase(SeleniumTestCase):
    def setUp(self):
        SeleniumTestCase.setUp(self)
        self.navigator = SeleniumNavigator(self.selenium)
        self.rsr = RSRNavigator(self.selenium)
        self.rsr_user = RSRUser(self.selenium)
        self.gmail_reader = GMailReader(self.selenium)

    def open_sign_in_or_register_page(self):
        self.rsr.open_home_page()
        self.assert_title_is(ORGANISATION_NAME)
        self.assert_link_exists("Sign In")
        self.navigator.click_link("Sign In")
        self.assert_title_is(ORGANISATION_NAME)
        self.assert_location_contains("rsr/signin/?next=/")

    def open_organisation_selection_page_for_user_registration(self):
        self.open_sign_in_or_register_page()
        self.assert_link_exists("Register")
        self.navigator.click_link("Register")
        self.assert_title_is(ORGANISATION_NAME)
        self.assert_location_contains("rsr/accounts/register1")

    def select_organisation_and_open_user_details_entry_page(self):
        self.open_organisation_selection_page_for_user_registration()
        self.selenium.select("id_organisation", "label=Administrators")
        self.assert_submit_button_with_text_exists("Continue")
        self.navigator.click_submit_button_with_text("Continue")
        self.assert_title_is(ORGANISATION_NAME)
        self.assert_location_contains("rsr/accounts/register2/?org_id=")

    def verify_home_page_has_loaded(self):
        self.assert_title_is(ORGANISATION_NAME)
        self.assert_page_contains_text_items([
            "Focus Areas", "Get Solutions", "Education", "Directory", "News",
            "About", "Recent contributions"
        ])

    def open_user_admin_page(self):
        try:
            self.rsr.open_user_admin_page()
            self.verify_user_admin_page_has_loaded()
        except Exception, exception:
            self.fail("Unable to open user admin page: %s" % (exception))
class UserAdminTestCase(SeleniumTestCase):

    def setUp(self):
        SeleniumTestCase.setUp(self)
        self.navigator = SeleniumNavigator(self.selenium)
        self.rsr = RSRNavigator(self.selenium)
        self.rsr_user = RSRUser(self.selenium)
        self.gmail_reader = GMailReader(self.selenium)

    def open_sign_in_or_register_page(self):
        self.rsr.open_home_page()
        self.assert_title_is(ORGANISATION_NAME)
        self.assert_link_exists("Sign In")
        self.navigator.click_link("Sign In")
        self.assert_title_is(ORGANISATION_NAME)
        self.assert_location_contains("rsr/signin/?next=/")

    def open_organisation_selection_page_for_user_registration(self):
        self.open_sign_in_or_register_page()
        self.assert_link_exists("Register")
        self.navigator.click_link("Register")
        self.assert_title_is(ORGANISATION_NAME)
        self.assert_location_contains("rsr/accounts/register1")

    def select_organisation_and_open_user_details_entry_page(self):
        self.open_organisation_selection_page_for_user_registration()
        self.selenium.select("id_organisation", "label=Administrators")
        self.assert_submit_button_with_text_exists("Continue")
        self.navigator.click_submit_button_with_text("Continue")
        self.assert_title_is(ORGANISATION_NAME)
        self.assert_location_contains("rsr/accounts/register2/?org_id=")

    def verify_home_page_has_loaded(self):
        self.assert_title_is(ORGANISATION_NAME)
        self.assert_page_contains_text_items(["Focus Areas", "Get Solutions", "Education",
                                              "Directory", "News", "About", "Recent contributions"])

    def open_user_admin_page(self):
        try:
            self.rsr.open_user_admin_page()
            self.verify_user_admin_page_has_loaded()
        except Exception, exception:
            self.fail("Unable to open user admin page: %s" % (exception))
 def setUp(self):
     SeleniumTestCase.setUp(self)
     self.navigator = SeleniumNavigator(self.selenium)
     self.rsr = RSRNavigator(self.selenium)
     self.rsr_user = RSRUser(self.selenium)
     self.gmail_reader = GMailReader(self.selenium)
Beispiel #5
0
 def setUp(self):
     SeleniumTestCase.setUp(self)
     self.navigator = SeleniumNavigator(self.selenium)
     self.rsr = RSRNavigator(self.selenium)
 def setUp(self):
     SeleniumTestCase.setUp(self)
     self.navigator = SeleniumNavigator(self.selenium)
     self.rsr = RSRNavigator(self.selenium)
     self.rsr_user = RSRUser(self.selenium)
     self.gmail_reader = GMailReader(self.selenium)