Beispiel #1
0
    def setUp(self):
        super(DashboardTest, self).setUp()

        studio_login = StudioLoginApi()
        studio_login.authenticate(self.browser)

        lms_login = LmsLoginApi()
        lms_login.authenticate(self.browser)

        self.studio_home_page = DashboardPageExtended(self.browser)
        self.course_info = get_course_info()
        self.studio_course_outline = CourseOutlinePageExtended(
            self.browser, self.course_info['org'], self.course_info['number'],
            self.course_info['run']
        )
        self.lms_courseware = CoursewarePageExtended(
            self.browser,
            get_course_key(self.course_info)
        )
        self.course_page = CourseHomePageExtended(
            self.browser, get_course_info()
        )
        self.dashboard_page = DashboardPageExtended(self.browser)

        self.dashboard_page.visit()
Beispiel #2
0
    def test_resume_course(self):
        """
        Verifies that user can successfully resume the course
        """
        course_page = CourseInfoPageExtended(self.browser, get_course_info())
        courseware_page = CoursewarePage(self.browser, get_course_info())

        self.dashboard_page.select_course(get_course_display_name())
        course_page.wait_for_page()
        course_page.click_resume_button()
        courseware_page.wait_for_page()
    def setUp(self):
        """
        Common setup for component tests
        """
        super(StudioLmsComponentBaseTest, self).setUp()

        studio_login = StudioLoginApi()
        studio_login.authenticate(self.browser)

        lms_login = LmsLoginApi()
        lms_login.authenticate(self.browser)

        self.unit_container_page = UnitPageExtended(
            self.browser, None
        )

        self.studio_home_page = DashboardPageExtended(self.browser)

        self.course_info = get_course_info()

        self.studio_course_outline = CourseOutlinePageExtended(
            self.browser, self.course_info['org'], self.course_info['number'],
            self.course_info['run'])

        self.lms_courseware = CoursewarePageExtended(
            self.browser,
            get_course_key(self.course_info)
        )
        self.studio_course_outline.visit()
        # Delete any existing sections
        self.studio_course_outline.delete_all_sections()
Beispiel #4
0
    def setUp(self):
        """
        Common setup for component tests
        """
        super(StudioLmsComponentBaseTest, self).setUp()

        studio_login = StudioLoginApi()
        studio_login.authenticate(self.browser)

        lms_login = LmsLoginApi()
        lms_login.authenticate(self.browser)

        self.unit_container_page = UnitPageExtended(self.browser, None)

        self.studio_home_page = DashboardPageExtended(self.browser)

        self.course_info = get_course_info()

        self.studio_course_outline = CourseOutlinePageExtended(
            self.browser, self.course_info['org'], self.course_info['number'],
            self.course_info['run'])

        self.lms_courseware = CoursewarePageExtended(
            self.browser, get_course_key(self.course_info))
        self.studio_course_outline.visit()
        # Delete any existing sections
        self.studio_course_outline.delete_all_sections()
    def setUp(self):
        super(ScheduleAndDetailsLinks, self).setUp()

        studio_login = StudioLoginApi()
        studio_login.authenticate(self.browser)

        self.course_info = get_course_info()

        self.settings_page = SettingsPageExtended(
            self.browser,
            self.course_info['org'],
            self.course_info['number'],
            self.course_info['run']
        )

        self.grading_page = GradingPageExtended(
            self.browser,
            self.course_info['org'],
            self.course_info['number'],
            self.course_info['run']
        )
        self.group_configuration = GroupConfigurationsPage(
            self.browser,
            self.course_info['org'],
            self.course_info['number'],
            self.course_info['run']
        )
        self.advanced_settings = AdvancedSettingsPage(
            self.browser,
            self.course_info['org'],
            self.course_info['number'],
            self.course_info['run']
        )
        self.course_team_page = UsersPageMixin(self.browser)
 def test_view_live_pages(self):
     """
     Verifies that user can View live course from pages page
     """
     self.pages_page.click_view_live_button()
     courseware_page = CoursewarePage(
         self.browser, get_course_info())
     courseware_page.wait_for_page()
Beispiel #7
0
 def test_view_live_from_dashboard(self):
     """
     Verifies that user can view live course from studio dashboard
     """
     self.studio_home_page.visit()
     self.studio_home_page.click_view_live_button()
     courseware_page = CoursewarePage(self.browser, get_course_info())
     courseware_page.wait_for_page()
    def setUp(self):
        super(TestCourseImport, self).setUp()
        login_api = StudioLoginApi()
        login_api.authenticate(self.browser)

        self.course_info = get_course_info()

        self.import_page = ImportCoursePageExtended(*self.page_args())
        self.course_outline_page = CourseOutlinePageExtended(*self.page_args())
Beispiel #9
0
    def setUp(self):
        super(TestCourseImport, self).setUp()
        login_api = StudioLoginApi()
        login_api.authenticate(self.browser)

        self.course_info = get_course_info()

        self.import_page = ImportCoursePageExtended(*self.page_args())
        self.course_outline_page = CourseOutlinePageExtended(*self.page_args())
Beispiel #10
0
    def clean_up_function(self):
        """
        Clean up function to clean the course
        """
        super(StudioBaseTestClass, self).tearDown()
        course_info = get_course_info()

        pages_page = PagesPageExtended(self.browser, course_info['org'],
                                       course_info['number'],
                                       course_info['run'])

        course_update_page = CourseUpdatesPageExtended(self.browser,
                                                       course_info['org'],
                                                       course_info['number'],
                                                       course_info['run'])

        grading_page = GradingPageExtended(self.browser,
                                           self.course_info['org'],
                                           self.course_info['number'],
                                           self.course_info['run'])

        studio_course_outline = CourseOutlinePageExtended(
            self.browser, self.course_info['org'], self.course_info['number'],
            self.course_info['run'])

        textbook_page = TextbookPageExtended(self.browser,
                                             self.course_info['org'],
                                             self.course_info['number'],
                                             self.course_info['run'])

        login_api = StudioLoginApi()
        login_api.authenticate(self.browser)

        pages_page.visit()
        if pages_page.get_custom_page_count() > 0:
            pages_page.wait_for_the_visibility_of_new_page()
            pages_page.delete_all_pages()

        if pages_page.toggle_wiki_page_show_value() is False:
            pages_page.toggle_wiki_page_display()
            self.assertTrue(pages_page.toggle_wiki_page_show_value())

        course_update_page.visit()
        course_update_page.delete_all_course_updates()

        grading_page.visit()
        grading_page.remove_all_grades()
        grading_page.delete_all_assignment_types()

        studio_course_outline.visit()
        studio_course_outline.make_sure_only_one_section_is_present()

        textbook_page.visit()
        textbook_page.delete_all_textbooks()
Beispiel #11
0
    def setUp(self):
        super(CoursePagesTest, self).setUp()
        self.course_info = get_course_info()

        login_api = StudioLoginApi()
        login_api.authenticate(self.browser)

        self.pages_page = PagesPageExtended(self.browser,
                                            self.course_info['org'],
                                            self.course_info['number'],
                                            self.course_info['run'])
    def test_course_outline(self):
        """
        Verifies that user can click Edit Start Date button and is navigated
        to Schedule and Details page, and that the Help link for
        'Learn more about content visibility settings' is working.
        """
        studio_login_page = StudioLogin(self.browser)
        studio_home_page = DashboardPageExtended(self.browser)
        studio_login_page.visit()
        studio_login_page.login(DEMO_COURSE_USER, DEMO_COURSE_PASSWORD)

        course_info = get_course_info()

        studio_course_outline = CourseOutlinePageExtended(
            self.browser, course_info['org'], course_info['number'],
            course_info['run'])

        schedule_page = SettingsPageExtended(self.browser, course_info['org'],
                                             course_info['number'],
                                             course_info['run'])

        # Verification only, should be on this page after login.
        studio_home_page.wait_for_page()

        # Navigate to the course's outline page
        studio_home_page.select_course(get_course_display_name())
        studio_course_outline.wait_for_page()

        # First verify the Help link
        expected_href = 'https://edx.readthedocs.io/projects/' \
                        'edx-partner-course-staff/en/latest/' \
                        'developing_course/controlling_content_visibility.html'
        # Assert that help link is correct.
        assert_side_bar_help_link(
            test=self,
            page=studio_course_outline,
            href=expected_href,
            help_text='Learn more about content visibility settings',
            as_list_item=False)

        # If the help page is still up (see LT-53), then close it.
        if self.browser.current_url.startswith('https://edx.readthedocs.io'):
            # TODO wrap this in a try/except block or otherwise harden,
            # make sure that you now have an active window (the other one)
            # and it's the right one (i.e. Studio or LMS)
            self.browser.close()  # close only the current window
            self.browser.switch_to_window(self.browser.window_handles[0])

        # Now do the verification for the edit start date button.
        studio_course_outline.click_edit_start_date_button()

        # This wait_for_page will also assert that we are on the correct page.
        schedule_page.wait_for_page()
