Commit 58bb6e1e by JonahStanley

Changed tags to be lowercase to prevent preprocessing

Changed to have a default for device since it isn't always needed

Tags are more clear

Fixed stylistic issues
parent 027cbfd0
......@@ -13,7 +13,7 @@ Feature: Advanced (manual) course policy
Given I am on the Advanced Course Settings page in Studio
Then the settings are alphabetized
@Sauce
@skip_sauce
Scenario: Test cancel editing key value
Given I am on the Advanced Course Settings page in Studio
When I edit the value of a policy key
......@@ -22,7 +22,7 @@ Feature: Advanced (manual) course policy
And I reload the page
Then the policy key value is unchanged
@Sauce
@skip_sauce
Scenario: Test editing key value
Given I am on the Advanced Course Settings page in Studio
When I edit the value of a policy key and save
......@@ -30,7 +30,7 @@ Feature: Advanced (manual) course policy
And I reload the page
Then the policy key value is changed
@Sauce
@skip_sauce
Scenario: Test how multi-line input appears
Given I am on the Advanced Course Settings page in Studio
When I create a JSON object as a value for "discussion_topics"
......@@ -38,7 +38,7 @@ Feature: Advanced (manual) course policy
And I reload the page
Then it is displayed as formatted
@Sauce
@skip_sauce
Scenario: Test error if value supplied is of the wrong type
Given I am on the Advanced Course Settings page in Studio
When I create a JSON object as a value for "display_name"
......@@ -47,7 +47,7 @@ Feature: Advanced (manual) course policy
Then the policy key value is unchanged
# This feature will work in Firefox only when Firefox is the active window
@Sauce
@skip_sauce
Scenario: Test automatic quoting of non-JSON values
Given I am on the Advanced Course Settings page in Studio
When I create a non-JSON value not in quotes
......@@ -55,7 +55,7 @@ Feature: Advanced (manual) course policy
And I reload the page
Then it is displayed as a string
@Sauce
@skip_sauce
Scenario: Confirmation is shown on save
Given I am on the Advanced Course Settings page in Studio
When I edit the value of a policy key
......
......@@ -11,7 +11,7 @@ Feature: Course checklists
And They are correctly selected after reloading the page
# CHROME ONLY, due to issues getting link to be active in firefox
@Firefox
@skip_firefox
Scenario: A task can link to a location within Studio
Given I have opened Checklists
When I select a link to the course outline
......@@ -20,7 +20,7 @@ Feature: Course checklists
Then I am brought back to the course outline in the correct state
# CHROME ONLY, due to issues getting link to be active in firefox
@Firefox
@skip_firefox
Scenario: A task can link to a location outside Studio
Given I have opened Checklists
When I select a link to help page
......
......@@ -14,13 +14,13 @@ Feature: Video Component Editor
Then I can modify the display name
And my video display name change is persisted on save
@Sauce
@skip_sauce
Scenario: Captions are hidden when "show captions" is false
Given I have created a Video component
And I have set "show captions" to False
Then when I view the video it does not show the captions
@Sauce
@skip_sauce
Scenario: Captions are shown when "show captions" is true
Given I have created a Video component
And I have set "show captions" to True
......
......@@ -22,10 +22,10 @@ from random import choice
PORTS = [2000, 2001, 2020, 2109, 2222, 2310, 3000, 3001,
3030, 3210, 3333, 4000, 4001, 4040, 4321, 4502, 4503, 5000, 5001,
5050, 5555, 5432, 6000, 6001, 6060, 6666, 6543, 7000, 7070, 7774,
7777, 8000, 8001, 8003, 8031, 8080, 8081, 8765, 8888, 9000, 9001,
7777, 8003, 8031, 8080, 8081, 8765, 8888, 9000, 9001,
9080, 9090, 9876, 9999, 49221, 55001]
DESIRED_CAPABILITIES={
DESIRED_CAPABILITIES = {
'chrome': DesiredCapabilities.CHROME,
'internet explorer': DesiredCapabilities.INTERNETEXPLORER,
'firefox': DesiredCapabilities.FIREFOX,
......@@ -98,16 +98,15 @@ USE_I18N = True
# Information needed to utilize Sauce Labs.
MITX_FEATURES['SAUCE'] = {
'ENABLED' : os.environ.get('ENABLED'),
'SAUCE_ENABLED' : os.environ.get('SAUCE_ENABLED'),
'USERNAME' : os.environ.get('SAUCE_USER_NAME'),
'ACCESS_ID' : os.environ.get('SAUCE_API_KEY'),
'BROWSER' : DESIRED_CAPABILITIES.get(os.environ.get('SAUCE_BROWSER', 'chrome')),
'PLATFORM' : os.environ.get('SAUCE_PLATFORM'),
'VERSION' : os.environ.get('SAUCE_VERSION'),
'DEVICE' : os.environ.get('SAUCE_DEVICE'),
'BROWSER' : DESIRED_CAPABILITIES.get(os.environ.get('SAUCE_BROWSER', 'chrome'), DesiredCapabilities.CHROME),
'PLATFORM' : os.environ.get('SAUCE_PLATFORM', 'Linux'),
'VERSION' : os.environ.get('SAUCE_VERSION', ''),
'DEVICE' : os.environ.get('SAUCE_DEVICE', ''),
'SESSION' : 'Jenkins Acceptance Tests',
'BUILD' : os.environ.get('JOB_NAME'),
'CUSTOM_TAGS' : {}
'BUILD' : os.environ.get('JOB_NAME', 'CMS TESTS'),
}
# Include the lettuce app for acceptance testing, including the 'harvest' django-admin command
......
......@@ -56,13 +56,13 @@ SAUCE = settings.MITX_FEATURES.get('SAUCE', {})
config = {"username": SAUCE.get('USERNAME'),
"access-key": SAUCE.get('ACCESS_ID')}
world.absorb(SAUCE.get('SAUCE_ENABLED'),'SAUCE_ENABLED')
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['custom-data'] = SAUCE.get('CUSTOM_TAGS', '')
desired_capabilities['platform'] = SAUCE.get('PLATFORM')
desired_capabilities['version'] = SAUCE.get('VERSION')
desired_capabilities['device-type'] = SAUCE.get('DEVICE')
desired_capabilities['name'] = SAUCE.get('SESSION')
desired_capabilities['build'] = SAUCE.get('BUILD')
desired_capabilities['video-upload-on-pass'] = False
desired_capabilities['sauce-advisor'] = False
desired_capabilities['record-screenshots'] = False
......@@ -71,7 +71,7 @@ desired_capabilities['max-duration'] = 3600
desired_capabilities['public'] = 'public restricted'
jobid=''
base64string = base64.encodestring('%s:%s' % (config['username'], config['access-key']))[:-1]
base64string = base64.encodestring('{}:{}'.format(config['username'], config['access-key']))[:-1]
def set_job_status(jobid, passed=True):
body_content = json.dumps({"passed": passed})
......@@ -98,7 +98,7 @@ def initial_setup(server):
while (not success) and num_attempts < MAX_VALID_BROWSER_ATTEMPTS:
# Get a browser session
if SAUCE.get('ENABLED'):
if world.SAUCE_ENABLED:
world.browser = Browser(
'remote',
url="http://{}:{}@ondemand.saucelabs.com:80/wd/hub".format(config['username'],config['access-key']),
......@@ -130,7 +130,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 SAUCE.get('ENABLED'):
if not world.SAUCE_ENABLED:
world.browser.driver.set_window_size(1280, 1024)
......@@ -181,6 +181,6 @@ def teardown_browser(total):
"""
Quit the browser after executing the tests.
"""
if SAUCE.get('ENABLED'):
if world.SAUCE_ENABLED:
set_job_status(jobid, total.scenarios_ran == total.scenarios_passed)
world.browser.quit()
......@@ -33,10 +33,10 @@ export DISPLAY=:1
SKIP_TESTS=""
if [ ! -z ${LETTUCE_BROWSER+x} ]; then
SKIP_TESTS="--tag -$(tr '[:lower:]' '[:upper:]' <<< ${LETTUCE_BROWSER:0:1})${LETTUCE_BROWSER:1}"
SKIP_TESTS="--tag -skip_$LETTUCE_BROWSER"
fi
if [ ! -z ${SAUCE_ENABLED+x} ]; then
SKIP_TESTS="--tag -Sauce --tag -$(tr '[:lower:]' '[:upper:]' <<< ${SAUCE_BROWSER:0:1})${SAUCE_BROWSER:1}"
SKIP_TESTS="--tag -skip_sauce --tag -skip_$SAUCE_BROWSER"
fi
# Run the lms and cms acceptance tests
......
......@@ -12,7 +12,7 @@ Feature: Login in as a registered user
Then I should see the login error message "This account has not been activated"
# CHROME ONLY, firefox will not redirect properly
@Firefox
@skip_firefox
Scenario: Login to an activated account
Given I am an edX user
And I am an activated user
......
......@@ -4,7 +4,7 @@ Feature: Sign in
I want to signup for a student account
# CHROME ONLY, firefox will not redirect properly
@Firefox
@skip_firefox
Scenario: Sign up from the homepage
Given I visit the homepage
When I click the link with the text "Register Now"
......
......@@ -12,7 +12,7 @@ Feature: Video component
Then when I view the video it has rendered in Youtube mode
#Firefox doesn't have HTML5
@Firefox
@skip_firefox
Scenario: Autoplay is enabled in LMS for a Video component
Given the course has a Video component in HTML5 mode
Then when I view the video it has autoplay enabled
......@@ -23,10 +23,10 @@ from random import choice
PORTS = [2000, 2001, 2020, 2109, 2222, 2310, 3000, 3001,
3030, 3210, 3333, 4000, 4001, 4040, 4321, 4502, 4503, 5000, 5001,
5050, 5555, 5432, 6000, 6001, 6060, 6666, 6543, 7000, 7070, 7774,
7777, 8000, 8001, 8003, 8031, 8080, 8081, 8765, 8888, 9000, 9001,
7777, 8003, 8031, 8080, 8081, 8765, 8888, 9000, 9001,
9080, 9090, 9876, 9999, 49221, 55001]
DESIRED_CAPABILITIES={
DESIRED_CAPABILITIES = {
'chrome': DesiredCapabilities.CHROME,
'internet explorer': DesiredCapabilities.INTERNETEXPLORER,
'firefox': DesiredCapabilities.FIREFOX,
......@@ -106,16 +106,15 @@ USE_I18N = True
# Information needed to utilize Sauce Labs.
MITX_FEATURES['SAUCE'] = {
'ENABLED' : os.environ.get('ENABLED'),
'SAUCE_ENABLED' : os.environ.get('SAUCE_ENABLED'),
'USERNAME' : os.environ.get('SAUCE_USER_NAME'),
'ACCESS_ID' : os.environ.get('SAUCE_API_KEY'),
'BROWSER' : DESIRED_CAPABILITIES.get(os.environ.get('SAUCE_BROWSER', 'chrome')),
'PLATFORM' : os.environ.get('SAUCE_PLATFORM'),
'VERSION' : os.environ.get('SAUCE_VERSION'),
'DEVICE' : os.environ.get('SAUCE_DEVICE'),
'BROWSER' : DESIRED_CAPABILITIES.get(os.environ.get('SAUCE_BROWSER', 'chrome'), DesiredCapabilities.CHROME),
'PLATFORM' : os.environ.get('SAUCE_PLATFORM', 'Linux'),
'VERSION' : os.environ.get('SAUCE_VERSION', ''),
'DEVICE' : os.environ.get('SAUCE_DEVICE', ''),
'SESSION' : 'Jenkins Acceptance Tests',
'BUILD' : os.environ.get('JOB_NAME'),
'CUSTOM_TAGS' : {}
'BUILD' : os.environ.get('JOB_NAME', 'LMS TESTS'),
}
# Include the lettuce app for acceptance testing, including the 'harvest' django-admin command
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment