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
5cd4c402
Commit
5cd4c402
authored
Sep 29, 2014
by
E. Kolpakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added interaction test (PoC, more to come)
parent
683925ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
tests/integration/test_interaction.py
+35
-0
No files found.
tests/integration/test_interaction.py
0 → 100644
View file @
5cd4c402
from
selenium.webdriver
import
ActionChains
from
selenium.webdriver.firefox
import
webdriver
from
tests.integration.test_base
import
BaseIntegrationTest
class
TestInteraction
(
BaseIntegrationTest
):
"""
Verifying Drag and Drop XBlock rendering against default data - if default data changes this would probably broke
"""
PAGE_TITLE
=
'Drag and Drop v2'
PAGE_ID
=
'drag_and_drop_v2'
def
setUp
(
self
):
super
(
TestInteraction
,
self
)
.
setUp
()
scenario_xml
=
"<vertical_demo><drag-and-drop-v2/></vertical_demo>"
self
.
_add_scenario
(
self
.
PAGE_ID
,
self
.
PAGE_TITLE
,
scenario_xml
)
self
.
browser
.
get
(
self
.
live_server_url
)
self
.
_page
=
self
.
go_to_page
(
self
.
PAGE_TITLE
)
def
test_correct_item_positive_feedback
(
self
):
items_container
=
self
.
_page
.
find_element_by_css_selector
(
'ul.items'
)
zones_container
=
self
.
_page
.
find_element_by_css_selector
(
'div.target'
)
element
=
items_container
.
find_elements_by_xpath
(
"//li[@data-value='0']"
)[
0
]
target
=
zones_container
.
find_elements_by_xpath
(
"//div[@data-zone='Zone A']"
)[
0
]
action_chains
=
ActionChains
(
self
.
browser
)
action_chains
.
drag_and_drop
(
element
,
target
)
.
perform
()
self
.
assertEqual
(
self
.
_page
.
find_element_by_css_selector
(
".popup-content"
)
.
text
,
"Yes, it's an A"
)
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