Lettuce-on-Xenial CMS fix. Iterate through a list to avoid quotation string confusion.
Also change some selenium settings (they were not necessary at this time).
This commit is contained in:
@@ -12,7 +12,6 @@ CODEMIRROR_SELECTOR_PREFIX = "$('iframe').contents().find"
|
||||
|
||||
@step('I have created a Blank HTML Page$')
|
||||
def i_created_blank_html_page(step):
|
||||
# from nose.tools import set_trace; set_trace()
|
||||
step.given('I am in Studio editing a new unit')
|
||||
world.create_component_instance(
|
||||
step=step,
|
||||
@@ -231,7 +230,7 @@ def font_selector_dropdown_is_shown(step):
|
||||
|
||||
|
||||
@step('"Default" option sets the expected font family')
|
||||
def default_options_sets_expected_font_family(step):
|
||||
def default_options_sets_expected_font_family(step): # pylint: disable=unused-argument, redefined-outer-name
|
||||
fonts = get_available_fonts(get_fonts_list_panel(world))
|
||||
fonts_found = fonts.get("Default", None)
|
||||
expected_font_family = CUSTOM_FONTS.get('Default')
|
||||
@@ -242,28 +241,29 @@ def default_options_sets_expected_font_family(step):
|
||||
@step('all standard tinyMCE fonts should be available')
|
||||
def check_standard_tinyMCE_fonts(step):
|
||||
fonts = get_available_fonts(get_fonts_list_panel(world))
|
||||
for label, expected_font in TINYMCE_FONTS.items():
|
||||
assert_equal(fonts.get(label, None), expected_font)
|
||||
for label, expected_fonts in TINYMCE_FONTS.items():
|
||||
for expected_font in expected_fonts:
|
||||
assert_in(expected_font, fonts.get(label, None))
|
||||
|
||||
TINYMCE_FONTS = OrderedDict([
|
||||
("Andale Mono", "'andale mono', times"),
|
||||
("Arial", "arial, helvetica, sans-serif"),
|
||||
("Arial Black", "'arial black', 'avant garde'"),
|
||||
("Book Antiqua", "'book antiqua', palatino"),
|
||||
("Comic Sans MS", "'comic sans ms', sans-serif"),
|
||||
("Courier New", "'courier new', courier"),
|
||||
("Georgia", "georgia, palatino"),
|
||||
("Helvetica", "helvetica"),
|
||||
("Impact", "impact, chicago"),
|
||||
("Symbol", "symbol"),
|
||||
("Tahoma", "tahoma, arial, helvetica, sans-serif"),
|
||||
("Terminal", "terminal, monaco"),
|
||||
("Times New Roman", "'times new roman', times"),
|
||||
("Trebuchet MS", "'trebuchet ms', geneva"),
|
||||
("Verdana", "verdana, geneva"),
|
||||
("Andale Mono", ['andale mono', 'times']),
|
||||
("Arial", ['arial', 'helvetica', 'sans-serif']),
|
||||
("Arial Black", ['arial black', 'avant garde']),
|
||||
("Book Antiqua", ['book antiqua', 'palatino']),
|
||||
("Comic Sans MS", ['comic sans ms', 'sans-serif']),
|
||||
("Courier New", ['courier new', 'courier']),
|
||||
("Georgia", ['georgia', 'palatino']),
|
||||
("Helvetica", ['helvetica']),
|
||||
("Impact", ['impact', 'chicago']),
|
||||
("Symbol", ['symbol']),
|
||||
("Tahoma", ['tahoma', 'arial', 'helvetica', 'sans-serif']),
|
||||
("Terminal", ['terminal', 'monaco']),
|
||||
("Times New Roman", ['times new roman', 'times']),
|
||||
("Trebuchet MS", ['trebuchet ms', 'geneva']),
|
||||
("Verdana", ['verdana', 'geneva']),
|
||||
# tinyMCE does not set font-family on dropdown span for these two fonts
|
||||
("Webdings", ""), # webdings
|
||||
("Wingdings", ""), # wingdings, 'zapf dingbats'
|
||||
("Webdings", [""]), # webdings
|
||||
("Wingdings", [""]), # wingdings, 'zapf dingbats'
|
||||
])
|
||||
|
||||
CUSTOM_FONTS = OrderedDict([
|
||||
|
||||
@@ -81,9 +81,6 @@ def initial_setup(server):
|
||||
desired_capabilities['loggingPrefs'] = {
|
||||
'browser': 'ALL',
|
||||
}
|
||||
desired_capabilities['chromeOptions'] = {
|
||||
"args": ["--dns-prefetch-disable"]
|
||||
}
|
||||
else:
|
||||
desired_capabilities = {}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ def stop_video_server(_total):
|
||||
video_server.shutdown()
|
||||
|
||||
|
||||
@before.all
|
||||
@before.all # pylint: disable=no-member
|
||||
def start_stub_servers():
|
||||
"""
|
||||
Start all stub servers
|
||||
|
||||
@@ -9,7 +9,6 @@ from splinter.exceptions import ElementDoesNotExist
|
||||
from selenium.common.exceptions import NoAlertPresentException
|
||||
from nose.tools import assert_true, assert_equal, assert_in, assert_is_none
|
||||
from lettuce import world, step
|
||||
from selenium.webdriver.common.keys import Keys
|
||||
|
||||
from courseware.tests.factories import InstructorFactory, BetaTesterFactory
|
||||
from courseware.access import has_access
|
||||
|
||||
@@ -93,9 +93,8 @@ class AcceptanceTest(TestSuite):
|
||||
report_file = self.report_dir / "{}.xml".format(self.system)
|
||||
report_args = ["--xunit-file {}".format(report_file)]
|
||||
return [
|
||||
# set DBUS_SESSION_BUS_ADDRESS to avoid hangs on Chrome
|
||||
"DBUS_SESSION_BUS_ADDRESS=/dev/null",
|
||||
# 'LANG="en_US.UTF-8"',
|
||||
'LC_NUMERIC="en_US.UTF-8"',
|
||||
"DEFAULT_STORE={}".format(self.default_store),
|
||||
"./manage.py",
|
||||
self.system,
|
||||
|
||||
Reference in New Issue
Block a user