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
4b708daa
Commit
4b708daa
authored
Aug 21, 2012
by
Dean Dieker
Committed by
Mark L. Chang
Aug 22, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved accordion out of static since it will use courses module
parent
f03ab8a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
0 deletions
+53
-0
lms/djangoapps/acceptance_testing/features/accordion.feature
+17
-0
lms/djangoapps/acceptance_testing/features/accordion.py
+36
-0
No files found.
lms/djangoapps/acceptance_testing/features/accordion.feature
0 → 100644
View file @
4b708daa
Feature
:
Use the Accordion
In order to access courseware
As a registered student
We'll attempt to access all the information
Scenario
:
Click on every Week's Content
Given I visit "http
:
//anant
:
agarwal
@stage-edx-001.m.edx.org/"
When
I click
"LOG IN"
And
I login with
"ddieker+admin@gmail.com"
in the
"email"
field
And
I login with
"password"
in the
"password"
field
And
I press
"Access My Courses"
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
click
"Courseware"
I
should see an element with id of
"accordion"
I
click on every item in every week of the course
\ No newline at end of file
lms/djangoapps/acceptance_testing/features/accordion.py
0 → 100644
View file @
4b708daa
from
lettuce
import
*
#before, world
from
selenium
import
*
import
lettuce_webdriver.webdriver
from
selenium.webdriver
import
ActionChains
from
selenium.webdriver.support.ui
import
WebDriverWait
from
helpers
import
*
import
re
from
courses
import
*
@step
(
u'I should see an element with class of "(.*)" within "(.*)" seconds'
)
def
i_should_see_an_element_with_class_of_classname_within_duraion_seconds
(
step
,
classname
,
duration
):
wait_until_class_renders
(
classname
,
int
(
duration
))
@step
(
u'I should see an element with class of "(.*)"'
)
def
i_should_see_an_element_with_class_of_classname
(
step
,
classname
):
world
.
browser
.
find_element_by_class_name
(
classname
)
@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
):
get_courseware
()
weeks
=
world
.
browser
.
find_elements_by_xpath
(
"//*[@id='accordion']//nav//h3"
)
for
week
in
weeks
:
week
.
click
()
wait_until_class_renders
(
'p'
,
1
)
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
)
j
=
1
while
j
<=
i
:
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"
)
goodnodetext
=
re
.
sub
(
r'\s'
,
'_'
,
node
.
text
)
node
.
click
()
j
+=
1
clean
=
re
.
sub
(
'
\"
'
,
''
,
goodnodetext
)
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