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
e7450a81
Commit
e7450a81
authored
Aug 22, 2012
by
Dean Dieker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed a bug that where only the sections under the first chapter would ever be clicked
parent
37277863
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
lms/djangoapps/acceptance_testing/features/smart-accordion.py
+6
-5
No files found.
lms/djangoapps/acceptance_testing/features/smart-accordion.py
View file @
e7450a81
...
@@ -62,8 +62,6 @@ def i_verify_all_the_content_of_each_course(step):
...
@@ -62,8 +62,6 @@ def i_verify_all_the_content_of_each_course(step):
i
+=
1
i
+=
1
def
browse_course
(
course_id
):
def
browse_course
(
course_id
):
world
.
browser
.
find_element_by_xpath
(
"//div[@id='accordion']//nav//div[1]"
)
.
click
()
world
.
browser
.
find_element_by_xpath
(
"//div[@id='accordion']//nav//div[1]"
)
.
click
()
...
@@ -79,7 +77,6 @@ def browse_course(course_id):
...
@@ -79,7 +77,6 @@ def browse_course(course_id):
## Iterate the chapters
## Iterate the chapters
while
chapter_it
<
num_chapters
:
while
chapter_it
<
num_chapters
:
world
.
browser
.
find_element_by_xpath
(
"//*[@id='accordion']//nav//div["
+
str
(
chapter_it
+
1
)
+
"]//h3"
)
.
click
()
world
.
browser
.
find_element_by_xpath
(
"//*[@id='accordion']//nav//div["
+
str
(
chapter_it
+
1
)
+
"]//h3"
)
.
click
()
num_sections
=
len
(
chapters
[
chapter_it
][
'sections'
])
num_sections
=
len
(
chapters
[
chapter_it
][
'sections'
])
accordion_class
=
"ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active"
accordion_class
=
"ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active"
rendered_sections
=
len
(
world
.
browser
.
find_elements_by_xpath
(
"//*[@id='accordion']//nav//div["
+
str
(
chapter_it
+
1
)
+
"]//ul//li"
))
rendered_sections
=
len
(
world
.
browser
.
find_elements_by_xpath
(
"//*[@id='accordion']//nav//div["
+
str
(
chapter_it
+
1
)
+
"]//ul//li"
))
...
@@ -88,13 +85,17 @@ def browse_course(course_id):
...
@@ -88,13 +85,17 @@ def browse_course(course_id):
section_it
=
0
section_it
=
0
## Iterate the sections
## Iterate the sections
while
section_it
<
num_sections
:
while
section_it
<
num_sections
:
world
.
browser
.
find_element_by_xpath
(
"//*[@id='accordion']//nav//div//ul[@class='"
+
accordion_class
+
"']//li["
+
str
(
section_it
+
1
)
+
"]//a"
)
.
click
()
world
.
browser
.
find_element_by_xpath
(
"//*[@id='accordion']//nav//div
["
+
str
(
chapter_it
+
1
)
+
"]
//ul[@class='"
+
accordion_class
+
"']//li["
+
str
(
section_it
+
1
)
+
"]//a"
)
.
click
()
wait_until_class_renders
(
'p'
,
3
)
wait_until_class_renders
(
'p'
,
3
)
chapter_it
+=
1
section_it
+=
1
section_it
+=
1
## Iterate the tabs
chapter_it
+=
1
...
...
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