Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
dfd369b9
Commit
dfd369b9
authored
Apr 30, 2013
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make ordering of js bundles during jasmine tests consistant
parent
4c97f922
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
12 deletions
+23
-12
cms/envs/common.py
+4
-4
cms/envs/jasmine.py
+1
-1
lms/envs/common.py
+16
-5
lms/envs/jasmine.py
+2
-2
No files found.
cms/envs/common.py
View file @
dfd369b9
...
...
@@ -206,6 +206,8 @@ PIPELINE_CSS = {
},
}
# test_order: Determines the position of this chunk of javascript on
# the jasmine test page
PIPELINE_JS
=
{
'main'
:
{
'source_filenames'
:
sorted
(
...
...
@@ -213,6 +215,7 @@ PIPELINE_JS = {
rooted_glob
(
PROJECT_ROOT
/
'static/'
,
'coffee/src/**/*.js'
)
)
+
[
'js/hesitate.js'
,
'js/base.js'
],
'output_filename'
:
'js/cms-application.js'
,
'test_order'
:
0
},
'module-js'
:
{
'source_filenames'
:
(
...
...
@@ -220,11 +223,8 @@ PIPELINE_JS = {
rooted_glob
(
COMMON_ROOT
/
'static/'
,
'xmodule/modules/js/*.js'
)
),
'output_filename'
:
'js/cms-modules.js'
,
'test_order'
:
1
},
'spec'
:
{
'source_filenames'
:
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static/'
,
'coffee/spec/**/*.js'
)),
'output_filename'
:
'js/cms-spec.js'
}
}
PIPELINE_CSS_COMPRESSOR
=
None
...
...
cms/envs/jasmine.py
View file @
dfd369b9
...
...
@@ -20,7 +20,7 @@ PIPELINE_JS['js-test-source'] = {
'source_filenames'
:
sum
([
pipeline_group
[
'source_filenames'
]
for
group_name
,
pipeline_group
in
PIPELINE_JS
.
items
(
)
in
sorted
(
PIPELINE_JS
.
items
(),
key
=
lambda
item
:
item
[
1
]
.
get
(
'test_order'
,
1e100
)
)
if
group_name
!=
'spec'
],
[]),
'output_filename'
:
'js/cms-test-source.js'
...
...
lms/envs/common.py
View file @
dfd369b9
...
...
@@ -440,6 +440,9 @@ PIPELINE_CSS = {
},
}
# test_order: Determines the position of this chunk of javascript on
# the jasmine test page
PIPELINE_JS
=
{
'application'
:
{
...
...
@@ -455,31 +458,39 @@ PIPELINE_JS = {
'js/sticky_filter.js'
,
'js/query-params.js'
,
],
'output_filename'
:
'js/lms-application.js'
'output_filename'
:
'js/lms-application.js'
,
'test_order'
:
1
,
},
'courseware'
:
{
'source_filenames'
:
courseware_js
,
'output_filename'
:
'js/lms-courseware.js'
'output_filename'
:
'js/lms-courseware.js'
,
'test_order'
:
2
,
},
'main_vendor'
:
{
'source_filenames'
:
main_vendor_js
,
'output_filename'
:
'js/lms-main_vendor.js'
,
'test_order'
:
0
,
},
'module-js'
:
{
'source_filenames'
:
rooted_glob
(
COMMON_ROOT
/
'static'
,
'xmodule/modules/js/*.js'
),
'output_filename'
:
'js/lms-modules.js'
,
'test_order'
:
3
,
},
'discussion'
:
{
'source_filenames'
:
discussion_js
,
'output_filename'
:
'js/discussion.js'
'output_filename'
:
'js/discussion.js'
,
'test_order'
:
4
,
},
'staff_grading'
:
{
'source_filenames'
:
staff_grading_js
,
'output_filename'
:
'js/staff_grading.js'
'output_filename'
:
'js/staff_grading.js'
,
'test_order'
:
5
,
},
'open_ended'
:
{
'source_filenames'
:
open_ended_js
,
'output_filename'
:
'js/open_ended.js'
'output_filename'
:
'js/open_ended.js'
,
'test_order'
:
6
,
}
}
...
...
lms/envs/jasmine.py
View file @
dfd369b9
...
...
@@ -20,14 +20,14 @@ PIPELINE_JS['js-test-source'] = {
'source_filenames'
:
sum
([
pipeline_group
[
'source_filenames'
]
for
group_name
,
pipeline_group
in
PIPELINE_JS
.
items
(
)
in
sorted
(
PIPELINE_JS
.
items
(),
key
=
lambda
item
:
item
[
1
]
.
get
(
'test_order'
,
1e100
)
)
if
group_name
!=
'spec'
],
[]),
'output_filename'
:
'js/lms-test-source.js'
}
PIPELINE_JS
[
'spec'
]
=
{
'source_filenames'
:
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static/'
,
'coffee/spec/**/*.
coffee
'
)),
'source_filenames'
:
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static/'
,
'coffee/spec/**/*.
js
'
)),
'output_filename'
:
'js/lms-spec.js'
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment