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
bd812a62
Commit
bd812a62
authored
Oct 21, 2013
by
Will Daly
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1422 from edx/will/fix-nav-tests
Fixed navigation acceptance test
parents
405d42cd
854a564a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
14 deletions
+30
-14
common/djangoapps/terrain/ui_helpers.py
+14
-0
lms/djangoapps/courseware/features/navigation.feature
+10
-14
lms/djangoapps/courseware/features/navigation.py
+6
-0
No files found.
common/djangoapps/terrain/ui_helpers.py
View file @
bd812a62
...
...
@@ -560,3 +560,17 @@ def retry_on_exception(func, max_attempts=5, ignored_exceptions=StaleElementRefe
attempt
+=
1
assert_true
(
attempt
<
max_attempts
,
'Ran out of attempts to execute {}'
.
format
(
func
))
@world.absorb
def
disable_jquery_animations
():
"""
Disable JQuery animations on the page. Any state changes
will occur immediately to the final state.
"""
# Ensure that jquery is loaded
world
.
wait_for_js_to_load
()
# Disable jQuery animations
world
.
browser
.
execute_script
(
"jQuery.fx.off = true;"
)
lms/djangoapps/courseware/features/navigation.feature
View file @
bd812a62
...
...
@@ -4,12 +4,10 @@ Feature: LMS.Navigate Course
In order to access courseware
I want to be able to navigate through the content
# Disabled 10/21
# Fails intermittently to click the link to the section
#Scenario: I can navigate to a section
# Given I am viewing a course with multiple sections
# When I navigate to a section
# Then I see the content of the section
Scenario
:
I
can navigate to a section
Given
I am viewing a course with multiple sections
When
I navigate to a section
Then
I see the content of the section
Scenario
:
I
can navigate to subsections
Given
I am viewing a section with multiple subsections
...
...
@@ -22,11 +20,9 @@ Feature: LMS.Navigate Course
Then
I see the content of the sequence item
And
a
"seq_goto"
browser event is emitted
# Disabled 10/21
# Fails intermittently to click the link to the section
#Scenario: I can return to the last section I visited
# Given I am viewing a course with multiple sections
# When I navigate to a section
# And I see the content of the section
# And I return to the courseware
# Then I see that I was most recently in the subsection
Scenario
:
I
can return to the last section I visited
Given
I am viewing a course with multiple sections
When
I navigate to a section
And
I see the content of the section
And
I return to the courseware
Then
I see that I was most recently in the subsection
lms/djangoapps/courseware/features/navigation.py
View file @
bd812a62
...
...
@@ -88,6 +88,9 @@ def view_course_multiple_sequences(step):
@step
(
u'I navigate to a section'
)
def
when_i_navigate_to_a_section
(
step
):
# Prevent jQuery menu animations from interferring with the clicks
world
.
disable_jquery_animations
()
# Open the 2nd section
world
.
css_click
(
css_selector
=
'div.chapter'
,
index
=
1
)
subsection_css
=
'a[href*="Test_Subsection_2/"]'
...
...
@@ -176,6 +179,9 @@ def wait_for_problem(display_name):
"""
Wait for the problem with `display_name` to appear on the page.
"""
# Wait for the problem to reload
world
.
wait_for_ajax_complete
()
wait_func
=
lambda
_
:
world
.
css_has_text
(
'h2.problem-header'
,
display_name
,
strip
=
True
)
...
...
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