Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
53f6d40d
Commit
53f6d40d
authored
8 years ago
by
Diana Huang
Browse files
Options
Downloads
Plain Diff
Merge pull request #12542 from edx/diana/discussion-a11y
Add accessibility tests for discussion forums.
parents
182921f1
67740319
No related branches found
Branches containing commit
Tags
release-2021-02-03-12.16
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/test/acceptance/tests/discussion/test_discussion.py
+97
-0
97 additions, 0 deletions
common/test/acceptance/tests/discussion/test_discussion.py
with
97 additions
and
0 deletions
common/test/acceptance/tests/discussion/test_discussion.py
+
97
−
0
View file @
53f6d40d
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment