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
8e3f7f6e
Commit
8e3f7f6e
authored
Mar 21, 2015
by
Matjaz Gregoric
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for background image.
parent
45a0c7c7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
tests/integration/data/test_html_data.json
+2
-1
tests/integration/test_custom_data_render.py
+5
-0
tests/integration/test_render.py
+6
-1
No files found.
tests/integration/data/test_html_data.json
View file @
8e3f7f6e
...
...
@@ -74,5 +74,6 @@
"feedback"
:
{
"start"
:
"Intro <i>Feed</i>"
,
"finish"
:
"Final <b>Feed</b>"
}
},
"targetImg"
:
"https://www.edx.org/sites/default/files/theme/edx-logo-header.png"
}
tests/integration/test_custom_data_render.py
View file @
8e3f7f6e
...
...
@@ -24,3 +24,8 @@ class TestCustomDataDragAndDropRendering(BaseIntegrationTest):
self
.
assertIn
(
'<i>B</i>'
,
self
.
get_element_html
(
items
[
1
]))
self
.
assertIn
(
'<input class="input" type="text">'
,
self
.
get_element_html
(
items
[
1
]))
self
.
assertIn
(
'<span style="color:red">X</span>'
,
self
.
get_element_html
(
items
[
2
]))
def
test_background_image
(
self
):
bg_image
=
self
.
browser
.
execute_script
(
'return jQuery(".target-img").css("background-image")'
)
custom_image_url
=
'https://www.edx.org/sites/default/files/theme/edx-logo-header.png'
self
.
assertEqual
(
bg_image
,
'url("{}")'
.
format
(
custom_image_url
))
tests/integration/test_render.py
View file @
8e3f7f6e
...
...
@@ -7,7 +7,7 @@ class TestDragAndDropRender(BaseIntegrationTest):
"""
PAGE_TITLE
=
'Drag and Drop v2'
PAGE_ID
=
'drag_and_drop_v2'
def
setUp
(
self
):
super
(
TestDragAndDropRender
,
self
)
.
setUp
()
...
...
@@ -60,3 +60,8 @@ class TestDragAndDropRender(BaseIntegrationTest):
feedback_message
=
self
.
_get_feedback_message
()
self
.
assertEqual
(
feedback_message
.
text
,
"Intro Feed"
)
def
test_background_image
(
self
):
bg_image
=
self
.
browser
.
execute_script
(
'return jQuery(".target-img").css("background-image")'
)
image_path
=
'/resource/drag-and-drop-v2/public/img/triangle.png'
self
.
assertEqual
(
bg_image
,
'url("{0}{1}")'
.
format
(
self
.
live_server_url
,
image_path
))
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