Beispiel #13
0
    def setUp(self):
        super(CourseHandoutTest, self).setUp()

        login_api = StudioLoginApi()
        login_api.authenticate(self.browser)

        self.course_info = get_course_info()

        self.course_update_page = CourseUpdatesPageExtended(
            self.browser, self.course_info['org'], self.course_info['number'],
            self.course_info['run'])
        self.course_update_page.visit()
    def setUp(self):
        super(DashboardTest, self).setUp()

        studio_login = StudioLoginApi()
        studio_login.authenticate(self.browser)

        lms_login = LmsLoginApi()
        lms_login.authenticate(self.browser)

        self.studio_home_page = DashboardPageExtended(self.browser)
        self.course_info = get_course_info()
        self.studio_course_outline = CourseOutlinePageExtended(
            self.browser, self.course_info['org'], self.course_info['number'],
            self.course_info['run'])
        self.lms_courseware = CoursewarePageExtended(
            self.browser, get_course_key(self.course_info))
        self.course_page = CourseHomePageExtended(self.browser,
                                                  get_course_info())
        self.dashboard_page = DashboardPageExtended(self.browser)

        self.dashboard_page.visit()
    def setUp(self):
        super(ScheduleAndDetailsTest, self).setUp()

        studio_login = StudioLoginApi()
        studio_login.authenticate(self.browser)

        self.course_info = get_course_info()

        self.settings_page = SettingsPageExtended(self.browser,
                                                  self.course_info['org'],
                                                  self.course_info['number'],
                                                  self.course_info['run'])
        self.settings_page.visit()
Beispiel #16
0
    def test_asset_crud(self):
        studio_login = StudioLoginApi()
        studio_login.authenticate(self.browser)
        course_info = get_course_info()

        asset_page = AssetIndexPageExtended(
            self.browser,
            course_info['org'],
            course_info['number'],
            course_info['run']
        )
        asset_page.visit()
        file_names = ['README.rst', 'test_pdf.pdf']

        # The course should start with no assets uploaded.
        # There is a bit of Uncertainty Principle here, as we are
        # using the feature itself to set up the course context.
        # TODO: this should be replaced when we have a better
        # mechanism for setting up courses for testing.
        asset_page.delete_all_assets()  # Put the course in a known state
        # There should be no uploaded assets
        self.assertEqual(asset_page.asset_files_count, 0)

        # Upload the files
        asset_page.open_upload_file_prompt()
        upload_new_file(asset_page, file_names)
        # Assert that the files have been uploaded.
        self.assertEqual(file_names, asset_page.asset_files_names)

        # Verify that a file can be locked
        asset_page.set_asset_lock()
        # Get the list of locked assets, there should be one
        locked_assets = asset_page.asset_locks(locked_only=True)
        self.assertEqual(len(locked_assets), 1)

        # Confirm that there are 2 assets, with the first
        # locked and the second unlocked.
        all_assets = asset_page.asset_locks(locked_only=False)
        self.assertEqual(len(all_assets), 2)
        self.assertTrue(all_assets[0].get_attribute('checked'))
        self.assertIsNone(all_assets[1].get_attribute('checked'))

        # Verify that the files can be deleted
        for name in asset_page.asset_files_names:
            asset_page.delete_asset_named(name)
            # Assert files have been deleted.
            self.assertNotIn(name, asset_page.asset_files_names)

        # There should now be no uploaded assets
        self.assertEqual(asset_page.asset_files_count, 0)
    def setUp(self):
        super(ScheduleAndDetailsTest, self).setUp()

        studio_login = StudioLoginApi()
        studio_login.authenticate(self.browser)

        self.course_info = get_course_info()

        self.settings_page = SettingsPageExtended(
            self.browser,
            self.course_info['org'],
            self.course_info['number'],
            self.course_info['run']
        )
        self.settings_page.visit()
