Example #1
0
class ProgramDetailsPageA11yTest(ProgramPageBase):
    """Test program details page accessibility."""
    a11y = True

    def setUp(self):
        super(ProgramDetailsPageA11yTest, self).setUp()

        self.details_page = ProgramDetailsPage(self.browser)

        self.program = self.create_program()
        self.program['uuid'] = self.details_page.program_uuid

    def test_a11y(self):
        """Test the page's a11y compliance."""
        self.details_page.a11y_audit.config.set_rules({
            "ignore": [
                'aria-valid-attr',  # TODO: LEARNER-6611 & LEARNER-6865
                'landmark-complementary-is-top-level',  # TODO: AC-939
                'region',  # TODO: AC-932
            ]
        })
        self.auth()
        self.stub_catalog_api(programs=[self.program], pathways=[])
        self.cache_programs()

        self.details_page.visit()

        self.details_page.a11y_audit.check_for_accessibility_errors()
Example #2
0
class ProgramDetailsPageA11yTest(ProgramPageBase):
    """Test program details page accessibility."""
    a11y = True

    def setUp(self):
        super(ProgramDetailsPageA11yTest, self).setUp()

        self.details_page = ProgramDetailsPage(self.browser)

        self.program = self.create_program()
        self.program['uuid'] = self.details_page.program_uuid

    def test_a11y(self):
        """Test the page's a11y compliance."""
        self.details_page.a11y_audit.config.set_rules({
            "ignore": [
                'aria-valid-attr',  # TODO: LEARNER-6611 & LEARNER-6865
            ]
        })
        self.auth()
        self.stub_catalog_api(programs=[self.program], pathways=[])
        self.cache_programs()

        self.details_page.visit()

        self.details_page.a11y_audit.check_for_accessibility_errors()
class ProgramDetailsPageA11yTest(ProgramPageBase):
    """Test program details page accessibility."""
    def setUp(self):
        super(ProgramDetailsPageA11yTest, self).setUp()

        self.details_page = ProgramDetailsPage(self.browser)

        program = self.create_program(program_id=self.details_page.program_id)
        self.stub_programs_api([program], is_list=False)

    def test_a11y(self):
        """Test the page's a11y compliance."""
        self.auth()
        self.details_page.visit()
        self.details_page.a11y_audit.check_for_accessibility_errors()
Example #4
0
class ProgramDetailsPageA11yTest(ProgramPageBase):
    """Test program details page accessibility."""
    def setUp(self):
        super(ProgramDetailsPageA11yTest, self).setUp()

        self.details_page = ProgramDetailsPage(self.browser)

        program = self.create_program(program_id=self.details_page.program_id)
        self.stub_programs_api([program], is_list=False)

    def test_a11y(self):
        """Test the page's a11y compliance."""
        self.auth()
        self.details_page.visit()
        self.details_page.a11y_audit.check_for_accessibility_errors()
Example #5
0
class ProgramDetailsPageA11yTest(ProgramPageBase):
    """Test program details page accessibility."""
    def setUp(self):
        super(ProgramDetailsPageA11yTest, self).setUp()

        self.details_page = ProgramDetailsPage(self.browser)

        self.program = self.create_program()
        self.program['uuid'] = self.details_page.program_uuid

    def test_a11y(self):
        """Test the page's a11y compliance."""
        self.auth()
        self.stub_catalog_api(data=self.program)

        self.details_page.visit()

        self.details_page.a11y_audit.check_for_accessibility_errors()
Example #6
0
class ProgramDetailsPageA11yTest(ProgramPageBase):
    """Test program details page accessibility."""
    def setUp(self):
        super(ProgramDetailsPageA11yTest, self).setUp()

        self.details_page = ProgramDetailsPage(self.browser)

        self.program = self.create_program()
        self.program['uuid'] = self.details_page.program_uuid

    def test_a11y(self):
        """Test the page's a11y compliance."""
        self.auth()
        self.stub_catalog_api(data=self.program)

        self.details_page.visit()

        self.details_page.a11y_audit.check_for_accessibility_errors()