Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
682d85c2
Commit
682d85c2
authored
11 years ago
by
JonahStanley
Browse files
Options
Downloads
Patches
Plain Diff
Changed feature to being one dictionary
Conflicts: common/djangoapps/terrain/browser.py
parent
3746c654
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cms/envs/acceptance.py
+12
-12
12 additions, 12 deletions
cms/envs/acceptance.py
common/djangoapps/terrain/browser.py
+11
-10
11 additions, 10 deletions
common/djangoapps/terrain/browser.py
lms/envs/acceptance.py
+12
-14
12 additions, 14 deletions
lms/envs/acceptance.py
with
35 additions
and
36 deletions
cms/envs/acceptance.py
+
12
−
12
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
'
,)
...
...
This diff is collapsed.
Click to expand it.
common/djangoapps/terrain/browser.py
+
11
−
10
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
_SAUCE
'
):
if
SAUCE
.
get
(
'
USE
'
):
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
_SAUCE
'
):
if
not
SAUCE
.
get
(
'
USE
'
):
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
_SAUCE
'
):
if
SAUCE
.
get
(
'
USE
'
):
set_job_status
(
jobid
,
total
.
scenarios_ran
==
total
.
scenarios_passed
)
world
.
browser
.
quit
()
This diff is collapsed.
Click to expand it.
lms/envs/acceptance.py
+
12
−
14
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
'
,)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment