Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
67740319
Commit
67740319
authored
May 20, 2016
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add accessibility tests for discussion forums.
parent
e16ba936
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
97 additions
and
0 deletions
+97
-0
common/test/acceptance/tests/discussion/test_discussion.py
+97
-0
No files found.
common/test/acceptance/tests/discussion/test_discussion.py
View file @
67740319
...
...
@@ -203,6 +203,16 @@ class DiscussionHomePageTest(UniqueCourseTest):
self
.
page
.
click_new_post_button
()
self
.
assertIsNotNone
(
self
.
page
.
new_post_form
)
def
test_page_accessibility
(
self
):
self
.
page
.
a11y_audit
.
config
.
set_rules
({
"ignore"
:
[
'color-contrast'
,
# TNL-4635
'link-href'
,
# TNL-4636
'icon-aria-hidden'
,
# TNL-4637
]
})
self
.
page
.
a11y_audit
.
check_for_accessibility_errors
()
@attr
(
'shard_2'
)
class
DiscussionTabSingleThreadTest
(
BaseDiscussionTestCase
,
DiscussionResponsePaginationTestMixin
):
...
...
@@ -331,6 +341,29 @@ class DiscussionTabMultipleThreadTest(BaseDiscussionTestCase):
# Verify that the focus is changed
self
.
thread_page_2
.
check_focus_is_set
(
selector
=
".discussion-article"
)
def
test_page_accessibility
(
self
):
self
.
thread_page_1
.
a11y_audit
.
config
.
set_rules
({
"ignore"
:
[
'aria-valid-attr-value'
,
# TNL-4638
'color-contrast'
,
# TNL-4639
'link-href'
,
# TNL-4640
'icon-aria-hidden'
,
# TNL-4641
]
})
self
.
thread_page_1
.
a11y_audit
.
check_for_accessibility_errors
()
self
.
thread_page_2
.
a11y_audit
.
config
.
set_rules
({
"ignore"
:
[
'aria-valid-attr-value'
,
# TNL-4638
'color-contrast'
,
# TNL-4639
'link-href'
,
# TNL-4640
'icon-aria-hidden'
,
# TNL-4641
]
})
self
.
thread_page_2
.
a11y_audit
.
check_for_accessibility_errors
()
@attr
(
'shard_2'
)
class
DiscussionOpenClosedThreadTest
(
BaseDiscussionTestCase
):
...
...
@@ -380,6 +413,29 @@ class DiscussionOpenClosedThreadTest(BaseDiscussionTestCase):
self
.
assertTrue
(
page
.
_is_element_visible
(
'.response_response1 .action-vote'
))
self
.
assertFalse
(
page
.
_is_element_visible
(
'.response_response1 .display-vote'
))
def
test_page_accessibility
(
self
):
page
=
self
.
setup_openclosed_thread_page
()
page
.
a11y_audit
.
config
.
set_rules
({
'ignore'
:
[
'aria-valid-attr-value'
,
# TNL-4643
'color-contrast'
,
# TNL-4644
'link-href'
,
# TNL-4640
'icon-aria-hidden'
,
# TNL-4645
]
})
page
.
a11y_audit
.
check_for_accessibility_errors
()
page
=
self
.
setup_openclosed_thread_page
(
True
)
page
.
a11y_audit
.
config
.
set_rules
({
'ignore'
:
[
'aria-valid-attr-value'
,
# TNL-4643
'color-contrast'
,
# TNL-4644
'link-href'
,
# TNL-4640
'icon-aria-hidden'
,
# TNL-4645
]
})
page
.
a11y_audit
.
check_for_accessibility_errors
()
@attr
(
'shard_2'
)
class
DiscussionCommentDeletionTest
(
BaseDiscussionTestCase
):
...
...
@@ -653,6 +709,22 @@ class DiscussionResponseEditTest(BaseDiscussionTestCase):
page
.
endorse_response
(
'response_self_author'
)
page
.
endorse_response
(
'response_other_author'
)
def
test_page_accessibility
(
self
):
self
.
setup_user
()
self
.
setup_view
()
page
=
self
.
create_single_thread_page
(
"response_edit_test_thread"
)
page
.
a11y_audit
.
config
.
set_rules
({
'ignore'
:
[
'aria-valid-attr-value'
,
# TNL-4638
'color-contrast'
,
# TNL-4644
'link-href'
,
# TNL-4640
'icon-aria-hidden'
,
# TNL-4645
'duplicate-id'
,
# TNL-4647
]
})
page
.
visit
()
page
.
a11y_audit
.
check_for_accessibility_errors
()
@attr
(
'shard_2'
)
class
DiscussionCommentEditTest
(
BaseDiscussionTestCase
):
...
...
@@ -736,6 +808,21 @@ class DiscussionCommentEditTest(BaseDiscussionTestCase):
self
.
assertFalse
(
page
.
is_comment_editor_visible
(
"comment_self_author"
))
self
.
assertTrue
(
page
.
is_add_comment_visible
(
"response1"
))
def
test_page_accessibility
(
self
):
self
.
setup_user
()
self
.
setup_view
()
page
=
self
.
create_single_thread_page
(
"comment_edit_test_thread"
)
page
.
visit
()
page
.
a11y_audit
.
config
.
set_rules
({
'ignore'
:
[
'aria-valid-attr-value'
,
# TNL-4643
'color-contrast'
,
# TNL-4644
'link-href'
,
# TNL-4640
'icon-aria-hidden'
,
# TNL-4645
]
})
page
.
a11y_audit
.
check_for_accessibility_errors
()
@attr
(
'shard_2'
)
class
InlineDiscussionTest
(
UniqueCourseTest
,
DiscussionResponsePaginationTestMixin
):
...
...
@@ -1098,6 +1185,16 @@ class DiscussionSearchAlertTest(UniqueCourseTest):
self
.
SEARCHED_USERNAME
)
.
wait_for_page
()
def
test_page_accessibility
(
self
):
self
.
page
.
a11y_audit
.
config
.
set_rules
({
'ignore'
:
[
'color-contrast'
,
# TNL-4639
'link-href'
,
# TNL-4640
'icon-aria-hidden'
,
# TNL-4641
]
})
self
.
page
.
a11y_audit
.
check_for_accessibility_errors
()
@attr
(
'shard_2'
)
class
DiscussionSortPreferenceTest
(
UniqueCourseTest
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment