Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-drag-and-drop-v2
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
OpenEdx
xblock-drag-and-drop-v2
Commits
02cc8241
Commit
02cc8241
authored
Dec 13, 2016
by
Matjaz Gregoric
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explain why execute_script is necessary.
parent
4f03bd1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
tests/integration/test_render.py
+5
-1
No files found.
tests/integration/test_render.py
View file @
02cc8241
...
@@ -219,7 +219,11 @@ class TestDragAndDropRender(BaseIntegrationTest):
...
@@ -219,7 +219,11 @@ class TestDragAndDropRender(BaseIntegrationTest):
button
=
self
.
_get_go_to_beginning_button
()
button
=
self
.
_get_go_to_beginning_button
()
# Button is only visible to screen reader users by default.
# Button is only visible to screen reader users by default.
self
.
assertIn
(
'sr'
,
button
.
get_attribute
(
'class'
)
.
split
())
self
.
assertIn
(
'sr'
,
button
.
get_attribute
(
'class'
)
.
split
())
# Set focus to the element (cannot find a way to do this without execute_script).
# Set focus to the element. We have to use execute_script here because while TAB-ing
# to the button to make it the active element works in selenium, the focus event is not
# emitted unless the Firefox window controlled by selenium is the focused window, which
# usually is not the case when running integration tests.
# See: https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/7346
self
.
browser
.
execute_script
(
'$("button.go-to-beginning-button").focus()'
)
self
.
browser
.
execute_script
(
'$("button.go-to-beginning-button").focus()'
)
self
.
assertFocused
(
button
)
self
.
assertFocused
(
button
)
# Button should be visible when focused.
# Button should be visible when focused.
...
...
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