Beispiel #18
0
 def click_view_live_button(self):
     """
     Clicks view live button
     """
     disable_animations(self)
     course_info = get_course_info()
     course_key = get_course_key({
         'course_org': course_info['org'],
         'course_num': course_info['number'],
         'course_run': course_info['run']
     })
     self.browser.execute_script(
         "document.querySelectorAll('[data-course-key = \""
         "{}\"] .view-button')[0].click();".format(str(course_key)))
     self.browser.switch_to_window(self.browser.window_handles[-1])
    def assert_page_is_not_shown_in_lms(self, page_name):
        """
        Confirms the page is not shown in LMS

        Arguments:
            page_name(str): Name of the page not to be shown
        """
        course_info = get_course_info()
        course_page = CourseInfoPageExtended(
            self.browser, get_course_key(course_info)
        )

        course_page.visit()
        pages_in_tab = course_page.get_page_names_in_tab()
        self.assertNotIn(page_name, pages_in_tab)
Beispiel #20
0
    def setUp(self):
        super(CourseHandoutTest, self).setUp()

        login_api = StudioLoginApi()
        login_api.authenticate(self.browser)

        self.course_info = get_course_info()

        self.course_update_page = CourseUpdatesPageExtended(
            self.browser,
            self.course_info['org'],
            self.course_info['number'],
            self.course_info['run']
        )
        self.course_update_page.visit()
Beispiel #21
0
    def setUp(self):
        super(CourseUpdateTest, self).setUp()

        login_api = StudioLoginApi()
        login_api.authenticate(self.browser)

        self.course_info = get_course_info()

        self.course_update_page = CourseUpdatesPageExtended(
            self.browser, self.course_info['org'], self.course_info['number'],
            self.course_info['run'])
        self.course_update_page.visit()
        self.course_update_content_selector = '#course-update-list li' \
                                              ' .post-preview .update-contents'
        self.course_update_text = 'New update:{}'.format(uuid4().hex)
Beispiel #22
0
 def click_view_live_button(self):
     """
     Clicks view live button
     """
     disable_animations(self)
     course_info = get_course_info()
     course_key = get_course_key({
         'course_org': course_info['org'],
         'course_num': course_info['number'],
         'course_run': course_info['run']
     })
     self.browser.execute_script(
         "document.querySelectorAll('[data-course-key = \""
         "{}\"] .view-button')[0].click();".format(str(course_key)))
     self.browser.switch_to_window(self.browser.window_handles[-1])
Beispiel #23
0
    def setUp(self):
        """
        Initialize the page object
        """
        super(TestVideoUploadHelp, self).setUp()

        lms_login = LmsLoginApi()
        lms_login.authenticate(self.browser)

        self.course_info = get_course_info()
        self.video_upload_page = VideoUploadPage(self.browser,
                                                 self.course_info['org'],
                                                 self.course_info['number'],
                                                 self.course_info['run'])

        self.video_upload_page.visit()
    def setUp(self):
        super(AnalyticsTest, self).setUp()

        login_api = LmsLoginApi()
        login_api.authenticate(self.browser)

        course_info = get_course_info()
        self.dashboard_page = DashboardPageExtended(self.browser)
        self.instructor_dashboard = InstructorDashboardPageExtended(
            self.browser, get_course_key(course_info))
        self.course_page = CourseHomePageExtended(self.browser,
                                                  get_course_key(course_info))
        self.dashboard_page.visit()
        self.dashboard_page.select_course(get_course_display_name())
        self.course_page.wait_for_page()
        self.instructor_dashboard.visit()
