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
682d85c2
Commit
682d85c2
authored
Aug 14, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed feature to being one dictionary
Conflicts: common/djangoapps/terrain/browser.py
parent
3746c654
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
36 deletions
+35
-36
cms/envs/acceptance.py
+12
-12
common/djangoapps/terrain/browser.py
+11
-10
lms/envs/acceptance.py
+12
-14
No files found.
cms/envs/acceptance.py
View file @
682d85c2
...
...
@@ -76,23 +76,23 @@ DATABASES = {
# Use the auto_auth workflow for creating users and logging them in
MITX_FEATURES
[
'AUTOMATIC_AUTH_FOR_TESTING'
]
=
True
# HACK
# Setting this flag to false causes imports to not load correctly in the lettuce python files
# We do not yet understand why this occurs. Setting this to true is a stopgap measure
USE_I18N
=
True
MITX_FEATURES
[
'USE_SAUCE'
]
=
False
MITX_FEATURES
[
'SAUCE_USERNAME'
]
=
'<USERNAME>'
MITX_FEATURES
[
'SAUCE_ACCESS_ID'
]
=
'<ACCESS_ID>'
MITX_FEATURES
[
'SAUCE_BROWSER'
]
=
DesiredCapabilities
.
CHROME
MITX_FEATURES
[
'SAUCE_PLATFORM'
]
=
'Linux'
MITX_FEATURES
[
'SAUCE_VERSION'
]
=
''
MITX_FEATURES
[
'SAUCE_DEVICE'
]
=
''
MITX_FEATURES
[
'SAUCE_SESSION'
]
=
'Lettuce Tests'
MITX_FEATURES
[
'SAUCE_BUILD'
]
=
'CMS TESTS'
MITX_FEATURES
[
'SAUCE_TAGS'
]
=
''
MITX_FEATURES
[
'SAUCE'
]
=
{
'USE'
:
False
,
'USERNAME'
:
'<USERNAME>'
,
'ACCESS_ID'
:
'<ACCESS_ID>'
,
'BROWSER'
:
DesiredCapabilities
.
CHROME
,
'PLATFORM'
:
'Linux'
,
'VERSION'
:
''
,
'DEVICE'
:
''
,
'SESSION'
:
'Lettuce Tests'
,
'BUILD'
:
'CMS TESTS'
,
'TAGS'
:
''
}
# Include the lettuce app for acceptance testing, including the 'harvest' django-admin command
INSTALLED_APPS
+=
(
'lettuce.django'
,)
...
...
common/djangoapps/terrain/browser.py
View file @
682d85c2
...
...
@@ -53,13 +53,14 @@ except ImportError:
config
=
{
"username"
:
settings
.
MITX_FEATURES
.
get
(
'SAUCE_USERNAME'
),
"access-key"
:
settings
.
MITX_FEATURES
.
get
(
'SAUCE_ACCESS_ID'
)}
desired_capabilities
=
settings
.
MITX_FEATURES
.
get
(
'SAUCE_BROWSER'
,
DesiredCapabilities
.
CHROME
)
desired_capabilities
[
'platform'
]
=
settings
.
MITX_FEATURES
.
get
(
'SAUCE_PLATFORM'
,
'Linux'
)
desired_capabilities
[
'version'
]
=
settings
.
MITX_FEATURES
.
get
(
'SAUCE_VERSION'
,
''
)
desired_capabilities
[
'device-type'
]
=
settings
.
MITX_FEATURES
.
get
(
'SAUCE_DEVICE'
,
''
)
desired_capabilities
[
'name'
]
=
settings
.
MITX_FEATURES
.
get
(
'SAUCE_SESSION'
,
'Lettuce Tests'
)
desired_capabilities
[
'build'
]
=
settings
.
MITX_FEATURES
.
get
(
'SAUCE_BUILD'
,
'edX Plaform'
)
desired_capabilities
[
'tags'
]
=
settings
.
MITX_FEATURES
.
get
(
'SAUCE_TAGS'
,
''
)
SAUCE
=
settings
.
MITX_FEATURES
.
get
(
'SAUCE'
,
{})
desired_capabilities
=
SAUCE
.
get
(
'BROWSER'
,
DesiredCapabilities
.
CHROME
)
desired_capabilities
[
'platform'
]
=
SAUCE
.
get
(
'PLATFORM'
,
'Linux'
)
desired_capabilities
[
'version'
]
=
SAUCE
.
get
(
'VERSION'
,
''
)
desired_capabilities
[
'device-type'
]
=
SAUCE
.
get
(
'DEVICE'
,
''
)
desired_capabilities
[
'name'
]
=
SAUCE
.
get
(
'SESSION'
,
'Lettuce Tests'
)
desired_capabilities
[
'build'
]
=
SAUCE
.
get
(
'BUILD'
,
'edX Plaform'
)
desired_capabilities
[
'tags'
]
=
SAUCE
.
get
(
'TAGS'
,
''
)
desired_capabilities
[
'video-upload-on-pass'
]
=
False
desired_capabilities
[
'sauce-advisor'
]
=
False
desired_capabilities
[
'record-screenshots'
]
=
False
...
...
@@ -95,7 +96,7 @@ def initial_setup(server):
while
(
not
success
)
and
num_attempts
<
MAX_VALID_BROWSER_ATTEMPTS
:
# Get a browser session
if
settings
.
MITX_FEATURES
.
get
(
'USE_SAUC
E'
):
if
SAUCE
.
get
(
'US
E'
):
world
.
browser
=
Browser
(
'remote'
,
url
=
"http://{}:{}@ondemand.saucelabs.com:80/wd/hub"
.
format
(
config
[
'username'
],
config
[
'access-key'
]),
...
...
@@ -126,7 +127,7 @@ def initial_setup(server):
raise
IOError
(
"Could not acquire valid {driver} browser session."
.
format
(
driver
=
'remote'
))
# Set the browser size to 1280x1024
if
not
settings
.
MITX_FEATURES
.
get
(
'USE_SAUC
E'
):
if
not
SAUCE
.
get
(
'US
E'
):
world
.
browser
.
driver
.
set_window_size
(
1280
,
1024
)
...
...
@@ -177,6 +178,6 @@ def teardown_browser(total):
"""
Quit the browser after executing the tests.
"""
if
settings
.
MITX_FEATURES
.
get
(
'USE_SAUC
E'
):
if
SAUCE
.
get
(
'US
E'
):
set_job_status
(
jobid
,
total
.
scenarios_ran
==
total
.
scenarios_passed
)
world
.
browser
.
quit
()
lms/envs/acceptance.py
View file @
682d85c2
...
...
@@ -89,20 +89,18 @@ MITX_FEATURES['AUTOMATIC_AUTH_FOR_TESTING'] = True
# We do not yet understand why this occurs. Setting this to true is a stopgap measure
USE_I18N
=
True
MITX_FEATURES
[
'ENABLE_FEEDBACK_SUBMISSION'
]
=
True
FEEDBACK_SUBMISSION_EMAIL
=
'dummy@example.com'
MITX_FEATURES
[
'USE_SAUCE'
]
=
False
MITX_FEATURES
[
'SAUCE_USERNAME'
]
=
'<USERNAME>'
MITX_FEATURES
[
'SAUCE_ACCESS_ID'
]
=
'<ACCESS_ID>'
MITX_FEATURES
[
'SAUCE_BROWSER'
]
=
DesiredCapabilities
.
CHROME
MITX_FEATURES
[
'SAUCE_PLATFORM'
]
=
'Linux'
MITX_FEATURES
[
'SAUCE_VERSION'
]
=
''
MITX_FEATURES
[
'SAUCE_DEVICE'
]
=
''
MITX_FEATURES
[
'SAUCE_SESSION'
]
=
'Lettuce Tests'
MITX_FEATURES
[
'SAUCE_BUILD'
]
=
'LMS TESTS'
MITX_FEATURES
[
'SAUCE_TAGS'
]
=
''
MITX_FEATURES
[
'SAUCE'
]
=
{
'USE'
:
False
,
'USERNAME'
:
'<USERNAME>'
,
'ACCESS_ID'
:
'<ACCESS_ID>'
,
'BROWSER'
:
DesiredCapabilities
.
CHROME
,
'PLATFORM'
:
'Linux'
,
'VERSION'
:
''
,
'DEVICE'
:
''
,
'SESSION'
:
'Lettuce Tests'
,
'BUILD'
:
'CMS TESTS'
,
'TAGS'
:
''
}
# Include the lettuce app for acceptance testing, including the 'harvest' django-admin command
INSTALLED_APPS
+=
(
'lettuce.django'
,)
...
...
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