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
2839a42e
Commit
2839a42e
authored
May 04, 2016
by
Usman Khalid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved jasmine addons to common/js/spec_helpers.
parent
84412ef8
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
59 additions
and
58 deletions
+59
-58
cms/static/coffee/spec/main.coffee
+12
-5
cms/static/coffee/spec/main_spec.coffee
+1
-2
cms/static/coffee/spec/main_squire.coffee
+12
-5
cms/static/coffee/spec/views/textbook_spec.coffee
+1
-1
cms/static/js/spec/views/group_configuration_spec.js
+1
-1
cms/static/karma_cms.conf.js
+0
-7
cms/static/karma_cms_squire.conf.js
+0
-4
common/lib/xmodule/xmodule/js/karma_xmodule.conf.js
+2
-2
common/static/common/js/spec/components/feedback_spec.js
+1
-1
common/static/common/js/spec/components/view_utils_spec.js
+1
-1
common/static/common/js/spec/main_requirejs.js
+13
-10
common/static/common/js/spec_helpers/jasmine-extensions.js
+0
-0
common/static/common/js/spec_helpers/jasmine-stealth.js
+0
-0
common/static/common/js/spec_helpers/jasmine-waituntil.js
+0
-0
common/static/karma_common.conf.js
+2
-2
common/static/karma_common_requirejs.conf.js
+0
-4
lms/static/js/spec/main.js
+12
-10
lms/static/karma_lms.conf.js
+0
-2
lms/static/karma_lms_coffee.conf.js
+1
-1
No files found.
cms/static/coffee/spec/main.coffee
View file @
2839a42e
...
...
@@ -44,8 +44,6 @@ requirejs.config({
"sinon"
:
"xmodule_js/common_static/js/vendor/sinon-1.17.0"
,
"squire"
:
"xmodule_js/common_static/js/vendor/Squire"
,
"jasmine-imagediff"
:
"xmodule_js/common_static/js/vendor/jasmine-imagediff"
,
"jasmine-stealth"
:
"xmodule_js/common_static/js/libs/jasmine-stealth"
,
"jasmine-waituntil"
:
"xmodule_js/common_static/js/libs/jasmine-waituntil"
,
"draggabilly"
:
"xmodule_js/common_static/js/vendor/draggabilly"
,
"domReady"
:
"xmodule_js/common_static/js/vendor/domReady"
,
"URI"
:
"xmodule_js/common_static/js/vendor/URI.min"
,
...
...
@@ -180,10 +178,13 @@ requirejs.config({
exports
:
"sinon"
},
"jasmine-imagediff"
:
{},
"jasmine-stealth"
:
{
"common/js/spec_helpers/jasmine-extensions"
:
{
deps
:
[
"jquery"
]
},
"common/js/spec_helpers/jasmine-stealth"
:
{
deps
:
[
"underscore"
,
"underscore.string"
]
},
"jasmine-waituntil"
:
{
"
common/js/spec_helpers/
jasmine-waituntil"
:
{
deps
:
[
"jquery"
]
},
"xblock/core"
:
{
...
...
@@ -283,8 +284,14 @@ while i < testFiles.length
testFiles
[
i
]
=
'/base/'
+
testFiles
[
i
]
+
'.js'
i
++
specHelpers
=
[
'common/js/spec_helpers/jasmine-extensions'
,
'common/js/spec_helpers/jasmine-stealth'
,
'common/js/spec_helpers/jasmine-waituntil'
]
# Jasmine has a global stack for creating a tree of specs. We need to load
# spec files one by one, otherwise some end up getting nested under others.
requireSerial
testFiles
,
->
requireSerial
specHelpers
.
concat
(
testFiles
)
,
->
# start test run, once Require.js is done
window
.
__karma__
.
start
()
cms/static/coffee/spec/main_spec.coffee
View file @
2839a42e
require
[
"jquery"
,
"backbone"
,
"coffee/src/main"
,
"common/js/spec_helpers/ajax_helpers"
,
"jasmine-stealth"
,
"jasmine-waituntil"
,
"jquery.cookie"
],
require
[
"jquery"
,
"backbone"
,
"coffee/src/main"
,
"common/js/spec_helpers/ajax_helpers"
,
"jquery.cookie"
],
(
$
,
Backbone
,
main
,
AjaxHelpers
)
->
describe
"CMS"
,
->
it
"should initialize URL"
,
->
...
...
cms/static/coffee/spec/main_squire.coffee
View file @
2839a42e
...
...
@@ -41,8 +41,6 @@ requirejs.config({
"modernizr"
:
"xmodule_js/common_static/edx-pattern-library/js/modernizr-custom"
,
"afontgarde"
:
"xmodule_js/common_static/edx-pattern-library/js/afontgarde"
,
"edxicons"
:
"xmodule_js/common_static/edx-pattern-library/js/edx-icons"
,
"jasmine-stealth"
:
"xmodule_js/common_static/js/libs/jasmine-stealth"
,
"jasmine-waituntil"
:
"xmodule_js/common_static/js/libs/jasmine-waituntil"
,
"draggabilly"
:
"xmodule_js/common_static/js/vendor/draggabilly"
,
"domReady"
:
"xmodule_js/common_static/js/vendor/domReady"
,
"URI"
:
"xmodule_js/common_static/js/vendor/URI.min"
,
...
...
@@ -160,10 +158,13 @@ requirejs.config({
"sinon"
:
{
exports
:
"sinon"
},
"jasmine-stealth"
:
{
"common/js/spec_helpers/jasmine-extensions"
:
{
deps
:
[
"jquery"
]
},
"common/js/spec_helpers/jasmine-stealth"
:
{
deps
:
[
"underscore"
,
"underscore.string"
]
},
"jasmine-waituntil"
:
{
"
common/js/spec_helpers/
jasmine-waituntil"
:
{
deps
:
[
"jquery"
]
},
"xblock/core"
:
{
...
...
@@ -203,8 +204,14 @@ while i < testFiles.length
testFiles
[
i
]
=
'/base/'
+
testFiles
[
i
]
+
'.js'
i
++
specHelpers
=
[
'common/js/spec_helpers/jasmine-extensions'
,
'common/js/spec_helpers/jasmine-stealth'
,
'common/js/spec_helpers/jasmine-waituntil'
]
# Jasmine has a global stack for creating a tree of specs. We need to load
# spec files one by one, otherwise some end up getting nested under others.
requireSerial
testFiles
,
->
requireSerial
specHelpers
.
concat
(
testFiles
)
,
->
# start test run, once Require.js is done
window
.
__karma__
.
start
()
cms/static/coffee/spec/views/textbook_spec.coffee
View file @
2839a42e
...
...
@@ -2,7 +2,7 @@ define ["js/models/textbook", "js/models/chapter", "js/collections/chapter", "js
"js/collections/textbook"
,
"js/views/show_textbook"
,
"js/views/edit_textbook"
,
"js/views/list_textbooks"
,
"js/views/edit_chapter"
,
"common/js/components/views/feedback_prompt"
,
"common/js/components/views/feedback_notification"
,
"common/js/components/utils/view_utils"
,
"common/js/spec_helpers/ajax_helpers"
,
"js/spec_helpers/modal_helpers"
,
"jasmine-stealth"
],
"js/spec_helpers/modal_helpers"
],
(
Textbook
,
Chapter
,
ChapterSet
,
Course
,
TextbookSet
,
ShowTextbook
,
EditTextbook
,
ListTextbooks
,
EditChapter
,
Prompt
,
Notification
,
ViewUtils
,
AjaxHelpers
,
modal_helpers
)
->
describe
"ShowTextbook"
,
->
...
...
cms/static/js/spec/views/group_configuration_spec.js
View file @
2839a42e
...
...
@@ -5,7 +5,7 @@ define([
'js/views/group_configuration_item'
,
'js/views/experiment_group_edit'
,
'js/views/content_group_list'
,
'js/views/content_group_details'
,
'js/views/content_group_editor'
,
'js/views/content_group_item'
,
'common/js/components/views/feedback_notification'
,
'common/js/spec_helpers/ajax_helpers'
,
'common/js/spec_helpers/template_helpers'
,
'common/js/spec_helpers/view_helpers'
,
'jasmine-stealth'
'common/js/spec_helpers/view_helpers'
],
function
(
_
,
Course
,
GroupConfigurationModel
,
GroupModel
,
GroupConfigurationCollection
,
GroupCollection
,
GroupConfigurationDetailsView
,
GroupConfigurationsListView
,
GroupConfigurationEditorView
,
...
...
cms/static/karma_cms.conf.js
View file @
2839a42e
...
...
@@ -8,10 +8,6 @@ var path = require('path');
var
configModule
=
require
(
path
.
join
(
__dirname
,
'../../common/static/common/js/karma.common.conf.js'
));
var
files
=
{
libraryFilesToInclude
:
[
{
pattern
:
'xmodule_js/common_static/js/libs/jasmine-extensions.js'
,
included
:
true
}
],
libraryFiles
:
[
{
pattern
:
'edx-pattern-library/js/**/*.js'
},
{
pattern
:
'edx-ui-toolkit/js/**/*.js'
},
...
...
@@ -19,9 +15,6 @@ var files = {
{
pattern
:
'xmodule_js/common_static/common/js/vendor/**/*.js'
},
{
pattern
:
'xmodule_js/common_static/js/**/*.js'
},
{
pattern
:
'xmodule_js/src/xmodule.js'
},
{
pattern
:
'xmodule_js/common_static/js/libs/jasmine-stealth.js'
},
{
pattern
:
'xmodule_js/common_static/js/libs/jasmine-waituntil.js'
}
],
sourceFiles
:
[
...
...
cms/static/karma_cms_squire.conf.js
View file @
2839a42e
...
...
@@ -8,10 +8,6 @@ var path = require('path');
var
configModule
=
require
(
path
.
join
(
__dirname
,
'../../common/static/common/js/karma.common.conf.js'
));
var
files
=
{
libraryFilesToInclude
:
[
{
pattern
:
'xmodule_js/common_static/js/libs/jasmine-extensions.js'
,
included
:
true
}
],
libraryFiles
:
[
{
pattern
:
'edx-pattern-library/js/**/*.js'
},
{
pattern
:
'edx-ui-toolkit/js/**/*.js'
},
...
...
common/lib/xmodule/xmodule/js/karma_xmodule.conf.js
View file @
2839a42e
...
...
@@ -39,8 +39,8 @@ var files = {
{
pattern
:
'src/word_cloud/d3.min.js'
,
included
:
true
},
{
pattern
:
'common_static/js/vendor/jasmine-imagediff.js'
,
included
:
true
},
{
pattern
:
'common_static/
js/lib
s/jasmine-waituntil.js'
,
included
:
true
},
{
pattern
:
'common_static/
js/lib
s/jasmine-extensions.js'
,
included
:
true
},
{
pattern
:
'common_static/
common/js/spec_helper
s/jasmine-waituntil.js'
,
included
:
true
},
{
pattern
:
'common_static/
common/js/spec_helper
s/jasmine-extensions.js'
,
included
:
true
},
{
pattern
:
'common_static/js/vendor/sinon-1.17.0.js'
,
included
:
true
}
],
...
...
common/static/common/js/spec/components/feedback_spec.js
View file @
2839a42e
...
...
@@ -3,7 +3,7 @@
'use strict'
;
define
([
"jquery"
,
"common/js/components/views/feedback"
,
"common/js/components/views/feedback_notification"
,
"common/js/components/views/feedback_alert"
,
"common/js/components/views/feedback_prompt"
,
'common/js/spec_helpers/view_helpers'
,
"sinon"
,
"jquery.simulate"
,
"jasmine-waituntil"
],
'common/js/spec_helpers/view_helpers'
,
"sinon"
,
"jquery.simulate"
],
function
(
$
,
SystemFeedback
,
NotificationView
,
AlertView
,
PromptView
,
ViewHelpers
,
sinon
)
{
var
tpl
;
tpl
=
readFixtures
(
'common/templates/components/system-feedback.underscore'
);
...
...
common/static/common/js/spec/components/view_utils_spec.js
View file @
2839a42e
;(
function
(
define
)
{
'use strict'
;
define
([
"jquery"
,
"underscore"
,
"backbone"
,
"common/js/components/utils/view_utils"
,
"common/js/spec_helpers/view_helpers"
,
"jasmine-stealth"
],
"common/js/spec_helpers/view_helpers"
],
function
(
$
,
_
,
Backbone
,
ViewUtils
,
ViewHelpers
)
{
describe
(
"ViewUtils"
,
function
()
{
...
...
common/static/common/js/spec/main_requirejs.js
View file @
2839a42e
...
...
@@ -34,10 +34,7 @@
'modernizr'
:
'edx-pattern-library/js/modernizr-custom'
,
'afontgarde'
:
'edx-pattern-library/js/afontgarde'
,
'edxicons'
:
'edx-pattern-library/js/edx-icons'
,
'draggabilly'
:
'js/vendor/draggabilly'
,
'jasmine-stealth'
:
'js/libs/jasmine-stealth'
,
'jasmine-waituntil'
:
'js/libs/jasmine-waituntil'
,
'jasmine-extensions'
:
'js/libs/jasmine-extensions'
'draggabilly'
:
'js/vendor/draggabilly'
},
shim
:
{
'gettext'
:
{
...
...
@@ -140,13 +137,13 @@
exports
:
'URI'
},
'jasmine-imagediff'
:
{},
'jasmine-stealth'
:
{
deps
:
[
'underscore'
,
'underscore.string'
]
},
'jasmine-waituntil'
:
{
'common/js/spec_helpers/jasmine-extensions'
:
{
deps
:
[
'jquery'
]
},
'jasmine-extensions'
:
{
'common/js/spec_helpers/jasmine-stealth'
:
{
deps
:
[
'underscore'
,
'underscore.string'
]
},
'common/js/spec_helpers/jasmine-waituntil'
:
{
deps
:
[
'jquery'
]
},
"sinon"
:
{
...
...
@@ -178,7 +175,13 @@
testFiles
[
i
]
=
'/base/'
+
testFiles
[
i
];
}
window
.
requireSerial
(
testFiles
,
function
()
{
var
specHelpers
=
[
'common/js/spec_helpers/jasmine-extensions'
,
'common/js/spec_helpers/jasmine-stealth'
,
'common/js/spec_helpers/jasmine-waituntil'
];
window
.
requireSerial
(
specHelpers
.
concat
(
testFiles
),
function
()
{
// start test run, once Require.js is done
window
.
__karma__
.
start
();
});
...
...
common/static/
js/lib
s/jasmine-extensions.js
→
common/static/
common/js/spec_helper
s/jasmine-extensions.js
View file @
2839a42e
File moved
common/static/
js/lib
s/jasmine-stealth.js
→
common/static/
common/js/spec_helper
s/jasmine-stealth.js
View file @
2839a42e
File moved
common/static/
js/lib
s/jasmine-waituntil.js
→
common/static/
common/js/spec_helper
s/jasmine-waituntil.js
View file @
2839a42e
File moved
common/static/karma_common.conf.js
View file @
2839a42e
...
...
@@ -31,8 +31,8 @@ var files = {
{
pattern
:
'edx-pattern-library/js/edx-icons.js'
,
included
:
true
},
{
pattern
:
'js/vendor/jasmine-imagediff.js'
,
included
:
true
},
{
pattern
:
'
js/libs/jasmine-waituntil
.js'
,
included
:
true
},
{
pattern
:
'
js/libs/jasmine-extensions
.js'
,
included
:
true
}
{
pattern
:
'
common/js/spec_helpers/jasmine-extensions
.js'
,
included
:
true
},
{
pattern
:
'
common/js/spec_helpers/jasmine-waituntil
.js'
,
included
:
true
}
],
libraryFiles
:
[
...
...
common/static/karma_common_requirejs.conf.js
View file @
2839a42e
...
...
@@ -9,10 +9,6 @@ var path = require('path');
var
configModule
=
require
(
path
.
join
(
__dirname
,
'../../common/static/common/js/karma.common.conf.js'
));
var
files
=
{
libraryFilesToInclude
:
[
{
pattern
:
'js/libs/jasmine-extensions.js'
,
included
:
true
}
],
libraryFiles
:
[
{
pattern
:
'coffee/src/**/*.js'
},
{
pattern
:
'common/js/spec_helpers/**/*.js'
},
...
...
lms/static/js/spec/main.js
View file @
2839a42e
...
...
@@ -46,9 +46,6 @@
'sinon'
:
'xmodule_js/common_static/js/vendor/sinon-1.17.0'
,
'squire'
:
'xmodule_js/common_static/js/vendor/Squire'
,
'jasmine-imagediff'
:
'xmodule_js/common_static/js/vendor/jasmine-imagediff'
,
'jasmine-stealth'
:
'xmodule_js/common_static/js/vendor/jasmine-stealth'
,
'jasmine-waituntil'
:
'xmodule_js/common_static/js/libs/jasmine-waituntil'
,
'jasmine-extensions'
:
'xmodule_js/common_static/js/libs/jasmine-extensions'
,
'domReady'
:
'xmodule_js/common_static/js/vendor/domReady'
,
'mathjax'
:
'//cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_SVG&delayStartupUntil=configured'
,
// jshint ignore:line
'youtube'
:
'//www.youtube.com/player_api?noext'
,
...
...
@@ -260,13 +257,13 @@
exports
:
'sinon'
},
'jasmine-imagediff'
:
{},
'jasmine-stealth'
:
{
deps
:
[
'underscore'
,
'underscore.string'
]
},
'jasmine-waituntil'
:
{
'common/js/spec_helpers/jasmine-extensions'
:
{
deps
:
[
'jquery'
]
},
'jasmine-extensions'
:
{
'common/js/spec_helpers/jasmine-stealth'
:
{
deps
:
[
'underscore'
,
'underscore.string'
]
},
'common/js/spec_helpers/jasmine-waituntil'
:
{
deps
:
[
'jquery'
]
},
'xblock/core'
:
{
...
...
@@ -777,11 +774,16 @@
testFiles
[
i
]
=
'/base/'
+
testFiles
[
i
];
}
var
specHelpers
=
[
'common/js/spec_helpers/jasmine-extensions'
,
'common/js/spec_helpers/jasmine-stealth'
,
'common/js/spec_helpers/jasmine-waituntil'
];
// Jasmine has a global stack for creating a tree of specs. We need to load
// spec files one by one, otherwise some end up getting nested under others.
window
.
requireSerial
(
testFiles
,
function
()
{
window
.
requireSerial
(
specHelpers
.
concat
(
testFiles
)
,
function
()
{
// start test run, once Require.js is done
window
.
__karma__
.
start
();
});
}).
call
(
this
,
requirejs
,
define
);
lms/static/karma_lms.conf.js
View file @
2839a42e
...
...
@@ -12,8 +12,6 @@ var files = {
{
pattern
:
'xmodule_js/common_static/js/vendor/jquery.event.drag-2.2.js'
,
included
:
true
},
{
pattern
:
'xmodule_js/common_static/js/vendor/slick.core.js'
,
included
:
true
},
{
pattern
:
'xmodule_js/common_static/js/vendor/slick.grid.js'
,
included
:
true
},
{
pattern
:
'xmodule_js/common_static/js/libs/jasmine-extensions.js'
,
included
:
true
},
{
pattern
:
'xmodule_js/common_static/js/libs/jasmine-waituntil.js'
,
included
:
true
}
],
libraryFiles
:
[
...
...
lms/static/karma_lms_coffee.conf.js
View file @
2839a42e
...
...
@@ -36,7 +36,7 @@ var files = {
{
pattern
:
'xmodule_js/src/xmodule.js'
,
included
:
true
},
{
pattern
:
'xmodule_js/common_static/js/vendor/jasmine-imagediff.js'
,
included
:
true
},
{
pattern
:
'
xmodule_js/common_static/js/lib
s/jasmine-extensions.js'
,
included
:
true
}
{
pattern
:
'
common/js/spec_helper
s/jasmine-extensions.js'
,
included
:
true
}
],
libraryFiles
:
[
...
...
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