Merge pull request #12915 from edx/clrux/ac-520
AC-520 fixes `section` ignores
This commit is contained in:
@@ -53,12 +53,12 @@ def i_visit_the_homepage(step):
|
||||
@step(u'I (?:visit|access|open) the dashboard$')
|
||||
def i_visit_the_dashboard(step):
|
||||
world.visit('/dashboard')
|
||||
assert world.is_css_present('section.container.dashboard')
|
||||
assert world.is_css_present('.container.dashboard')
|
||||
|
||||
|
||||
@step('I should be on the dashboard page$')
|
||||
def i_should_be_on_the_dashboard(step):
|
||||
assert world.is_css_present('section.container.dashboard')
|
||||
assert world.is_css_present('.container.dashboard')
|
||||
assert 'Dashboard' in world.browser.title
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ def i_am_logged_in(step):
|
||||
world.create_user('robot', 'test')
|
||||
world.log_in(username='robot', password='test')
|
||||
world.browser.visit(lettuce.django.django_url('/'))
|
||||
dash_css = 'section.container.dashboard'
|
||||
dash_css = '.container.dashboard'
|
||||
assert world.is_css_present(dash_css)
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class DashboardPage(PageObject):
|
||||
url = "{base}/dashboard".format(base=BASE_URL)
|
||||
|
||||
def is_browser_on_page(self):
|
||||
return self.q(css='section.my-courses').present
|
||||
return self.q(css='.my-courses').present
|
||||
|
||||
@property
|
||||
def current_courses_text(self):
|
||||
@@ -31,7 +31,7 @@ class DashboardPage(PageObject):
|
||||
shows all the courses that the student is enrolled in.
|
||||
The string displayed is defined in lms/templates/dashboard.html.
|
||||
"""
|
||||
text_items = self.q(css='section#my-courses').text
|
||||
text_items = self.q(css='#my-courses').text
|
||||
if len(text_items) > 0:
|
||||
return text_items[0]
|
||||
else:
|
||||
|
||||
@@ -113,7 +113,7 @@ class SettingsPage(CoursePage):
|
||||
Property. Returns the text of the license type for the course
|
||||
("All Rights Reserved" or "Creative Commons")
|
||||
"""
|
||||
license_types_css = "section.license ul.license-types li.license-type"
|
||||
license_types_css = ".license ul.license-types li.license-type"
|
||||
self.wait_for_element_presence(
|
||||
license_types_css,
|
||||
"license type buttons are present",
|
||||
@@ -124,7 +124,7 @@ class SettingsPage(CoursePage):
|
||||
|
||||
# Look for the license text that will be displayed by default,
|
||||
# if no button is yet explicitly selected
|
||||
license_text = self.q(css='section.license span.license-text')
|
||||
license_text = self.q(css='.license span.license-text')
|
||||
if license_text.is_present():
|
||||
return license_text.text[0]
|
||||
return None
|
||||
@@ -135,13 +135,13 @@ class SettingsPage(CoursePage):
|
||||
Sets the course license to the given license_name
|
||||
(str, "All Rights Reserved" or "Creative Commons")
|
||||
"""
|
||||
license_types_css = "section.license ul.license-types li.license-type"
|
||||
license_types_css = ".license ul.license-types li.license-type"
|
||||
self.wait_for_element_presence(
|
||||
license_types_css,
|
||||
"license type buttons are present",
|
||||
)
|
||||
button_xpath = (
|
||||
"//section[contains(@class, 'license')]"
|
||||
"//div[contains(@class, 'license')]"
|
||||
"//ul[contains(@class, 'license-types')]"
|
||||
"//li[contains(@class, 'license-type')]"
|
||||
"//button[contains(text(),'{license_name}')]"
|
||||
@@ -151,7 +151,7 @@ class SettingsPage(CoursePage):
|
||||
raise Exception("Invalid license name: {name}".format(name=license_name))
|
||||
button.click()
|
||||
|
||||
pacing_css = 'section.pacing input[type=radio]'
|
||||
pacing_css = '.pacing input[type=radio]'
|
||||
|
||||
@property
|
||||
def checked_pacing_css(self):
|
||||
|
||||
@@ -482,7 +482,6 @@ class AccountSettingsA11yTest(AccountSettingsTestMixin, WebAppTest):
|
||||
self.visit_account_settings_page()
|
||||
self.account_settings_page.a11y_audit.config.set_rules({
|
||||
'ignore': [
|
||||
'section', # TODO: AC-491
|
||||
'link-href', # TODO: AC-233
|
||||
],
|
||||
})
|
||||
|
||||
@@ -779,7 +779,6 @@ class LearnerProfileA11yTest(LearnerProfileTestMixin, WebAppTest):
|
||||
|
||||
profile_page.a11y_audit.config.set_rules({
|
||||
"ignore": [
|
||||
'section', # TODO: AC-491
|
||||
'link-href', # TODO: AC-231
|
||||
],
|
||||
})
|
||||
@@ -807,7 +806,6 @@ class LearnerProfileA11yTest(LearnerProfileTestMixin, WebAppTest):
|
||||
|
||||
profile_page.a11y_audit.config.set_rules({
|
||||
"ignore": [
|
||||
'section', # TODO: AC-491
|
||||
'link-href', # TODO: AC-231
|
||||
],
|
||||
})
|
||||
@@ -824,7 +822,6 @@ class LearnerProfileA11yTest(LearnerProfileTestMixin, WebAppTest):
|
||||
|
||||
profile_page.a11y_audit.config.set_rules({
|
||||
"ignore": [
|
||||
'section', # TODO: AC-491
|
||||
'link-href', # TODO: AC-231
|
||||
],
|
||||
})
|
||||
|
||||
@@ -1347,9 +1347,4 @@ class CourseInfoA11yTest(UniqueCourseTest):
|
||||
|
||||
def test_course_home_a11y(self):
|
||||
self.course_info_page.visit()
|
||||
self.course_info_page.a11y_audit.config.set_rules({
|
||||
"ignore": [
|
||||
'section', # TODO: AC-491
|
||||
]
|
||||
})
|
||||
self.course_info_page.a11y_audit.check_for_accessibility_errors()
|
||||
|
||||
@@ -648,11 +648,6 @@ class CoursewareMultipleVerticalsTest(UniqueCourseTest, EventsTestMixin):
|
||||
# Set the scope to the sequence navigation
|
||||
self.courseware_page.a11y_audit.config.set_scope(
|
||||
include=['div.sequence-nav'])
|
||||
self.courseware_page.a11y_audit.config.set_rules({
|
||||
"ignore": [
|
||||
'section', # TODO: AC-491
|
||||
],
|
||||
})
|
||||
self.courseware_page.a11y_audit.check_for_accessibility_errors()
|
||||
|
||||
|
||||
|
||||
@@ -232,9 +232,4 @@ class LmsDashboardA11yTest(BaseLmsDashboardTest):
|
||||
"""
|
||||
course_listings = self.dashboard_page.get_course_listings()
|
||||
self.assertEqual(len(course_listings), 1)
|
||||
self.dashboard_page.a11y_audit.config.set_rules({
|
||||
"ignore": [
|
||||
'section', # TODO: AC-491
|
||||
]
|
||||
})
|
||||
self.dashboard_page.a11y_audit.check_for_accessibility_errors()
|
||||
|
||||
@@ -122,12 +122,6 @@ class ProgramListingPageA11yTest(ProgramPageBase):
|
||||
|
||||
self.assertTrue(self.listing_page.is_sidebar_present)
|
||||
self.assertFalse(self.listing_page.are_cards_present)
|
||||
|
||||
self.listing_page.a11y_audit.config.set_rules({
|
||||
"ignore": [
|
||||
'section', # TODO: AC-491
|
||||
]
|
||||
})
|
||||
self.listing_page.a11y_audit.check_for_accessibility_errors()
|
||||
|
||||
def test_cards_a11y(self):
|
||||
@@ -137,12 +131,6 @@ class ProgramListingPageA11yTest(ProgramPageBase):
|
||||
|
||||
self.assertTrue(self.listing_page.is_sidebar_present)
|
||||
self.assertTrue(self.listing_page.are_cards_present)
|
||||
|
||||
self.listing_page.a11y_audit.config.set_rules({
|
||||
"ignore": [
|
||||
'section', # TODO: AC-491
|
||||
]
|
||||
})
|
||||
self.listing_page.a11y_audit.check_for_accessibility_errors()
|
||||
|
||||
|
||||
@@ -161,10 +149,4 @@ class ProgramDetailsPageA11yTest(ProgramPageBase):
|
||||
"""Test the page's a11y compliance."""
|
||||
self.auth()
|
||||
self.details_page.visit()
|
||||
|
||||
self.details_page.a11y_audit.config.set_rules({
|
||||
"ignore": [
|
||||
'section', # TODO: AC-491
|
||||
]
|
||||
})
|
||||
self.details_page.a11y_audit.check_for_accessibility_errors()
|
||||
|
||||
@@ -656,7 +656,6 @@ class StudioLibraryA11yTest(StudioLibraryTest):
|
||||
# we will ignore this error in the test until we fix them.
|
||||
lib_page.a11y_audit.config.set_rules({
|
||||
"ignore": [
|
||||
'section', # TODO: AC-491
|
||||
'color-contrast', # TODO: AC-225
|
||||
'link-href', # TODO: AC-226
|
||||
'nav-aria-label', # TODO: AC-227
|
||||
|
||||
@@ -503,7 +503,6 @@ class StudioSettingsA11yTest(StudioCourseTest):
|
||||
# we will ignore this error in the test until we fix them.
|
||||
self.settings_page.a11y_audit.config.set_rules({
|
||||
"ignore": [
|
||||
'section', # TODO: AC-491
|
||||
'color-contrast', # TODO: AC-225
|
||||
'link-href', # TODO: AC-226
|
||||
'nav-aria-label', # TODO: AC-227
|
||||
@@ -580,11 +579,6 @@ class StudioSubsectionSettingsA11yTest(StudioCourseTest):
|
||||
self.course_outline.a11y_audit.config.set_scope(
|
||||
include=['section.edit-settings-timed-examination']
|
||||
)
|
||||
self.course_outline.a11y_audit.config.set_rules({
|
||||
"ignore": [
|
||||
'section', # TODO: AC-491
|
||||
]
|
||||
})
|
||||
self.course_outline.a11y_audit.check_for_accessibility_errors()
|
||||
|
||||
|
||||
|
||||
@@ -358,9 +358,4 @@ class CMSVideoA11yTest(CMSVideoBaseTest):
|
||||
self.outline.a11y_audit.config.set_scope(
|
||||
include=["div.video"]
|
||||
)
|
||||
self.outline.a11y_audit.config.set_rules({
|
||||
"ignore": [
|
||||
'section', # TODO: AC-491
|
||||
]
|
||||
})
|
||||
self.outline.a11y_audit.check_for_accessibility_errors()
|
||||
|
||||
@@ -1272,9 +1272,4 @@ class LMSVideoModuleA11yTest(VideoBaseTest):
|
||||
self.video.a11y_audit.config.set_scope(
|
||||
include=["div.video"]
|
||||
)
|
||||
self.video.a11y_audit.config.set_rules({
|
||||
"ignore": [
|
||||
'section', # TODO: AC-491
|
||||
]
|
||||
})
|
||||
self.video.a11y_audit.check_for_accessibility_errors()
|
||||
|
||||
Reference in New Issue
Block a user