Beispiel #25
0
    def setUp(self):
        """
        Initialize the page object
        """
        super(StudioHomeTest, self).setUp()

        login_api = StudioLoginApi()
        login_api.authenticate(self.browser)

        self.studio_home_page = DashboardPageExtended(self.browser)

        self.course_info = get_course_info()

        self.studio_course_outline = CourseOutlinePage(
            self.browser, self.course_info['org'], self.course_info['number'],
            self.course_info['run'])
Beispiel #26
0
    def setUp(self):
        """
        Initialize the page object
        """
        super(StudioHomeTest, self).setUp()

        login_api = StudioLoginApi()
        login_api.authenticate(self.browser)

        self.studio_home_page = DashboardPageExtended(self.browser)

        self.course_info = get_course_info()

        self.studio_course_outline = CourseOutlinePage(
            self.browser, self.course_info['org'], self.course_info['number'],
            self.course_info['run'])
    def setUp(self):
        """
        Initialize the page object
        """
        super(TestVideoUploadHelp, self).setUp()

        studio_login = StudioLoginApi()
        studio_login.authenticate(self.browser)

        self.course_info = get_course_info()
        self.video_upload_page = VideoUploadPage(
            self.browser,
            self.course_info['org'],
            self.course_info['number'],
            self.course_info['run'])

        self.video_upload_page.visit()
Beispiel #28
0
    def setUp(self):
        """
        Initialize the page object
        """
        super(StudioFooterTest, self).setUp()

        studio_login = StudioLoginApi()
        studio_login.authenticate(self.browser)

        self.terms_of_service = TermsOfService(self.browser)
        self.privacy_policy = PrivacyPolicy(self.browser)
        self.studio_home_page = DashboardPageExtended(self.browser)
        self.course_info = get_course_info()
        self.studio_course_outline = CourseOutlinePage(
            self.browser, self.course_info['org'], self.course_info['number'],
            self.course_info['run'])

        self.studio_home_page.visit()
    def setUp(self):
        super(PagesTestWithLms, self).setUp()

        self.course_info = get_course_info()

        studio_login = StudioLoginApi()
        studio_login.authenticate(self.browser)

        lms_login = LmsLoginApi()
        lms_login.authenticate(self.browser)

        self.pages_page = PagesPageExtended(
            self.browser,
            self.course_info['org'],
            self.course_info['number'],
            self.course_info['run']
        )
        self.pages_page.visit()
Beispiel #30
0
    def setUp(self):
        """
        Initialize the page object
        """
        super(StudioFooterTest, self).setUp()

        studio_login = StudioLoginApi()
        studio_login.authenticate(self.browser)

        self.terms_of_service = TermsOfService(self.browser)
        self.privacy_policy = PrivacyPolicy(self.browser)
        self.studio_home_page = DashboardPageExtended(self.browser)
        self.course_info = get_course_info()
        self.studio_course_outline = CourseOutlinePage(
            self.browser, self.course_info['org'], self.course_info['number'],
            self.course_info['run'])

        self.studio_home_page.visit()
Beispiel #31
0
    def setUp(self):
        super(CourseUpdateTest, self).setUp()

        login_api = StudioLoginApi()
        login_api.authenticate(self.browser)

        self.course_info = get_course_info()

        self.course_update_page = CourseUpdatesPageExtended(
            self.browser,
            self.course_info['org'],
            self.course_info['number'],
            self.course_info['run']
        )
        self.course_update_page.visit()
        self.course_update_content_selector = '#course-update-list li' \
                                              ' .post-preview .update-contents'
        self.course_update_text = 'New update:{}'.format(uuid4().hex)
