move compiled coffeescript specs to specs/javascipts/compiled
test plan: - run "rm -rf spec/javascripts; git checkout HEAD -- specs/javascripts" to reset your compiled javascript tests. - run rake js:generate_runner - JS tests should pass - # of JS tests should be the same as they are on master before this commit Change-Id: I936aec8a8a5e2cc739e09757c622f300e99c72ef Reviewed-on: https://gerrit.instructure.com/25615 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Jon Jensen <jon@instructure.com> Product-Review: Bryan Madsen <bryan@instructure.com> QA-Review: Bryan Madsen <bryan@instructure.com>
This commit is contained in:
parent
c2314efce2
commit
3e7d92e769
|
@ -31,7 +31,8 @@
|
|||
/public/optimized/
|
||||
/public/stylesheets/compiled/
|
||||
/RAILS3
|
||||
/spec/javascripts/
|
||||
/spec/javascripts/runner.html
|
||||
/spec/javascripts/compiled/
|
||||
/tmp/
|
||||
/vendor/plugins/rails_upgrade
|
||||
|
||||
|
@ -39,7 +40,7 @@
|
|||
/app/coffeescripts/plugins/
|
||||
/app/stylesheets/plugins/
|
||||
/app/views/jst/plugins/
|
||||
/doc/plugins/
|
||||
/public/javascripts/plugins/
|
||||
/public/plugins/
|
||||
/spec/coffeescripts/plugins/
|
||||
/spec/plugins/
|
||||
|
|
|
@ -64,7 +64,7 @@ namespace :js do
|
|||
|
||||
def coffee_destination(dir_or_file)
|
||||
dir_or_file.sub('app/coffeescripts', 'public/javascripts/compiled').
|
||||
sub('spec/coffeescripts', 'spec/javascripts').
|
||||
sub('spec/coffeescripts', 'spec/javascripts/compiled').
|
||||
sub(%r{/javascripts/compiled/plugins/([^/]+)(/|$)}, '/plugins/\\1/javascripts/compiled\\2')
|
||||
end
|
||||
|
||||
|
@ -94,10 +94,11 @@ namespace :js do
|
|||
# clear out all the files in case there are any old compiled versions of
|
||||
# files that don't map to any source file anymore
|
||||
paths_to_remove = [
|
||||
'public/javascripts/compiled',
|
||||
'public/javascripts/jst',
|
||||
'public/plugins/*/javascripts/{compiled,javascripts/jst}'
|
||||
] + Dir.glob('spec/javascripts/**/*Spec.js')
|
||||
'public/javascripts/{compiled,jst}',
|
||||
'public/plugins/*/javascripts/{compiled,jst}',
|
||||
'spec/javascripts/compiled',
|
||||
'spec/plugins/*/javascripts/compiled'
|
||||
]
|
||||
FileUtils.rm_rf(paths_to_remove)
|
||||
|
||||
threads = []
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
require [
|
||||
'underscore'
|
||||
'compiled/views/calendar/AgendaView'
|
||||
'spec/javascripts/helpers/ajax_mocks/api/v1/calendarEvents'
|
||||
'spec/javascripts/helpers/ajax_mocks/api/v1/calendarAssignments'
|
||||
'helpers/ajax_mocks/api/v1/calendarEvents'
|
||||
'helpers/ajax_mocks/api/v1/calendarAssignments'
|
||||
], (_, AgendaView, eventResponse, assignmentResponse) ->
|
||||
|
||||
loadEventPage = (server) ->
|
||||
|
|
|
@ -24,7 +24,7 @@ define [
|
|||
'compiled/collections/SyllabusCalendarEventsCollection'
|
||||
'compiled/collections/SyllabusAppointmentGroupsCollection'
|
||||
'compiled/views/courses/SyllabusView'
|
||||
'spec/javascripts/views/SyllabusViewPrerendered'
|
||||
'spec/javascripts/compiled/views/SyllabusViewPrerendered'
|
||||
'helpers/fakeENV'
|
||||
'helpers/jquery.simulate'
|
||||
], ($, _, SyllabusBehaviors, SyllabusCollection, SyllabusCalendarEventsCollection, SyllabusAppointmentGroupsCollection, SyllabusView, SyllabusViewPrerendered) ->
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
},
|
||||
{
|
||||
name: 'helpers',
|
||||
location: '../../spec/javascripts/helpers',
|
||||
location: '../../spec/javascripts/compiled/helpers',
|
||||
main: 'helpers',
|
||||
lib: './'
|
||||
},
|
||||
|
@ -103,7 +103,12 @@
|
|||
// loading, execute it.
|
||||
var specsLoading = true;
|
||||
var onSpecsLoaded = null;
|
||||
require(<%= Dir["spec/javascripts/#{matcher}"].map{ |file| file.sub(/\.js$/, '') }.inspect %>, function() {
|
||||
require(<%=
|
||||
Dir[
|
||||
"spec/javascripts/compiled/#{matcher}",
|
||||
"spec/plugins/*/javascripts/compiled/#{matcher}"
|
||||
].map{ |file| file.sub(/\.js$/, '') }.inspect
|
||||
%>, function() {
|
||||
specsLoading = false;
|
||||
if (onSpecsLoaded) onSpecsLoaded();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue