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
dd71ca0f
Commit
dd71ca0f
authored
Oct 31, 2014
by
zubair-arbi
Committed by
cahrens
Nov 03, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix click event for actual target
TNL-138
parent
074c0968
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
cms/static/js/views/xblock_outline.js
+1
-1
common/test/acceptance/pages/studio/overview.py
+6
-2
common/test/acceptance/tests/studio/test_studio_outline.py
+13
-0
No files found.
cms/static/js/views/xblock_outline.js
View file @
dd71ca0f
...
@@ -281,7 +281,7 @@ define(["jquery", "underscore", "gettext", "js/views/baseview", "js/views/utils/
...
@@ -281,7 +281,7 @@ define(["jquery", "underscore", "gettext", "js/views/baseview", "js/views/utils/
handleAddEvent
:
function
(
event
)
{
handleAddEvent
:
function
(
event
)
{
var
self
=
this
,
var
self
=
this
,
target
=
$
(
event
.
t
arget
),
target
=
$
(
event
.
currentT
arget
),
category
=
target
.
data
(
'category'
);
category
=
target
.
data
(
'category'
);
event
.
preventDefault
();
event
.
preventDefault
();
XBlockViewUtils
.
addXBlock
(
target
).
done
(
function
(
locator
)
{
XBlockViewUtils
.
addXBlock
(
target
).
done
(
function
(
locator
)
{
...
...
common/test/acceptance/pages/studio/overview.py
View file @
dd71ca0f
...
@@ -487,11 +487,15 @@ class CourseOutlinePage(CoursePage, CourseOutlineContainer):
...
@@ -487,11 +487,15 @@ class CourseOutlinePage(CoursePage, CourseOutlineContainer):
"""
"""
click_css
(
self
,
'.wrapper-mast nav.nav-actions .button-new'
)
click_css
(
self
,
'.wrapper-mast nav.nav-actions .button-new'
)
def
add_section_from_bottom_button
(
self
):
def
add_section_from_bottom_button
(
self
,
click_child_icon
=
False
):
"""
"""
Clicks the button for adding a section which resides at the bottom of the screen.
Clicks the button for adding a section which resides at the bottom of the screen.
"""
"""
click_css
(
self
,
self
.
BOTTOM_ADD_SECTION_BUTTON
)
element_css
=
self
.
BOTTOM_ADD_SECTION_BUTTON
if
click_child_icon
:
element_css
+=
" .icon-plus"
click_css
(
self
,
element_css
)
def
toggle_expand_collapse
(
self
):
def
toggle_expand_collapse
(
self
):
"""
"""
...
...
common/test/acceptance/tests/studio/test_studio_outline.py
View file @
dd71ca0f
...
@@ -1005,6 +1005,19 @@ class CreateSectionsTest(CourseOutlineTest):
...
@@ -1005,6 +1005,19 @@ class CreateSectionsTest(CourseOutlineTest):
self
.
assertEqual
(
len
(
self
.
course_outline_page
.
sections
()),
1
)
self
.
assertEqual
(
len
(
self
.
course_outline_page
.
sections
()),
1
)
self
.
assertTrue
(
self
.
course_outline_page
.
section_at
(
0
)
.
in_editable_form
())
self
.
assertTrue
(
self
.
course_outline_page
.
section_at
(
0
)
.
in_editable_form
())
def
test_create_new_section_from_bottom_button_plus_icon
(
self
):
"""
Scenario: Create new section from button plus icon at bottom of page
Given that I am on the course outline
When I click the plus icon in "+ Add section" button at the bottom of the page
Then I see a new section added to the bottom of the page
And the display name is in its editable form.
"""
self
.
course_outline_page
.
visit
()
self
.
course_outline_page
.
add_section_from_bottom_button
(
click_child_icon
=
True
)
self
.
assertEqual
(
len
(
self
.
course_outline_page
.
sections
()),
1
)
self
.
assertTrue
(
self
.
course_outline_page
.
section_at
(
0
)
.
in_editable_form
())
def
test_create_new_subsection
(
self
):
def
test_create_new_subsection
(
self
):
"""
"""
Scenario: Create new subsection
Scenario: Create new subsection
...
...
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