Beispiel #32
0
    def setUp(self):
        super(TextbookTest, self).setUp()

        studio_login = StudioLoginApi()
        studio_login.authenticate(self.browser)

        lms_login = LmsLoginApi()
        lms_login.authenticate(self.browser)

        self.lms_textbook = TextbookPage(self.browser)
        self.course_info = get_course_info()

        self.textbook_page = TextbookPageExtended(self.browser,
                                                  self.course_info['org'],
                                                  self.course_info['number'],
                                                  self.course_info['run'])

        self.textbook_page.visit()
    def setUp(self):
        super(GradedProblemTest, self).setUp()

        login_api = LmsLoginApi()
        login_api.authenticate(self.browser)

        self.course_info = get_course_info()

        self.lms_courseware = CoursewarePageExtended(
            self.browser, get_course_key(self.course_info))

        self.import_page = ImportCoursePageExtended(*self.page_args())
        self.import_page.visit()
        self.import_page.upload_tarball(self.tarball_name)
        self.import_page.wait_for_upload()

        self.course_page = CourseHomePageExtended(
            self.browser, get_course_key(self.course_info))
        self.course_page.visit()
    def test_course_outline(self):
        """
        Verifies that the Help link for 'Learn more about content
        visibility settings' is working.
        """
        studio_login_page = StudioLogin(self.browser)
        studio_home_page = DashboardPageExtended(self.browser)
        studio_login_page.visit()
        studio_login_page.login(DEMO_COURSE_USER, DEMO_COURSE_PASSWORD)

        course_info = get_course_info()

        studio_course_outline = CourseOutlinePageExtended(
            self.browser, course_info['org'], course_info['number'],
            course_info['run'])

        # Verification only, should be on this page after login.
        studio_home_page.wait_for_page()

        # Navigate to the course's outline page
        studio_home_page.select_course(get_course_display_name())
        studio_course_outline.wait_for_page()

        # First verify the Help link
        expected_href = EDXAPP_CMS_DOC_LINK_BASE_URL + \
            '/en/latest/developing_course/controlling_content_visibility.html'
        # Assert that help link is correct.
        assert_side_bar_help_link(
            test=self,
            page=studio_course_outline,
            href=expected_href,
            help_text='Learn more about content visibility settings',
            as_list_item=False
        )

        # If the help page is still up (see LT-53), then close it.
        if self.browser.current_url.startswith('https://edx.readthedocs.io'):
            # TODO wrap this in a try/except block or otherwise harden,
            # make sure that you now have an active window (the other one)
            # and it's the right one (i.e. Studio or LMS)
            self.browser.close()  # close only the current window
            self.browser.switch_to_window(self.browser.window_handles[0])
Beispiel #35
0
    def setUp(self):
        """
        Initialize the page object
        """
        super(StudioGradingTest, self).setUp()

        login_api = StudioLoginApi()
        login_api.authenticate(self.browser)

        self.course_info = get_course_info()
        self.grading_page = GradingPageExtended(self.browser,
                                                self.course_info['org'],
                                                self.course_info['number'],
                                                self.course_info['run'])

        self.studio_course_outline = CourseOutlinePageExtended(
            self.browser, self.course_info['org'], self.course_info['number'],
            self.course_info['run'])

        self.grading_page.visit()
Beispiel #36
0
    def setUp(self):
        super(PagesTestWithLms, self).setUp()

        self.course_info = get_course_info()

        studio_login = StudioLoginApi()
        studio_login.authenticate(self.browser)

        lms_login = LmsLoginApi()
        lms_login.authenticate(self.browser)

        self.course_page = CourseInfoPageExtended(
            self.browser, get_course_key(self.course_info))
        self.courseware_page = CoursewarePageExtended(
            self.browser, get_course_key(self.course_info))
        self.pages_page = PagesPageExtended(self.browser,
                                            self.course_info['org'],
                                            self.course_info['number'],
                                            self.course_info['run'])
        # Login to LMS to avoid authentication issue
        self.course_page.visit()
        self.pages_page.visit()
    def setUp(self):
        super(TextbookTest, self).setUp()

        studio_login = StudioLoginApi()
        studio_login.authenticate(self.browser)

        lms_login = LmsLoginApi()
        lms_login.authenticate(self.browser)

        self.lms_textbook = TextbookPage(self.browser)
        self.course_info = get_course_info()

        self.textbook_page = TextbookPageExtended(self.browser,
                                                  self.course_info['org'],
                                                  self.course_info['number'],
                                                  self.course_info['run'])

        self.textbook_page.visit()
        self.textbook_name = 'book_{}'.format(uuid4().hex)
        self.chapter_name = 'chap_1'
        # Add textbook
        self.add_textbook()
    def test_drag_and_drop_of_pages(self):
        """
        Verifies that user can drag and drop pages and they appear in the
        proper order in LMS
        """
        # Get all pages
        all_pages = self.pages_page.get_all_pages()
        # Get counts of all pages and all custom pages.
        count_of_all_pages = len(all_pages)
        count_of_custom_pages = self.pages_page.get_custom_page_count()

        # Source and target indices for the pages to be dragged and dropped.
        source_index = count_of_all_pages - count_of_custom_pages - 1
        target_index = source_index - 1

        self.pages_page.drag_and_drop(source_index, target_index)

        temp = all_pages[source_index]
        all_pages[source_index] = all_pages[target_index]
        all_pages[target_index] = temp

        # Assert page order is correct.
        self.assertEqual(
            self.pages_page.get_all_pages(),
            all_pages
        )
        # Open LMS and assert pages are in correct order.
        course_info = get_course_info()
        course_page = CourseInfoPageExtended(
            self.browser, get_course_key(course_info)
        )
        course_page.visit()
        pages_in_tab = course_page.get_page_names_in_tab()

        # By default, LMS is opened with Instructor view.
        # We have to append 'Instructor' to make assertion pass.
        all_pages.append('Instructor')
        self.assertEqual(pages_in_tab, all_pages)
    def setUp(self):
        super(GradedProblemTest, self).setUp()

        login_api = LmsLoginApi()
        login_api.authenticate(self.browser)

        self.course_info = get_course_info()

        self.lms_courseware = CoursewarePageExtended(
            self.browser,
            get_course_key(self.course_info)
        )

        self.import_page = ImportCoursePageExtended(*self.page_args())
        self.import_page.visit()
        self.import_page.upload_tarball(self.tarball_name)
        self.import_page.wait_for_upload()

        self.course_page = CourseHomePageExtended(
            self.browser,
            get_course_key(self.course_info)
        )
        self.course_page.visit()
    def setUp(self):
        """
        Initialize the page object
        """
        super(StudioGradingTest, self).setUp()

        login_api = StudioLoginApi()
        login_api.authenticate(self.browser)

        self.course_info = get_course_info()
        self.grading_page = GradingPageExtended(
            self.browser,
            self.course_info['org'],
            self.course_info['number'],
            self.course_info['run'])

        self.studio_course_outline = CourseOutlinePageExtended(
            self.browser,
            self.course_info['org'],
            self.course_info['number'],
            self.course_info['run'])

        self.grading_page.visit()
    def setUp(self):
        super(ScheduleAndDetailsLinks, self).setUp()

        studio_login = StudioLoginApi()
        studio_login.authenticate(self.browser)

        self.course_info = get_course_info()

        self.settings_page = SettingsPageExtended(self.browser,
                                                  self.course_info['org'],
                                                  self.course_info['number'],
                                                  self.course_info['run'])

        self.grading_page = GradingPageExtended(self.browser,
                                                self.course_info['org'],
                                                self.course_info['number'],
                                                self.course_info['run'])
        self.group_configuration = GroupConfigurationsPage(
            self.browser, self.course_info['org'], self.course_info['number'],
            self.course_info['run'])
        self.advanced_settings = AdvancedSettingsPage(
            self.browser, self.course_info['org'], self.course_info['number'],
            self.course_info['run'])
        self.course_team_page = UsersPageMixin(self.browser)