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 += ( ...@@ -68,7 +68,7 @@ urlpatterns += (
) )
if settings.DEBUG: if settings.ENABLE_JASMINE:
## Jasmine ## Jasmine
urlpatterns = urlpatterns + (url(r'^_jasmine/', include('django_jasmine.urls')),) urlpatterns = urlpatterns + (url(r'^_jasmine/', include('django_jasmine.urls')),)
......
...@@ -446,16 +446,13 @@ PIPELINE_JS = { ...@@ -446,16 +446,13 @@ PIPELINE_JS = {
'source_filenames': module_js, 'source_filenames': module_js,
'output_filename': 'js/lms-modules.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': { 'discussion': {
'source_filenames': discussion_js, 'source_filenames': discussion_js,
'output_filename': 'js/discussion.js' 'output_filename': 'js/discussion.js'
} },
} }
PIPELINE_DISABLE_WRAPPER = True PIPELINE_DISABLE_WRAPPER = True
# Compile all coffee files in course data directories if they are out of date. # 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: ...@@ -242,7 +242,7 @@ if settings.QUICKEDIT:
urlpatterns += (url(r'^dogfood/(?P<id>[^/]*)$', 'dogfood.views.df_capa_problem'),) urlpatterns += (url(r'^dogfood/(?P<id>[^/]*)$', 'dogfood.views.df_capa_problem'),)
if settings.DEBUG: if settings.ENABLE_JASMINE:
## Jasmine and admin ## Jasmine and admin
urlpatterns=urlpatterns + (url(r'^_jasmine/', include('django_jasmine.urls')), urlpatterns=urlpatterns + (url(r'^_jasmine/', include('django_jasmine.urls')),
url(r'^admin/', include(admin.site.urls)), url(r'^admin/', include(admin.site.urls)),
......
...@@ -43,7 +43,7 @@ end ...@@ -43,7 +43,7 @@ end
def django_for_jasmine(system) def django_for_jasmine(system)
django_pid = fork do django_pid = fork do
exec(*django_admin(system, 'dev', 'runserver', '12345').split(' ')) exec(*django_admin(system, 'jasmine', 'runserver', '12345').split(' '))
end end
puts django_pid puts django_pid
jasmine_url = 'http://localhost:12345/_jasmine/' 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