def test_is_account_admin_dashboard_page_loaded(self):

        """
        Check if the course dashboard page is loaded
        """
        # initialize
        dashboard_page = CourseAdminDashboardPage(self.driver)
        self.assertTrue(dashboard_page.is_loaded())
        # The Manage People button should be displayed for the selenium
        # user in this test.
        self.assertTrue(dashboard_page.manage_people_button_is_displayed())
コード例 #2
0
    def setUp(self):
        """
        Redirects browser to test course URL and login to PIN using
        specified credentials.
        """
        super(CourseAdminBaseTestCase, self).setUp()

        # instantiate
        self.dashboard_page = CourseAdminDashboardPage(self.driver)
        self.main_page = MainPageObject(self.driver)
        self.test_settings = settings.SELENIUM_CONFIG['class_roster']

        # This gets the URL of a course with a working class roster tool
        self.TOOL_RELATIVE_URL = self.test_settings['course_link']
        self.TOOL_URL = urljoin(self.CANVAS_BASE_URL, self.TOOL_RELATIVE_URL)
コード例 #3
0
    def setUp(self):
        """
        Redirects browser to test course URL and login to PIN using
        specified credentials.
        """
        super(CourseAdminBaseTestCase, self).setUp()

        # instantiate
        self.dashboard_page = CourseAdminDashboardPage(self.driver)
        self.manage_people = UserListPageObject(self.driver)
        self.test_settings = settings.SELENIUM_CONFIG['manage_people']

        # initialize
        if not self.dashboard_page.is_loaded():
            self.dashboard_page.get(self.TOOL_URL)

        # navigate to cross-list tool
        self.dashboard_page.select_manage_people_link()

        # check if page is loaded (which will also set the focus on the tool)
        self.assertTrue(self.manage_people.is_loaded())
class ClassRosterBaseTestCase(CourseAdminBaseTestCase):

    def setUp(self):
        """
        Redirects browser to test course URL and login to PIN using
        specified credentials.
        """
        super(CourseAdminBaseTestCase, self).setUp()

        # instantiate
        self.dashboard_page = CourseAdminDashboardPage(self.driver)
        self.main_page = MainPageObject(self.driver)
        self.test_settings = settings.SELENIUM_CONFIG['class_roster']

        # This gets the URL of a course with a working class roster tool
        self.TOOL_RELATIVE_URL = self.test_settings['course_link']
        self.TOOL_URL = urljoin(self.CANVAS_BASE_URL, self.TOOL_RELATIVE_URL)

    def load_class_roster(self):
        # Navigate to the working class roster tool
        self.dashboard_page.get(self.TOOL_URL)
        self.dashboard_page.focus_on_tool_frame()

        # Clicks on the class roster button from the dashboard
        self.dashboard_page.select_class_roster_link()
        self.assertTrue(self.main_page.is_loaded())
コード例 #5
0
class ClassRosterBaseTestCase(CourseAdminBaseTestCase):

    def setUp(self):
        """
        Redirects browser to test course URL and login to PIN using
        specified credentials.
        """
        super(CourseAdminBaseTestCase, self).setUp()

        # instantiate
        self.dashboard_page = CourseAdminDashboardPage(self.driver)
        self.main_page = MainPageObject(self.driver)
        self.test_settings = settings.SELENIUM_CONFIG['class_roster']

        # This gets the URL of a course with a working class roster tool
        self.TOOL_RELATIVE_URL = self.test_settings['course_link']
        self.TOOL_URL = urljoin(self.CANVAS_BASE_URL, self.TOOL_RELATIVE_URL)

    def load_class_roster(self):
        # Navigate to the working class roster tool
        self.dashboard_page.get(self.TOOL_URL)
        self.dashboard_page.focus_on_tool_frame()

        # Clicks on the class roster button from the dashboard
        self.dashboard_page.select_class_roster_link()
        self.assertTrue(self.main_page.is_loaded())
class ManagePeopleBaseTestCase(CourseAdminBaseTestCase):

    def setUp(self):
        """
        Redirects browser to test course URL and login to PIN using
        specified credentials.
        """
        super(CourseAdminBaseTestCase, self).setUp()

        # instantiate
        self.dashboard_page = CourseAdminDashboardPage(self.driver)
        self.manage_people = UserListPageObject(self.driver)
        self.test_settings = settings.SELENIUM_CONFIG['manage_people']

        # initialize
        if not self.dashboard_page.is_loaded():
            self.dashboard_page.get(self.TOOL_URL)

        # navigate to cross-list tool
        self.dashboard_page.select_manage_people_link()

        # check if page is loaded (which will also set the focus on the tool)
        self.assertTrue(self.manage_people.is_loaded())
    def setUp(self):
        """
        Redirects browser to test course URL and login to PIN using
        specified credentials.
        """
        super(CourseAdminBaseTestCase, self).setUp()

        # instantiate
        self.dashboard_page = CourseAdminDashboardPage(self.driver)
        self.main_page = MainPageObject(self.driver)
        self.test_settings = settings.SELENIUM_CONFIG['class_roster']

        # This gets the URL of a course with a working class roster tool
        self.TOOL_RELATIVE_URL = self.test_settings['course_link']
        self.TOOL_URL = urljoin(self.CANVAS_BASE_URL, self.TOOL_RELATIVE_URL)
コード例 #8
0
    def setUpClass(cls):
        super(CourseAdminBaseTestCase, cls).setUpClass()

        cls.USERNAME = settings.SELENIUM_CONFIG['selenium_username']
        cls.PASSWORD = settings.SELENIUM_CONFIG['selenium_password']
        cls.CANVAS_BASE_URL = settings.SELENIUM_CONFIG['canvas_base_url']
        cls.TOOL_RELATIVE_URL = settings.SELENIUM_CONFIG['manage_course'][
            'relative_url']
        cls.TOOL_URL = urljoin(cls.CANVAS_BASE_URL, cls.TOOL_RELATIVE_URL)
        cls.course_admin_dashboard_page = CourseAdminDashboardPage(cls.driver)
        cls.course_admin_dashboard_page.get(cls.TOOL_URL)

        cls.masquerade_page = CanvasMasqueradePageObject(
            cls.driver, cls.CANVAS_BASE_URL)
        login_page = PinLoginPageObject(cls.driver)
        if login_page.is_loaded():
            login_page.login_xid(cls.USERNAME, cls.PASSWORD)
        else:
            print('(User {} already logged in to PIN)'.format(cls.USERNAME))