Changed way feature flags are interpreted
Configurations must be defined before hand Reduced pylint violations We only support 4 browsers
This commit is contained in:
@@ -12,7 +12,6 @@ Feature: Course checklists
|
||||
|
||||
# There are issues getting link to be active in browsers other than chrome
|
||||
@skip_firefox
|
||||
@skip_opera
|
||||
Scenario: A task can link to a location within Studio
|
||||
Given I have opened Checklists
|
||||
When I select a link to the course outline
|
||||
@@ -22,7 +21,6 @@ Feature: Course checklists
|
||||
|
||||
# There are issues getting link to be active in browsers other than chrome
|
||||
@skip_firefox
|
||||
@skip_opera
|
||||
Scenario: A task can link to a location outside Studio
|
||||
Given I have opened Checklists
|
||||
When I select a link to help page
|
||||
|
||||
@@ -10,6 +10,7 @@ import os
|
||||
|
||||
TEST_ROOT = settings.COMMON_TEST_DATA_ROOT
|
||||
|
||||
|
||||
@step(u'I go to the files and uploads page')
|
||||
def go_to_uploads(_step):
|
||||
menu_css = 'li.nav-course-courseware'
|
||||
@@ -106,8 +107,8 @@ def get_index(file_name):
|
||||
def get_file(file_name):
|
||||
index = get_index(file_name)
|
||||
assert index != -1
|
||||
|
||||
url_css = 'a.filename'
|
||||
|
||||
def get_url():
|
||||
return world.css_find(url_css)[index]._element.get_attribute('href')
|
||||
url = world.retry_on_exception(get_url)
|
||||
|
||||
@@ -13,8 +13,6 @@ Feature: Navigate Course
|
||||
When I click on subsection "2"
|
||||
Then I should see the content of subsection "2"
|
||||
|
||||
# Clicking on the sequence link doesn't work on opera through sauce
|
||||
@skip_opera
|
||||
Scenario: I can navigate to sequences
|
||||
Given I am viewing a section with multiple sequences
|
||||
When I click on sequence "2"
|
||||
|
||||
@@ -27,24 +27,41 @@ DESIRED_CAPABILITIES = {
|
||||
'android': DesiredCapabilities.ANDROID
|
||||
}
|
||||
|
||||
PLATFORMS = ['Linux', 'OS X 10.8', 'OS X 10.6', 'Windows 8', 'Windows 7', 'Windows XP']
|
||||
ALL_CONFIG = {
|
||||
'Linux-chrome--': ['Linux', 'chrome', '', ''],
|
||||
'Windows 8-chrome--': ['Windows 8', 'chrome', '', ''],
|
||||
'Windows 7-chrome--': ['Windows 7', 'chrome', '', ''],
|
||||
'Windows XP-chrome--': ['Windows XP', 'chrome', '', ''],
|
||||
'OS X 10.8-chrome--': ['OS X 10.8', 'chrome', '', ''],
|
||||
'OS X 10.6-chrome--': ['OS X 10.6', 'chrome', '', ''],
|
||||
|
||||
'Linux-firefox-23-': ['Linux', 'firefox', '23', ''],
|
||||
'Windows 8-firefox-23-': ['Windows 8', 'firefox', '23', ''],
|
||||
'Windows 7-firefox-23-': ['Windows 7', 'firefox', '23', ''],
|
||||
'Windows XP-firefox-23-': ['Windows XP', 'firefox', '23', ''],
|
||||
|
||||
'OS X 10.8-safari-6-': ['OS X 10.8', 'safari', '6', ''],
|
||||
|
||||
'Windows 8-internetexplorer-10-': ['Windows 8', 'internetexplorer', '10', ''],
|
||||
}
|
||||
|
||||
#HACK
|
||||
#This needs to be done because Jenkins needs to satisfy URLs, JSON, BASH, SAUCE, and PYTHON
|
||||
#This is the simplest way to adhere to all of these requirements and still be readable
|
||||
# PLATFORM-BROWSER-VERSION_NUM-DEVICE
|
||||
DEFAULT_CONFIG = 'Linux-chrome--'
|
||||
|
||||
SAUCE_INFO = os.environ.get('SAUCE_INFO', DEFAULT_CONFIG).split('-')
|
||||
if len(SAUCE_INFO) != 4:
|
||||
SAUCE_INFO = DEFAULT_CONFIG.split('-')
|
||||
SAUCE_CONFIG = os.environ.get('SAUCE_INFO', DEFAULT_CONFIG)
|
||||
|
||||
SAUCE_INFO = ALL_CONFIG[SAUCE_CONFIG]
|
||||
|
||||
# Information needed to utilize Sauce Labs.
|
||||
SAUCE = {
|
||||
'SAUCE_ENABLED': os.environ.get('SAUCE_ENABLED'),
|
||||
'USERNAME': os.environ.get('SAUCE_USER_NAME'),
|
||||
'ACCESS_ID': os.environ.get('SAUCE_API_KEY'),
|
||||
'PLATFORM': SAUCE_INFO[0] if SAUCE_INFO[0] in PLATFORMS else 'Linux',
|
||||
'BROWSER': DESIRED_CAPABILITIES.get(SAUCE_INFO[1].lower(), DesiredCapabilities.CHROME),
|
||||
'PLATFORM': SAUCE_INFO[0],
|
||||
'BROWSER': DESIRED_CAPABILITIES.get(SAUCE_INFO[1]),
|
||||
'VERSION': SAUCE_INFO[2],
|
||||
'DEVICE': SAUCE_INFO[3],
|
||||
'SESSION': 'Jenkins Acceptance Tests',
|
||||
|
||||
Reference in New Issue
Block a user