def test_other_grading_link(self):
     """
     Verifies that user can click and navigate to Grading
     """
     name = 'Grading'
     grading_page = GradingPageExtended(
         self.browser,
         self.course_info['org'],
         self.course_info['number'],
         self.course_info['run'])
     self.settings_page.click_other_settings_links(name)
     grading_page.wait_for_page()
Example #2
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()
Example #3
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()
Example #4
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()
    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)
Example #6
0
class StudioGradingTest(WebAppTest):
    """
    Test studio grading
    """
    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 atest_grade_range(self):
        """
        Verifies default, addition and deletion of grade range
        """
        # Delete any existing grades
        self.grading_page.remove_all_grades()

        # Default
        self.assertEquals(self.grading_page.letter_grade('.letter-grade'),
                          'Pass')
        # Addition
        self.grading_page.add_new_grade()
        self.assertEquals(self.grading_page.letter_grade('.letter-grade'), 'A')
        # Verify that after revisiting, changes remain intact
        self.grading_page.visit()
        self.assertEquals(self.grading_page.letter_grade('.letter-grade'), 'A')
        # Deletion
        self.grading_page.remove_grade()
        self.assertEquals(self.grading_page.letter_grade('.letter-grade'),
                          'Pass')
        # Verify that after revisiting, changes remain intact
        self.grading_page.visit()
        self.assertEquals(self.grading_page.letter_grade('.letter-grade'),
                          'Pass')

    def atest_assignment_types(self):
        """
        Verifies that user can add/delete assignment types
        """
        # Delete any existing assignment types
        self.grading_page.delete_all_assignment_types()

        self.grading_page.add_new_assignment_type()
        self.grading_page.fill_assignment_type_fields(name='Final',
                                                      abbreviation='Finale',
                                                      total_grade='100',
                                                      total_number='2',
                                                      drop='1')
        self.assertEquals(self.grading_page.assignment_name_field_value(),
                          ['Final'])

        # Navigating to course outline page to see if the added assignment
        # is available to use on subsections
        self.studio_course_outline.visit()

        section_name = 'Section :{}'.format(uuid4().hex)
        self.studio_course_outline.add_section_with_name(section_name)
        self.assertIn(
            section_name,
            self.studio_course_outline.q(css='.incontext-editor-value').text)

        subsection_name = 'Subsection :{}'.format(uuid4().hex)
        self.studio_course_outline.add_subsection_with_name(subsection_name)
        self.assertIn(
            subsection_name,
            self.studio_course_outline.q(css='.incontext-editor-value').text)

        self.studio_course_outline.open_subsection_settings_dialog()
        self.assertIn('Final',
                      self.studio_course_outline.get_subsection_grade())

        # Delete added section
        self.studio_course_outline.cancel_subsection_settings()
        self.studio_course_outline.delete_section()
        # Delete added assignment type
        self.grading_page.visit()
        self.grading_page.delete_assignment_type()
Example #7
0
class StudioGradingTest(WebAppTest):
    """
    Test studio grading
    """
    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 test_grade_range(self):
        """
        Verifies default, addition and deletion of grade range
        """
        # Delete any existing grades
        self.grading_page.remove_all_grades()

        # Default
        self.assertEquals(
            self.grading_page.letter_grade('.letter-grade'), 'Pass')
        # Addition
        self.grading_page.add_new_grade()
        self.assertEquals(self.grading_page.letter_grade('.letter-grade'), 'A')
        # Verify that after revisiting, changes remain intact
        self.grading_page.visit()
        self.assertEquals(self.grading_page.letter_grade('.letter-grade'), 'A')
        # Deletion
        self.grading_page.remove_grade()
        self.assertEquals(
            self.grading_page.letter_grade('.letter-grade'), 'Pass')
        # Verify that after revisiting, changes remain intact
        self.grading_page.visit()
        self.assertEquals(
            self.grading_page.letter_grade('.letter-grade'), 'Pass')

    def test_assignment_types(self):
        """
        Verifies that user can add/delete assignment types
        """
        # Delete any existing assignment types
        self.grading_page.delete_all_assignment_types()

        self.grading_page.add_new_assignment_type()
        self.grading_page.fill_assignment_type_fields(
            name='Final',
            abbreviation='Finale',
            total_grade='100',
            total_number='2',
            drop='1'
        )
        self.assertEquals(
            self.grading_page.assignment_name_field_value(), ['Final'])

        # Navigating to course outline page to see if the added assignment
        # is available to use on subsections
        self.studio_course_outline.visit()

        section_name = 'Section :{}'.format(uuid4().hex)
        self.studio_course_outline.add_section_with_name(section_name)
        self.assertIn(
            section_name,
            self.studio_course_outline.q(
                css='.incontext-editor-value').text
        )

        subsection_name = 'Subsection :{}'.format(uuid4().hex)
        self.studio_course_outline.add_subsection_with_name(
            subsection_name)
        self.assertIn(
            subsection_name,
            self.studio_course_outline.q(
                css='.incontext-editor-value').text
        )

        self.studio_course_outline.open_subsection_settings_dialog()
        self.assertIn(
            'Final',
            self.studio_course_outline.get_subsection_grade()
        )

        # Delete added section
        self.studio_course_outline.cancel_subsection_settings()
        self.studio_course_outline.delete_section()
        # Delete added assignment type
        self.grading_page.visit()
        self.grading_page.delete_assignment_type()
class StudioGradingTest(WebAppTest):
    """
    Test studio grading
    """
    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 test_grade_range(self):
        """
        Verifies default, addition and deletion of grade range
        """
        # Delete any existing grades
        self.grading_page.remove_all_grades()

        # Default
        self.assertEquals(
            self.grading_page.letter_grade('.letter-grade'), 'Pass')
        # Addition
        self.grading_page.add_new_grade()
        self.assertEquals(self.grading_page.letter_grade('.letter-grade'), 'A')
        # Verify that after revisiting, changes remain intact
        self.grading_page.visit()
        self.assertEquals(self.grading_page.letter_grade('.letter-grade'), 'A')
        # Deletion
        self.grading_page.remove_grade()
        self.assertEquals(
            self.grading_page.letter_grade('.letter-grade'), 'Pass')
        # Verify that after revisiting, changes remain intact
        self.grading_page.visit()
        self.assertEquals(
            self.grading_page.letter_grade('.letter-grade'), 'Pass')