Commit 6d5a1264 by Calen Pennington

Move jasmine tests to their own environment

parent 684b9850
"""
This configuration is used for running jasmine tests
"""
from .test import *
from logsettings import get_logger_config
ENABLE_JASMINE = True
DEBUG = True
LOGGING = get_logger_config(ENV_ROOT / "log",
logging_env="dev",
tracking_filename="tracking.log",
dev_env=True,
debug=True)
PIPELINE_JS['js-test-source'] = {
'source_filenames': sum([
pipeline_group['source_filenames']
for pipeline_group
in PIPELINE_JS.values()
], []),
'output_filename': 'js/cms-test-source.js'
}
PIPELINE_JS['spec'] = {
'source_filenames': sorted(rooted_glob(PROJECT_ROOT / 'static/', 'coffee/spec/**/*.coffee')),
'output_filename': 'js/cms-spec.js'
}
STATICFILES_DIRS.append(COMMON_ROOT / 'test' / 'phantom-jasmine' / 'lib')
......@@ -68,7 +68,7 @@ urlpatterns += (
)
if settings.DEBUG:
if settings.ENABLE_JASMINE:
## Jasmine
urlpatterns = urlpatterns + (url(r'^_jasmine/', include('django_jasmine.urls')),)
......
......@@ -446,16 +446,13 @@ PIPELINE_JS = {
'source_filenames': module_js,
'output_filename': 'js/lms-modules.js',
},
'spec': {
'source_filenames': sorted(rooted_glob(PROJECT_ROOT / 'static/', 'coffee/spec/**/*.coffee')),
'output_filename': 'js/lms-spec.js'
},
'discussion': {
'source_filenames': discussion_js,
'output_filename': 'js/discussion.js'
}
},
}
PIPELINE_DISABLE_WRAPPER = True
# Compile all coffee files in course data directories if they are out of date.
......
"""
This configuration is used for running jasmine tests
"""
from .test import *
from logsettings import get_logger_config
ENABLE_JASMINE = True
DEBUG = True
LOGGING = get_logger_config(ENV_ROOT / "log",
logging_env="dev",
tracking_filename="tracking.log",
dev_env=True,
debug=True)
PIPELINE_JS['js-test-source'] = {
'source_filenames': sum([
pipeline_group['source_filenames']
for pipeline_group
in PIPELINE_JS.values()
], []),
'output_filename': 'js/lms-test-source.js'
}
PIPELINE_JS['spec'] = {
'source_filenames': sorted(rooted_glob(PROJECT_ROOT / 'static/', 'coffee/spec/**/*.coffee')),
'output_filename': 'js/lms-spec.js'
}
STATICFILES_DIRS.append(COMMON_ROOT / 'test' / 'phantom-jasmine' / 'lib')
......@@ -242,7 +242,7 @@ if settings.QUICKEDIT:
urlpatterns += (url(r'^dogfood/(?P<id>[^/]*)$', 'dogfood.views.df_capa_problem'),)
if settings.DEBUG:
if settings.ENABLE_JASMINE:
## Jasmine and admin
urlpatterns=urlpatterns + (url(r'^_jasmine/', include('django_jasmine.urls')),
url(r'^admin/', include(admin.site.urls)),
......
......@@ -43,7 +43,7 @@ end
def django_for_jasmine(system)
django_pid = fork do
exec(*django_admin(system, 'dev', 'runserver', '12345').split(' '))
exec(*django_admin(system, 'jasmine', 'runserver', '12345').split(' '))
end
puts django_pid
jasmine_url = 'http://localhost:12345/_jasmine/'
......
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