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
73e03883
Commit
73e03883
authored
Sep 24, 2013
by
Jay Zoldak
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1083 from edx/zoldak/speedy-lms-acceptance
Speed up lms acceptance tests
parents
6d41669b
002f3ef9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
8 deletions
+21
-8
cms/djangoapps/contentstore/features/subsection.py
+1
-1
common/djangoapps/terrain/browser.py
+4
-2
common/djangoapps/terrain/ui_helpers.py
+7
-2
lms/djangoapps/courseware/features/lti.py
+7
-1
lms/djangoapps/courseware/features/problems_setup.py
+2
-2
No files found.
cms/djangoapps/contentstore/features/subsection.py
View file @
73e03883
...
...
@@ -109,7 +109,7 @@ def i_see_my_subsection_name_with_quote_on_the_courseware_page(step):
@step
(
'the subsection does not exist$'
)
def
the_subsection_does_not_exist
(
step
):
css
=
'span.subsection-name'
assert
world
.
browser
.
is_element_not_present_by_css
(
css
)
assert
world
.
is_css_not_present
(
css
)
@step
(
'I see the subsection release date is ([0-9/-]+)( [0-9:]+)?'
)
...
...
common/djangoapps/terrain/browser.py
View file @
73e03883
...
...
@@ -119,6 +119,7 @@ def initial_setup(server):
if
not
success
:
raise
IOError
(
"Could not acquire valid {driver} browser session."
.
format
(
driver
=
browser_driver
))
world
.
absorb
(
0
,
'IMPLICIT_WAIT'
)
world
.
browser
.
driver
.
set_window_size
(
1280
,
1024
)
elif
world
.
LETTUCE_SELENIUM_CLIENT
==
'saucelabs'
:
...
...
@@ -128,7 +129,7 @@ def initial_setup(server):
url
=
"http://{}:{}@ondemand.saucelabs.com:80/wd/hub"
.
format
(
config
[
'username'
],
config
[
'access-key'
]),
**
make_saucelabs_desired_capabilities
()
)
world
.
browser
.
driver
.
implicitly_wait
(
30
)
world
.
absorb
(
30
,
'IMPLICIT_WAIT'
)
elif
world
.
LETTUCE_SELENIUM_CLIENT
==
'grid'
:
world
.
browser
=
Browser
(
...
...
@@ -136,11 +137,12 @@ def initial_setup(server):
url
=
settings
.
SELENIUM_GRID
.
get
(
'URL'
),
browser
=
settings
.
SELENIUM_GRID
.
get
(
'BROWSER'
),
)
world
.
browser
.
driver
.
implicitly_wait
(
30
)
world
.
absorb
(
30
,
'IMPLICIT_WAIT'
)
else
:
raise
Exception
(
"Unknown selenium client '{}'"
.
format
(
world
.
LETTUCE_SELENIUM_CLIENT
))
world
.
browser
.
driver
.
implicitly_wait
(
world
.
IMPLICIT_WAIT
)
world
.
absorb
(
world
.
browser
.
driver
.
session_id
,
'jobid'
)
...
...
common/djangoapps/terrain/ui_helpers.py
View file @
73e03883
...
...
@@ -36,8 +36,13 @@ def is_css_present(css_selector, wait_time=10):
@world.absorb
def
is_css_not_present
(
css_selector
,
wait_time
=
5
):
return
world
.
browser
.
is_element_not_present_by_css
(
css_selector
,
wait_time
=
wait_time
)
world
.
browser
.
driver
.
implicitly_wait
(
1
)
try
:
return
world
.
browser
.
is_element_not_present_by_css
(
css_selector
,
wait_time
=
wait_time
)
except
:
raise
finally
:
world
.
browser
.
driver
.
implicitly_wait
(
world
.
IMPLICIT_WAIT
)
@world.absorb
def
css_has_text
(
css_selector
,
text
,
index
=
0
):
...
...
lms/djangoapps/courseware/features/lti.py
View file @
73e03883
...
...
@@ -22,7 +22,13 @@ def lti_is_not_rendered(_step):
#inside iframe test content is not presented
with
world
.
browser
.
get_iframe
(
'ltiLaunchFrame'
)
as
iframe
:
# iframe does not contain functions from terrain/ui_helpers.py
assert
iframe
.
is_element_not_present_by_css
(
'.result'
,
wait_time
=
5
)
world
.
browser
.
driver
.
implicitly_wait
(
1
)
try
:
assert
iframe
.
is_element_not_present_by_css
(
'.result'
,
wait_time
=
1
)
except
:
raise
finally
:
world
.
browser
.
driver
.
implicitly_wait
(
world
.
IMPLICIT_WAIT
)
@step
(
'I view the LTI and it is rendered$'
)
...
...
lms/djangoapps/courseware/features/problems_setup.py
View file @
73e03883
...
...
@@ -144,7 +144,7 @@ PROBLEM_DICT = {
]
},
'correct'
:
[
'section.choicetextgroup_correct'
],
'incorrect'
:
[
's
pan.incorrect'
,
'section.choicetextgroup_
incorrect'
],
'incorrect'
:
[
's
ection.choicetextgroup_incorrect'
,
'span.
incorrect'
],
'unanswered'
:
[
'span.unanswered'
]},
'checkbox_text'
:
{
...
...
@@ -242,7 +242,7 @@ def answer_problem(problem_type, correctness):
def
problem_has_answer
(
problem_type
,
answer_class
):
if
problem_type
==
"drop down"
:
if
answer_class
==
'blank'
:
assert
world
.
browser
.
is_element_not_present_by_css
(
'option[selected="true"]'
)
assert
world
.
is_css_not_present
(
'option[selected="true"]'
)
else
:
actual
=
world
.
browser
.
find_by_css
(
'option[selected="true"]'
)
.
value
expected
=
'Option 2'
if
answer_class
==
'correct'
else
'Option 3'
...
...
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