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
539f1ea2
Commit
539f1ea2
authored
Aug 21, 2012
by
Dean Dieker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved accordion out of static since it will use courses module
parent
2427d146
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
18 deletions
+17
-18
lms/djangoapps/acceptance_testing/features/accordion.feature
+0
-3
lms/djangoapps/acceptance_testing/features/accordion.py
+17
-15
No files found.
lms/djangoapps/acceptance_testing/features/
static/
accordion.feature
→
lms/djangoapps/acceptance_testing/features/accordion.feature
View file @
539f1ea2
...
@@ -12,7 +12,5 @@ Feature: Use the Accordion
...
@@ -12,7 +12,5 @@ Feature: Use the Accordion
I
should see an element with class of
"user"
within
"3"
seconds
I
should see an element with class of
"user"
within
"3"
seconds
I visit "http
:
//stage-edx-001.m.edx.org/courses/MITx/6.00x/2012_Fall/info"
I visit "http
:
//stage-edx-001.m.edx.org/courses/MITx/6.00x/2012_Fall/info"
I
click
"Courseware"
I
click
"Courseware"
I
should see an element with id of
"open_close_accordion"
I
should see an element with class of
"ui-accordion"
I
should see an element with id of
"accordion"
I
should see an element with id of
"accordion"
I
click on every item in every week of the course
I
click on every item in every week of the course
\ No newline at end of file
lms/djangoapps/acceptance_testing/features/
static/
accordion.py
→
lms/djangoapps/acceptance_testing/features/accordion.py
View file @
539f1ea2
...
@@ -5,6 +5,7 @@ from selenium.webdriver import ActionChains
...
@@ -5,6 +5,7 @@ from selenium.webdriver import ActionChains
from
selenium.webdriver.support.ui
import
WebDriverWait
from
selenium.webdriver.support.ui
import
WebDriverWait
from
helpers
import
*
from
helpers
import
*
import
re
import
re
from
courses
import
*
@step
(
u'I should see an element with class of "(.*)" within "(.*)" seconds'
)
@step
(
u'I should see an element with class of "(.*)" within "(.*)" seconds'
)
...
@@ -17,17 +18,18 @@ def i_should_see_an_element_with_class_of_classname(step,classname):
...
@@ -17,17 +18,18 @@ def i_should_see_an_element_with_class_of_classname(step,classname):
@step
(
u'I click on every item in every week of the course'
)
@step
(
u'I click on every item in every week of the course'
)
def
i_click_on_every_item_in_every_week_of_the_course
(
step
):
def
i_click_on_every_item_in_every_week_of_the_course
(
step
):
weeks
=
world
.
browser
.
find_elements_by_class_name
(
'ui-accordion-header'
)
get_courseware
()
weeks
[
2
]
.
click
weeks
=
world
.
browser
.
find_elements_by_xpath
(
"//*[@id='accordion']//nav//h3"
)
#for week in weeks:
for
week
in
weeks
:
# week.click()
week
.
click
()
# wait_until_class_renders('p',1)
wait_until_class_renders
(
'p'
,
1
)
nodes
=
world
.
browser
.
find_elements_by_xpath
(
"//*[@id='accordion']//nav//ul[@class='ui-accordion-content-active']//li"
)
nodes
=
world
.
browser
.
find_elements_by_xpath
(
"//*[@id='accordion']//nav//ul[@class='ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active']//li"
)
i
=
len
(
nodes
)
i
=
len
(
nodes
)
j
=
1
j
=
1
while
j
<=
i
:
while
j
<=
i
:
node
=
world
.
browser
.
find_element_by_xpath
(
"//ul[@class='ui-accordion-content-active']//li["
+
str
(
j
)
+
"]//a//p"
)
.
click
()
node
=
world
.
browser
.
find_element_by_xpath
(
"//*[@id='accordion']//nav//ul[@class='ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active']//li["
+
str
(
1
)
+
"]//a//p"
)
i
+=
1
goodnodetext
=
re
.
sub
(
r'\s'
,
'_'
,
node
.
text
)
wait_until_class_renders
(
'p'
,
2
)
node
.
click
()
# goodnodetext = re.sub(r'\s','_',node.text)
j
+=
1
# wait_until_id_renders("sequence_i4x-MITx-6_00x-sequential-"+goodnodetext,3)
clean
=
re
.
sub
(
'
\"
'
,
''
,
goodnodetext
)
\ No newline at end of file
wait_until_id_renders
(
"sequence_i4x-MITx-6_00x-sequential-"
+
clean
,
3
)
\ No newline at end of file
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