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
36afbfbd
Commit
36afbfbd
authored
Aug 04, 2014
by
Ben McMorran
Committed by
cahrens
Aug 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for expand collapse while editing name
parent
fbc886aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
common/test/acceptance/pages/studio/overview.py
+8
-0
common/test/acceptance/tests/test_studio_outline.py
+11
-6
No files found.
common/test/acceptance/pages/studio/overview.py
View file @
36afbfbd
...
...
@@ -7,6 +7,7 @@ from bok_choy.page_object import PageObject
from
bok_choy.promise
import
EmptyPromise
from
selenium.webdriver.support.ui
import
Select
from
selenium.webdriver.common.keys
import
Keys
from
.course_page
import
CoursePage
from
.container
import
ContainerPage
...
...
@@ -91,6 +92,13 @@ class CourseOutlineItem(object):
set_input_value_and_save
(
self
,
self
.
_bounded_selector
(
self
.
NAME_INPUT_SELECTOR
),
new_name
)
self
.
wait_for_ajax
()
def
finalize_name
(
self
):
"""
Presses ENTER, saving the value of the display name for this item.
"""
self
.
q
(
css
=
self
.
_bounded_selector
(
self
.
NAME_INPUT_SELECTOR
))
.
results
[
0
]
.
send_keys
(
Keys
.
ENTER
)
self
.
wait_for_ajax
()
def
in_editable_form
(
self
):
"""
Return whether this outline item's display name is in its editable form.
...
...
common/test/acceptance/tests/test_studio_outline.py
View file @
36afbfbd
...
...
@@ -470,20 +470,25 @@ class EditNamesTest(CourseOutlineTest):
"""
Scenario: A section stays in the same expand/collapse state while its name is edited
Given that I have created a section
And the section is
expand
ed
And the section is
collaps
ed
When I click on the name of the section
Then the section is
expand
ed
Then the section is
collaps
ed
And given that I have entered a new name
Then the section is expanded
Then the section is collapsed
And given that I press ENTER to finalize the name
Then the section is collapsed
"""
self
.
course_outline_page
.
visit
()
self
.
course_outline_page
.
section_at
(
0
)
.
toggle_expand
()
self
.
assertFalse
(
self
.
course_outline_page
.
section_at
(
0
)
.
in_editable_form
())
self
.
assert
Fals
e
(
self
.
course_outline_page
.
section_at
(
0
)
.
is_collapsed
)
self
.
assert
Tru
e
(
self
.
course_outline_page
.
section_at
(
0
)
.
is_collapsed
)
self
.
course_outline_page
.
section_at
(
0
)
.
edit_name
()
self
.
assertTrue
(
self
.
course_outline_page
.
section_at
(
0
)
.
in_editable_form
())
self
.
assert
Fals
e
(
self
.
course_outline_page
.
section_at
(
0
)
.
is_collapsed
)
self
.
assert
Tru
e
(
self
.
course_outline_page
.
section_at
(
0
)
.
is_collapsed
)
self
.
course_outline_page
.
section_at
(
0
)
.
enter_name
(
'Changed'
)
self
.
assertFalse
(
self
.
course_outline_page
.
section_at
(
0
)
.
is_collapsed
)
self
.
assertTrue
(
self
.
course_outline_page
.
section_at
(
0
)
.
is_collapsed
)
self
.
course_outline_page
.
section_at
(
0
)
.
finalize_name
()
self
.
assertTrue
(
self
.
course_outline_page
.
section_at
(
0
)
.
is_collapsed
)
class
CreateSectionsTest
(
CourseOutlineTest
):
...
...
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