s/module/QUnit.module/ in spec/coffeescripts

closes:  CNVS-34769

this is the result of running this find & replace
(^\s+)(module)(\s[\"\']|\()
\1QUnit.module\3

s/module/qunit.module/ in spec/coffeescripts

and the result of running this find & replace
(^\s+)(module)(\s*\()
\1qunit.module\3

in canvas-lms/spec/javascripts/

test plan:
* automated js specs should pass in requireJS and webpack 

Change-Id: I65188cce4bd5e6e5caa199dc108393a93f400a67
Reviewed-on: https://gerrit.instructure.com/101100
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
This commit is contained in:
Ryan Shaw 2017-02-04 15:07:51 -07:00
parent 3eb03930e1
commit 6ca8acffb8
566 changed files with 1003 additions and 999 deletions

View File

@ -11,7 +11,7 @@ const lineThatStartsWithTheWordModule = /^\s+(return )?module\(/gm
module.exports = function(source) {
this.cacheable()
// replace "module(..." calls with "qunit.module"
return source.replace(lineThatStartsWithTheWordModule, match =>
match.replace('module', 'qunit.module')
return source.replace(lineThatStartsWithTheWordModule, match =>
match.replace('module', 'QUnit.module')
)
}

View File

@ -9,7 +9,7 @@ define [
element.innerHTML = html
fixtureNode.appendChild(element)
module "AuthenticationProviders.changedAuthType",
QUnit.module "AuthenticationProviders.changedAuthType",
setup: ->
fixtureNode = document.getElementById("fixtures")

View File

@ -1,7 +1,7 @@
define ['collaborations'], (collaborations) ->
oldAjaxJSON = null
module "Collaborations",
QUnit.module "Collaborations",
setup: ->
oldAjaxJSON = $.ajaxJSON
link= $("<a></a>")

View File

@ -3,7 +3,7 @@ define [
'compiled/widget/ComboBox'
'helpers/simulateClick'
], ($, ComboBox, simulateClick)->
module 'ComboBox',
QUnit.module 'ComboBox',
setup: ->
teardown: ->

View File

@ -3,7 +3,7 @@ define [
'compiled/widget/CustomList'
'helpers/jquery.simulate'
], ($,CustomList)->
module 'CustomList',
QUnit.module 'CustomList',
setup: ->
@el = $("""<div>
<style>

View File

@ -1,5 +1,5 @@
define ['quiz_formula_solution'], (QuizFormulaSolution)->
module "QuizForumlaSolution",
QUnit.module "QuizForumlaSolution",
setup: ->
teardown: ->
@ -37,7 +37,7 @@ define ['quiz_formula_solution'], (QuizFormulaSolution)->
solution = new QuizFormulaSolution(undefined)
ok(isNaN(solution.rawValue()))
module "QuizForumlaSolution#isValid",
QUnit.module "QuizForumlaSolution#isValid",
setup: ->
teardown: ->

View File

@ -18,7 +18,7 @@ define ['quiz_rubric', 'jquery'], (QuizRubric, $)->
"DUMMY CONTENT FOR RUBRIC FORM" +
"</div>"
module "QuizRubric",
QUnit.module "QuizRubric",
setup: ->
$("#fixtures").append(defaultRubric)

View File

@ -13,7 +13,7 @@ define ['compiled/Reference'], (Reference) ->
fixtures = null
storedStupidAwesomeFunction = null
module "Reference",
QUnit.module "Reference",
setup: ->
# DO put any necessary DOM artifacts into #fixtures, not "body"
fixtures = document.getElementById('fixtures')

View File

@ -7,7 +7,7 @@ define [
fixtures = null
clickEvent = {}
module "SelectContentDialog",
QUnit.module "SelectContentDialog",
setup: ->
fixtures = document.getElementById('fixtures')
fixtures.innerHTML = '<div id="context_external_tools_select">

View File

@ -9,7 +9,7 @@ define [
list = null
textarea = null
module "Tinymce Commands -> removing an editor",
QUnit.module "Tinymce Commands -> removing an editor",
setup: ->
testbed = $("<div id='command-testbed'></div>")
$("#fixtures").append(testbed)
@ -41,7 +41,7 @@ define [
EditorCommands.remove(textarea, list)
equal(undefined, list._editor_boxes['43'])
module "Tinymce Commands -> inserting content with tables",
QUnit.module "Tinymce Commands -> inserting content with tables",
setup: ->
testbed = $("<div id='command-testbed'></div>")
$("#fixtures").append(testbed)

View File

@ -14,7 +14,7 @@ define [
"instructure_links,unlink,instructure_image,instructure_equation"
toolbar3 = "ltr,rtl,fontsizeselect,formatselect"
module "EditorConfig",
QUnit.module "EditorConfig",
setup: ->
INST = {}
INST.editorButtons = []
@ -78,7 +78,7 @@ define [
schema = config.defaultConfig()
equal(schema.browser_spellcheck, true)
module "Tinymce Config Integration",
QUnit.module "Tinymce Config Integration",
setup: ->
$("body").append("<textarea id=42></textarea>")

View File

@ -1,6 +1,6 @@
define ['tinymce.editor_box_list'], (EditorBoxList)->
list = null
module "EditorBoxList",
QUnit.module "EditorBoxList",
setup: ->
$("#fixtures").append("<textarea id=42></textarea>")
list = new EditorBoxList()

View File

@ -1,5 +1,5 @@
define ['tinymce.editor_box_utils'], (Utils)->
module "Tinymce Utils #cleanUrl", ->
QUnit.module "Tinymce Utils #cleanUrl", ->
setup: ->
teardown: ->

View File

@ -2,7 +2,7 @@ define ['compiled/gradebook/Turnitin'], (Turnitin) ->
submissionWithReport = null
module "Turnitin",
QUnit.module "Turnitin",
setup: ->
submissionWithReport =
'id': '7'

View File

@ -56,7 +56,7 @@ define [
]
}
module "list",
QUnit.module "list",
setup: ->
@server = sinon.fakeServer.create()
@fakeHeaders = '<http://some_url?page=1&per_page=10>; rel="last"'

View File

@ -66,7 +66,7 @@ define [
]
}
module "list",
QUnit.module "list",
setup: ->
@server = sinon.fakeServer.create()
@fakeHeaders =
@ -168,7 +168,7 @@ define [
}
}
module "create",
QUnit.module "create",
setup: ->
fakeENV.setup()
ENV.GRADING_PERIOD_SETS_URL = 'api/grading_period_sets'
@ -231,7 +231,7 @@ define [
}
}
module "update",
QUnit.module "update",
setup: ->
fakeENV.setup()
ENV.GRADING_PERIOD_SET_UPDATE_URL = 'api/grading_period_sets/%7B%7B%20id%20%7D%7D'

View File

@ -64,7 +64,7 @@ define [
]
}
module "batchUpdate",
QUnit.module "batchUpdate",
setup: ->
fakeENV.setup()
ENV.GRADING_PERIODS_UPDATE_URL = 'api/{{ set_id }}/batch_update'
@ -110,7 +110,7 @@ define [
equal error, "FAIL"
start()
module "deserializePeriods"
QUnit.module "deserializePeriods"
test "returns an empty array if passed undefined", ->
propEqual api.deserializePeriods(undefined), []

View File

@ -1,6 +1,6 @@
define ['compiled/arr/walk'], (walk) ->
module 'arr/walk'
QUnit.module 'arr/walk'
test 'walks a tree object', ->
arr = [{name: 'a'}, {name: 'b'}]

View File

@ -1,6 +1,6 @@
define ['compiled/backbone-ext/Model'], (Model) ->
module 'dateAttributes'
QUnit.module 'dateAttributes'
test 'converts date strings to date objects', ->

View File

@ -1,6 +1,6 @@
define ['Backbone'], ({Model}) ->
module 'Backbone.Model',
QUnit.module 'Backbone.Model',
setup: -> @model = new Model
test '@mixin', ->

View File

@ -3,7 +3,7 @@ define [
'compiled/util/mixin'
'helpers/fakeENV'
], (Backbone, mixing, fakeENV) ->
module 'View',
QUnit.module 'View',
setup: ->
fakeENV.setup()
teardown: ->

View File

@ -7,7 +7,7 @@ define [
'jquery'
], (SyllabusBehaviors, Sidebar, editorUtils, fixtures, RichContentEditor, $) ->
module 'SyllabusBehaviors.bindToEditSyllabus',
QUnit.module 'SyllabusBehaviors.bindToEditSyllabus',
setup: ->
editorUtils.resetRCE()
fixtures.setup()

View File

@ -20,7 +20,7 @@ define [
</div>
""")
module 'autocomplete',
QUnit.module 'autocomplete',
teardown: ->
$el.remove()
$('#fixtures').empty()

View File

@ -3,7 +3,7 @@ define [
'compiled/behaviors/elementToggler'
], ($, elementToggler)->
module 'elementToggler',
QUnit.module 'elementToggler',
teardown: ->
el?.remove() for el in [@$trigger, @$otherTrigger, @$target, @$target1, @$target2]
$("#fixtures").empty()

View File

@ -6,7 +6,7 @@ define [
oldTrackEvent = null
module 'inlineMediaComment',
QUnit.module 'inlineMediaComment',
setup: ->
oldTrackEvent = $.trackEvent
@fixtures = document.getElementById('fixtures')

View File

@ -2,7 +2,7 @@ define [
'compiled/behaviors/tooltip'
], (tooltip) ->
module 'tooltip position selection',
QUnit.module 'tooltip position selection',
setup: ->
teardown: ->

View File

@ -24,7 +24,7 @@ define [
server.requests[requestIndex+1].respond 200,
{ 'Content-Type': 'application/json' }, assignments
module "AgendaView",
QUnit.module "AgendaView",
setup: ->
@container = $('<div />', id: 'agenda-wrapper').appendTo('#fixtures')
@contexts = [{"asset_string":"user_1"}, {"asset_string":"course_2"}, {"asset_string":"group_3"}]

View File

@ -51,7 +51,7 @@ define [
[{asset_string: 'course_1', id: 1, can_create_calendar_events: can_edit}]
]
module "CalendarEventFilter",
QUnit.module "CalendarEventFilter",
setup: ->
teardown: ->

View File

@ -8,7 +8,7 @@ define [
'jquery'
], (Calendar, fcUtil, moment, tz, denver, fixtures, $) ->
module "Calendar",
QUnit.module "Calendar",
setup: ->
@snapshot = tz.snapshot()
tz.changeZone(denver, 'America/Denver')

View File

@ -3,7 +3,7 @@ define [
'compiled/calendar/commonEventFactory'
'helpers/fakeENV'
], (CommonEvent, commonEventFactory, fakeENV) ->
module "CommonEvent",
QUnit.module "CommonEvent",
setup: ->
teardown: ->
@ -70,7 +70,7 @@ define [
notOk event == null
module 'CommonEvent#iconType',
QUnit.module 'CommonEvent#iconType',
setup: ->
fakeENV.setup({
CALENDAR: {

View File

@ -8,7 +8,7 @@ define [
'helpers/I18nStubber'
], ($, EditAppointmentGroupDetails, fcUtil, tz, detroit, french, I18nStubber) ->
module "EditAppointmentGroupDetails",
QUnit.module "EditAppointmentGroupDetails",
setup: ->
@snapshot = tz.snapshot()
@$holder = $('<table />').appendTo(document.getElementById("fixtures"))

View File

@ -8,7 +8,7 @@ define [
'helpers/I18nStubber'
], ($, EditAssignmentDetails, fcUtil, tz, detroit, french, I18nStubber) ->
module "EditAssignmentDetails",
QUnit.module "EditAssignmentDetails",
setup: ->
@snapshot = tz.snapshot()
@$holder = $('<table />').appendTo(document.getElementById("fixtures"))

View File

@ -5,7 +5,7 @@ define [
'vendor/timezone/America/Denver'
], (EventDataSource, fcUtil, tz, denver) ->
module "EventDataSource: getEvents",
QUnit.module "EventDataSource: getEvents",
setup: ->
@snapshot = tz.snapshot()
tz.changeZone(denver, 'America/Denver')

View File

@ -3,7 +3,7 @@ define [
'compiled/views/calendar/MissingDateDialogView'
], ($, MissingDateDialogView) ->
module 'MissingDateDialogView',
QUnit.module 'MissingDateDialogView',
setup: ->
$('#fixtures').append('<label for="date">Section one</label><input type="text" id="date" name="date" />')
@dialog = new MissingDateDialogView

View File

@ -1,5 +1,5 @@
define ['jquery', 'compiled/calendar/TimeBlockListManager', 'moment'], ($, TimeBlockListManager, moment) ->
module "TimeBlockListManager",
QUnit.module "TimeBlockListManager",
setup: ->
teardown: ->
$("#ui-datepicker-div").empty()

View File

@ -6,7 +6,7 @@ define [
'compiled/util/fcUtil'
], ($, TimeBlockList, moment, fcUtil) ->
module "TimeBlockList",
QUnit.module "TimeBlockList",
setup: ->
wrappedDate = (str) ->
moment( new Date(str))
@ -91,7 +91,7 @@ define [
equal @me.rows.length, 12
equal @me.blocks().length, 10
module "TimeBlockList with no time blocks",
QUnit.module "TimeBlockList with no time blocks",
setup: ->
wrappedDate = (str) ->
moment( new Date(str))

View File

@ -11,7 +11,7 @@ define [
unfudged_start = tz.parse("#{nextYear}-02-03T12:32:00Z")
unfudged_end = tz.parse("#{nextYear}-02-03T17:32:00Z")
module "TimeBlockRow",
QUnit.module "TimeBlockRow",
setup: ->
@snapshot = tz.snapshot()
tz.changeZone(detroit, 'America/Detroit')

View File

@ -4,7 +4,7 @@ define [
'vendor/timezone/America/Denver'
], (fcUtil, tz, denver) ->
module "Calendar",
QUnit.module "Calendar",
setup: ->
@snapshot = tz.snapshot()
tz.changeZone(denver, 'America/Denver')

View File

@ -3,7 +3,7 @@ define [
'compiled/class/cache'
], (_, cache) ->
module 'class/cache',
QUnit.module 'class/cache',
setup: ->
# need to get the cache from its wrapper object
# because cache is meant to be used as a class

View File

@ -8,7 +8,7 @@ define [
COURSE_SUBMISSIONS_URL = "/courses/1/submissions"
module "AssignmentGroupCollection",
QUnit.module "AssignmentGroupCollection",
setup: ->
fakeENV.setup()
@server = sinon.fakeServer.create()

View File

@ -17,7 +17,7 @@ define [
model: Backbone.Model.extend()
module 'Backbone.Collection',
QUnit.module 'Backbone.Collection',
setup: ->
@xhr = sinon.useFakeXMLHttpRequest()
@ajaxSpy = @spy $, 'ajax'

View File

@ -1,7 +1,7 @@
define [
'compiled/collections/ContentMigrationIssueCollection'
], (ContentMigrationIssueCollection) ->
module 'ContentMigrationIssueCollection'
QUnit.module 'ContentMigrationIssueCollection'
test "generates the correct fetch url", ->
course_id = 5

View File

@ -1,7 +1,7 @@
define [
'compiled/collections/DaySubstitutionCollection'
], (DaySubCollection) ->
module 'DaySubstitutionCollection'
QUnit.module 'DaySubstitutionCollection'
test 'toJSON contains nested day_substitution objects', ->
collection = new DaySubCollection

View File

@ -12,7 +12,7 @@ define [
users = null
group = null
module 'GroupUserCollection',
QUnit.module 'GroupUserCollection',
setup: ->
group = new Group(id: 1)
category = new GroupCategory()

View File

@ -1,7 +1,7 @@
define [
'compiled/collections/ModuleCollection'
], (ModuleCollection) ->
module 'ModuleCollection',
QUnit.module 'ModuleCollection',
test "generates the correct fetch url", ->
course_id = 5

View File

@ -1,7 +1,7 @@
define [
'compiled/collections/ModuleItemCollection'
], (ModuleItemCollection) ->
module 'ModuleItemCollection'
QUnit.module 'ModuleItemCollection'
test "generates the correct fetch url", ->
course_id = 5

View File

@ -13,7 +13,7 @@ define [
class Assignments extends Backbone.Collection
model: AssignmentStub
module "NeverDropCollection",
QUnit.module "NeverDropCollection",
setup: ->
list = [1..5]
@assignments = new Assignments []

View File

@ -5,7 +5,7 @@ define [
'helpers/fakeENV'
'timezone'
], (Backbone, Outcome, OutcomeResultCollection, fakeENV, tz) ->
module 'OutcomeResultCollectionSpec',
QUnit.module 'OutcomeResultCollectionSpec',
setup: ->
fakeENV.setup()
ENV.context_asset_string = 'course_1'

View File

@ -5,7 +5,7 @@ define [
'helpers/getFakePage'
], ($, Backbone, PaginatedCollection, getFakePage) ->
module 'PaginatedCollection',
QUnit.module 'PaginatedCollection',
setup: ->
@server = sinon.fakeServer.create()
@collection = new PaginatedCollection null,

View File

@ -2,7 +2,7 @@ define [
'compiled/models/Quiz'
'compiled/collections/QuizCollection'
], (Quiz, QuizCollection) ->
module 'QuizCollection'
QUnit.module 'QuizCollection'
test 'builds a collection', ->
collection = new QuizCollection([new Quiz(id: 123)])

View File

@ -5,7 +5,7 @@ define [
'compiled/collections/RolesCollection'
'compiled/util/BaseRoleTypes'
], (Backbone,_, Role, RolesCollection) ->
module 'RolesCollection',
QUnit.module 'RolesCollection',
setup: ->
@account_id = 2
teardown: ->

View File

@ -3,7 +3,7 @@ define [
'compiled/collections/WikiPageCollection'
], (WikiPage, WikiPageCollection) ->
module 'WikiPageCollection'
QUnit.module 'WikiPageCollection'
checkFrontPage = (collection) ->
total = collection.reduce ((i, model) -> i += if model.get('front_page') then 1 else 0), 0
@ -25,7 +25,7 @@ define [
collection.models[2].set('front_page', true)
ok checkFrontPage(collection), 'set front_page thrice'
module 'WikiPageCollection:sorting',
QUnit.module 'WikiPageCollection:sorting',
setup: ->
@collection = new WikiPageCollection

View File

@ -3,7 +3,7 @@ define [
'compiled/collections/WikiPageRevisionsCollection'
], (WikiPage, WikiPageRevisionsCollection) ->
module 'WikiPageRevisionsCollection'
QUnit.module 'WikiPageRevisionsCollection'
test 'parentModel accepted in constructor', ->
parentModel = new WikiPage

View File

@ -2,7 +2,7 @@ define [
'compiled/collections/content_migrations/ContentCheckboxCollection'
'compiled/models/content_migrations/ContentCheckbox'
], (CheckboxCollection, CheckboxModel) ->
module 'ContentCheckboxCollectionSpec'
QUnit.module 'ContentCheckboxCollectionSpec'
createCheckboxCollection = (properties) ->
properties ||= {}

View File

@ -1,5 +1,5 @@
define ['course_settings_helper', 'jquery'], (courseSettingsHelper, $) ->
module "course_settings_helper",
QUnit.module "course_settings_helper",
test 'non LTI 2 tools', ->
externalTool = document.createElement('li')
externalTool.id = 'nav_edit_tab_id_context_external_tool_165'

View File

@ -1,6 +1,6 @@
define [ 'vendor/date' ], () ->
module 'Date'
QUnit.module 'Date'
test 'Date.parse', ->
# create the same date the "new Date" would if the browser were in UTC

View File

@ -9,7 +9,7 @@ define [
acc = null
activeEditorNodes = null
module "EditorAccessibility",
QUnit.module "EditorAccessibility",
setup: ->
textarea = $("<textarea id='42' data-rich_text='true'></textarea>")
fixtures.append(textarea)

View File

@ -7,7 +7,7 @@ define [
fixtures = $("#fixtures")
containerDiv = null
module "EditorToggle",
QUnit.module "EditorToggle",
setup: ->
containerDiv = $("<div></div>")
fixtures.append(containerDiv)

View File

@ -5,7 +5,7 @@ define [
view = null
module "editor KeyboardShortcuts",
QUnit.module "editor KeyboardShortcuts",
setup: ->
view = new KeyboardShortcuts()
view.$dialog = {

View File

@ -17,7 +17,7 @@ define [
}
]
module 'ExternalToolCollection',
QUnit.module 'ExternalToolCollection',
setup: ->
@externalToolCollection = new ExternalToolCollection
@externalToolCollection.add(data)

View File

@ -3,7 +3,7 @@ define [
'compiled/jquery.rails_flash_notifications'
], ($) ->
fixtures = null
module 'FlashNotifications',
QUnit.module 'FlashNotifications',
setup: ->
fixtures = document.getElementById("fixtures")
flashHtml = "<div id='flash_message_holder'/><div id='flash_screenreader_holder'/>"

View File

@ -10,7 +10,7 @@ define [
<input type='text' name='date' class='datetime_field_enabled'/>
"""
module 'jquery.toJSON',
QUnit.module 'jquery.toJSON',
setup: ->
@form = $ '<form/>'
@form.html """

View File

@ -5,7 +5,7 @@ define [
'jsx/shared/rce/serviceRCELoader'
], ($, fakeENV, globalAnnouncements, serviceRCELoader)->
module "GlobalAnnouncements",
QUnit.module "GlobalAnnouncements",
setup: ->
fakeENV.setup()
ENV.RICH_CONTENT_SERVICE_ENABLED = true

View File

@ -7,7 +7,7 @@ define [
'compiled/gradebook/CurveGradesDialog'
], ($, _, fakeENV, GradebookHeaderMenu, SetDefaultGradeDialog, CurveGradesDialog) ->
module 'GradebookHeaderMenu#menuPopupOpenHandler',
QUnit.module 'GradebookHeaderMenu#menuPopupOpenHandler',
setup: ->
@menuPopupOpenHandler = GradebookHeaderMenu.prototype.menuPopupOpenHandler
@hideMenuActionsWithUnmetDependencies = @stub()
@ -38,7 +38,7 @@ define [
@menuPopupOpenHandler()
ok @disableUnavailableMenuActions.called
module 'GradebookHeaderMenu#hideMenuActionsWithUnmetDependencies',
QUnit.module 'GradebookHeaderMenu#hideMenuActionsWithUnmetDependencies',
setup: ->
fakeENV.setup()
@hideMenuActionsWithUnmetDependencies = GradebookHeaderMenu.prototype.hideMenuActionsWithUnmetDependencies
@ -160,7 +160,7 @@ define [
notOk _.contains(@visibleMenuItemNames(@menu), 'reuploadSubmissions')
module 'GradebookHeaderMenu#disableUnavailableMenuActions',
QUnit.module 'GradebookHeaderMenu#disableUnavailableMenuActions',
setup: ->
fakeENV.setup({
GRADEBOOK_OPTIONS: {
@ -220,7 +220,7 @@ define [
ok disabledMenuItems[0].getAttribute('aria-disabled')
ok disabledMenuItems[1].getAttribute('aria-disabled')
module 'GradebookHeaderMenu#setDefaultGrade',
QUnit.module 'GradebookHeaderMenu#setDefaultGrade',
setup: ->
fakeENV.setup({
GRADEBOOK_OPTIONS: {
@ -270,7 +270,7 @@ define [
notOk @dialogStub.called
ok $.flashError.called
module 'GradebookHeaderMenu#curveGrades',
QUnit.module 'GradebookHeaderMenu#curveGrades',
setup: ->
fakeENV.setup({
GRADEBOOK_OPTIONS: {

View File

@ -2,7 +2,7 @@ define [
'compiled/gradebook/GradebookHelpers'
'jsx/gradebook/shared/constants'
], (GradebookHelpers, GradebookConstants) ->
module "GradebookHelpers#noErrorsOnPage",
QUnit.module "GradebookHelpers#noErrorsOnPage",
setup: ->
@mockFind = @mock($, "find")
@ -16,7 +16,7 @@ define [
notOk GradebookHelpers.noErrorsOnPage()
module "GradebookHelpers#textareaIsGreaterThanMaxLength"
QUnit.module "GradebookHelpers#textareaIsGreaterThanMaxLength"
test "textareaIsGreaterThanMaxLength is false at exactly the max allowed length", ->
notOk GradebookHelpers.textareaIsGreaterThanMaxLength(GradebookConstants.MAX_NOTE_LENGTH)
@ -24,7 +24,7 @@ define [
test "textareaIsGreaterThanMaxLength is true at greater than the max allowed length", ->
ok GradebookHelpers.textareaIsGreaterThanMaxLength(GradebookConstants.MAX_NOTE_LENGTH + 1)
module "GradebookHelpers#maxLengthErrorShouldBeShown",
QUnit.module "GradebookHelpers#maxLengthErrorShouldBeShown",
setup: ->
@mockFind = @mock($, "find")

View File

@ -6,7 +6,7 @@ define [
'compiled/SubmissionDetailsDialog'
], (Gradebook, DataLoader, _, tz, SubmissionDetailsDialog) ->
module "Gradebook#gradeSort"
QUnit.module "Gradebook#gradeSort"
test "gradeSort - total_grade", ->
gradeSort = (showTotalGradeAsPoints, a, b, field, asc) ->
@ -40,7 +40,7 @@ define [
, 'assignment1') < 0
, "other fields are sorted by score"
module "Gradebook#hideAggregateColumns",
QUnit.module "Gradebook#hideAggregateColumns",
gradebookStubs: ->
indexedOverrides: Gradebook.prototype.indexedOverrides
indexedGradingPeriods: _.indexBy(@gradingPeriods, 'id')
@ -92,7 +92,7 @@ define [
notOk @hideAggregateColumns.call(self)
module 'Gradebook#getVisibleGradeGridColumns',
QUnit.module 'Gradebook#getVisibleGradeGridColumns',
setup: ->
@getVisibleGradeGridColumns = Gradebook.prototype.getVisibleGradeGridColumns
@makeColumnSortFn = Gradebook.prototype.makeColumnSortFn
@ -131,7 +131,7 @@ define [
@getVisibleGradeGridColumns()
notOk @makeColumnSortFn.called
module 'Gradebook#fieldsToExcludeFromAssignments',
QUnit.module 'Gradebook#fieldsToExcludeFromAssignments',
setup: ->
@excludedFields = Gradebook.prototype.fieldsToExcludeFromAssignments
@ -141,7 +141,7 @@ define [
test "includes 'needs_grading_count' in the response", ->
ok _.contains(@excludedFields, 'needs_grading_count')
module "Gradebook#submissionsForStudent",
QUnit.module "Gradebook#submissionsForStudent",
setupThis: (options = {}) ->
effectiveDueDates = {
1: { 1: { grading_period_id: "1" } },
@ -185,7 +185,7 @@ define [
submissions = @submissionsForStudent.call(self, @student)
propEqual _.pluck(submissions, "assignment_id"), ["2"]
module 'Gradebook#studentsUrl',
QUnit.module 'Gradebook#studentsUrl',
setupThis:(options) ->
options = options || {}
defaults = {
@ -212,7 +212,7 @@ define [
self = @setupThis(showConcludedEnrollments: true, showInactiveEnrollments: true)
equal @studentsUrl.call(self), 'students_with_concluded_and_inactive_enrollments_url'
module 'Gradebook#showNotesColumn',
QUnit.module 'Gradebook#showNotesColumn',
setup: ->
@loadNotes = @stub(DataLoader, "getDataForColumn")
@ -233,7 +233,7 @@ define [
@showNotesColumn()
ok @loadNotes.notCalled
module 'Gradebook#cellCommentClickHandler',
QUnit.module 'Gradebook#cellCommentClickHandler',
setup: ->
@cellCommentClickHandler = Gradebook.prototype.cellCommentClickHandler
@assignments = {

View File

@ -5,7 +5,7 @@ define [
'i18n!gradebook'
], (_, Grid,fakeENV) ->
module 'OutcomeGradebookGrid',
QUnit.module 'OutcomeGradebookGrid',
setup: -> fakeENV.setup()
teardown: -> fakeENV.teardown()

View File

@ -5,7 +5,7 @@ define [
'jst/SetDefaultGradeDialog'
], ($, Assignment, SetDefaultGradeDialog) ->
module 'SetDefaultGradeDialog',
QUnit.module 'SetDefaultGradeDialog',
setup: ->
@assignment = new Assignment(id: 1, points_possible: 10)

View File

@ -7,7 +7,7 @@ define [
dangerousHTML= '"><img src=/ onerror=alert(document.cookie);>'
escapedDangerousHTML = htmlEscape dangerousHTML
module "SubmissionCell",
QUnit.module "SubmissionCell",
setup: ->
@opts =
item:
@ -177,7 +177,7 @@ define [
submissionCellResponse = SubmissionCell.pass_fail.formatter(0, 0, { grade: "complete" }, {}, {}, { tooltip: "dora_the_explorer" })
ok submissionCellResponse.indexOf("dora_the_explorer") > -1
module "Pass/Fail SubmissionCell",
QUnit.module "Pass/Fail SubmissionCell",
setup: ->
opts =
item:

View File

@ -7,7 +7,7 @@ define [
'jst/SubmissionDetailsDialog'
], ($, Assignment, SubmissionDetailsDialog, _, tz) ->
module 'SubmissionDetailsDialog',
QUnit.module 'SubmissionDetailsDialog',
setup: ->
defaults =
current_user_roles: [ "teacher" ]
@ -49,7 +49,7 @@ define [
ok dialog.dialog.find('.submission-details').text().match('LATE')
module '_submission_detail',
QUnit.module '_submission_detail',
setup: ->
defaults =
current_user_roles: [ "teacher" ]
@ -81,7 +81,7 @@ define [
equal dialog.dialog.find('.submisison-attachment').length, 3
module '_grading_box',
QUnit.module '_grading_box',
setup: ->
defaults =
current_user_roles: [ "teacher" ]

View File

@ -7,7 +7,7 @@ define [
'compiled/gradezilla/CurveGradesDialog'
], ($, _, fakeENV, GradebookHeaderMenu, SetDefaultGradeDialog, CurveGradesDialog) ->
module 'GradebookHeaderMenu#menuPopupOpenHandler',
QUnit.module 'GradebookHeaderMenu#menuPopupOpenHandler',
setup: ->
@menuPopupOpenHandler = GradebookHeaderMenu.prototype.menuPopupOpenHandler
@hideMenuActionsWithUnmetDependencies = @stub()
@ -38,7 +38,7 @@ define [
@menuPopupOpenHandler()
ok @disableUnavailableMenuActions.called
module 'GradebookHeaderMenu#hideMenuActionsWithUnmetDependencies',
QUnit.module 'GradebookHeaderMenu#hideMenuActionsWithUnmetDependencies',
setup: ->
fakeENV.setup()
@hideMenuActionsWithUnmetDependencies = GradebookHeaderMenu.prototype.hideMenuActionsWithUnmetDependencies
@ -160,7 +160,7 @@ define [
notOk _.contains(@visibleMenuItemNames(@menu), 'reuploadSubmissions')
module 'GradebookHeaderMenu#disableUnavailableMenuActions',
QUnit.module 'GradebookHeaderMenu#disableUnavailableMenuActions',
setup: ->
fakeENV.setup({
GRADEBOOK_OPTIONS: {
@ -220,7 +220,7 @@ define [
ok disabledMenuItems[0].getAttribute('aria-disabled')
ok disabledMenuItems[1].getAttribute('aria-disabled')
module 'GradebookHeaderMenu#setDefaultGrade',
QUnit.module 'GradebookHeaderMenu#setDefaultGrade',
setup: ->
fakeENV.setup({
GRADEBOOK_OPTIONS: {
@ -270,7 +270,7 @@ define [
notOk @dialogStub.called
ok $.flashError.called
module 'GradebookHeaderMenu#curveGrades',
QUnit.module 'GradebookHeaderMenu#curveGrades',
setup: ->
fakeENV.setup({
GRADEBOOK_OPTIONS: {

View File

@ -2,7 +2,7 @@ define [
'compiled/gradezilla/GradebookHelpers'
'jsx/gradezilla/shared/constants'
], (GradebookHelpers, GradebookConstants) ->
module "GradebookHelpers#noErrorsOnPage",
QUnit.module "GradebookHelpers#noErrorsOnPage",
setup: ->
@mockFind = @mock($, "find")
@ -16,7 +16,7 @@ define [
notOk GradebookHelpers.noErrorsOnPage()
module "GradebookHelpers#textareaIsGreaterThanMaxLength"
QUnit.module "GradebookHelpers#textareaIsGreaterThanMaxLength"
test "textareaIsGreaterThanMaxLength is false at exactly the max allowed length", ->
notOk GradebookHelpers.textareaIsGreaterThanMaxLength(GradebookConstants.MAX_NOTE_LENGTH)
@ -24,7 +24,7 @@ define [
test "textareaIsGreaterThanMaxLength is true at greater than the max allowed length", ->
ok GradebookHelpers.textareaIsGreaterThanMaxLength(GradebookConstants.MAX_NOTE_LENGTH + 1)
module "GradebookHelpers#maxLengthErrorShouldBeShown",
QUnit.module "GradebookHelpers#maxLengthErrorShouldBeShown",
setup: ->
@mockFind = @mock($, "find")

View File

@ -6,7 +6,7 @@ define [
'compiled/SubmissionDetailsDialog'
], (Gradebook, DataLoader, _, tz, SubmissionDetailsDialog) ->
module "Gradebook#gradeSort"
QUnit.module "Gradebook#gradeSort"
test "gradeSort - total_grade", ->
gradeSort = (showTotalGradeAsPoints, a, b, field, asc) ->
@ -40,7 +40,7 @@ define [
, 'assignment1') < 0
, "other fields are sorted by score"
module "Gradebook#hideAggregateColumns",
QUnit.module "Gradebook#hideAggregateColumns",
gradebookStubs: ->
indexedOverrides: Gradebook.prototype.indexedOverrides
indexedGradingPeriods: _.indexBy(@gradingPeriods, 'id')
@ -92,7 +92,7 @@ define [
notOk @hideAggregateColumns.call(self)
module 'Gradebook#getVisibleGradeGridColumns',
QUnit.module 'Gradebook#getVisibleGradeGridColumns',
setup: ->
@getVisibleGradeGridColumns = Gradebook.prototype.getVisibleGradeGridColumns
@makeColumnSortFn = Gradebook.prototype.makeColumnSortFn
@ -131,7 +131,7 @@ define [
@getVisibleGradeGridColumns()
notOk @makeColumnSortFn.called
module 'Gradebook#fieldsToExcludeFromAssignments',
QUnit.module 'Gradebook#fieldsToExcludeFromAssignments',
setup: ->
@excludedFields = Gradebook.prototype.fieldsToExcludeFromAssignments
@ -141,7 +141,7 @@ define [
test "includes 'needs_grading_count' in the response", ->
ok _.contains(@excludedFields, 'needs_grading_count')
module "Gradebook#submissionsForStudent",
QUnit.module "Gradebook#submissionsForStudent",
setupThis: (options = {}) ->
effectiveDueDates = {
1: { 1: { grading_period_id: "1" } },
@ -185,7 +185,7 @@ define [
submissions = @submissionsForStudent.call(self, @student)
propEqual _.pluck(submissions, "assignment_id"), ["2"]
module 'Gradebook#studentsUrl',
QUnit.module 'Gradebook#studentsUrl',
setupThis:(options) ->
options = options || {}
defaults = {
@ -212,7 +212,7 @@ define [
self = @setupThis(showConcludedEnrollments: true, showInactiveEnrollments: true)
equal @studentsUrl.call(self), 'students_with_concluded_and_inactive_enrollments_url'
module 'Gradebook#showNotesColumn',
QUnit.module 'Gradebook#showNotesColumn',
setup: ->
@loadNotes = @stub(DataLoader, "getDataForColumn")
@ -233,7 +233,7 @@ define [
@showNotesColumn()
ok @loadNotes.notCalled
module 'Gradebook#cellCommentClickHandler',
QUnit.module 'Gradebook#cellCommentClickHandler',
setup: ->
@cellCommentClickHandler = Gradebook.prototype.cellCommentClickHandler
@assignments = {

View File

@ -5,7 +5,7 @@ define [
'i18n!gradezilla'
], (_, Grid,fakeENV) ->
module 'OutcomeGradebookGrid',
QUnit.module 'OutcomeGradebookGrid',
setup: -> fakeENV.setup()
teardown: -> fakeENV.teardown()

View File

@ -5,7 +5,7 @@ define [
'jst/SetDefaultGradeDialog'
], ($, Assignment, SetDefaultGradeDialog) ->
module 'SetDefaultGradeDialog',
QUnit.module 'SetDefaultGradeDialog',
setup: ->
@assignment = new Assignment(id: 1, points_possible: 10)

View File

@ -7,7 +7,7 @@ define [
dangerousHTML= '"><img src=/ onerror=alert(document.cookie);>'
escapedDangerousHTML = htmlEscape dangerousHTML
module "SubmissionCell",
QUnit.module "SubmissionCell",
setup: ->
@opts =
item:
@ -177,7 +177,7 @@ define [
submissionCellResponse = SubmissionCell.pass_fail.formatter(0, 0, { grade: "complete" }, {}, {}, { tooltip: "dora_the_explorer" })
ok submissionCellResponse.indexOf("dora_the_explorer") > -1
module "Pass/Fail SubmissionCell",
QUnit.module "Pass/Fail SubmissionCell",
setup: ->
opts =
item:

View File

@ -7,7 +7,7 @@ define [
'jst/SubmissionDetailsDialog'
], ($, Assignment, SubmissionDetailsDialog, _, tz) ->
module 'SubmissionDetailsDialog',
QUnit.module 'SubmissionDetailsDialog',
setup: ->
defaults =
current_user_roles: [ "teacher" ]
@ -49,7 +49,7 @@ define [
ok dialog.dialog.find('.submission-details').text().match('LATE')
module '_submission_detail',
QUnit.module '_submission_detail',
setup: ->
defaults =
current_user_roles: [ "teacher" ]
@ -81,7 +81,7 @@ define [
equal dialog.dialog.find('.submisison-attachment').length, 3
module '_grading_box',
QUnit.module '_grading_box',
setup: ->
defaults =
current_user_roles: [ "teacher" ]

View File

@ -10,9 +10,9 @@ define [
'vendor/timezone/America/New_York'
], ({helpers}, $, _, {contains}, fakeENV, tz, detroit, chicago, newYork) ->
module 'handlebars_helpers'
QUnit.module 'handlebars_helpers'
module 'checkbox'
QUnit.module 'checkbox'
context =
likes:
@ -67,7 +67,7 @@ define [
test 'toPrecision', ->
equal helpers.toPrecision(3.6666666, 2), '3.7'
module 'truncate'
QUnit.module 'truncate'
test 'default truncates 30 characters', ->
text = "asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf"
@ -84,7 +84,7 @@ define [
truncText = helpers.truncate_left text, 15
equal truncText, "...to the store", "Reverse truncates"
module 'friendlyDatetime',
QUnit.module 'friendlyDatetime',
setup: ->
@snapshot = tz.snapshot()
tz.changeZone(detroit, 'America/Detroit')
@ -111,7 +111,7 @@ define [
contains helpers.friendlyDatetime(new Date(0), hash: {pubDate: false}).string,
"<span aria-hidden='true'>Dec 31, 1969</span>"
module 'contextSensitive FriendlyDatetime',
QUnit.module 'contextSensitive FriendlyDatetime',
setup: ->
@snapshot = tz.snapshot()
fakeENV.setup()
@ -143,7 +143,7 @@ define [
timeTag = helpers.friendlyDatetime('1970-01-01 00:00:00Z', hash: {pubDate: false, contextSensitive: true}).string
contains timeTag, "<span aria-hidden='true'>Dec 31, 1969</span>"
module 'contextSensitiveDatetimeTitle',
QUnit.module 'contextSensitiveDatetimeTitle',
setup: ->
@snapshot = tz.snapshot()
fakeENV.setup()
@ -189,7 +189,7 @@ define [
titleText = helpers.contextSensitiveDatetimeTitle('1970-01-01 00:00:00Z', hash: {justText: undefined})
equal titleText, "data-tooltip data-html-tooltip-title=\"Dec 31, 1969 at 7pm\""
module 'datetimeFormatted',
QUnit.module 'datetimeFormatted',
setup: -> @snapshot = tz.snapshot()
teardown: -> tz.restore(@snapshot)
@ -198,7 +198,7 @@ define [
equal helpers.datetimeFormatted('1970-01-01 00:00:00'),
"Jan 1, 1970 at 12am"
module 'ifSettingIs'
QUnit.module 'ifSettingIs'
test 'it runs primary case if setting matches', ->
ENV.SETTINGS = {key: 'value'}
@ -230,7 +230,7 @@ define [
helpers.ifSettingIs('key', 'value', funcs)
equal semaphore, true
module 'accessible date pickers'
QUnit.module 'accessible date pickers'
test 'it provides a format', ->
equal(typeof(helpers.accessibleDateFormat()), "string")
@ -254,7 +254,7 @@ define [
equal(shortFormatPrompt.indexOf(helpers.accessibleDateFormat()), -1)
ok(shortFormatPrompt.indexOf(helpers.accessibleDateFormat('date')) > -1)
module 'i18n number helper',
QUnit.module 'i18n number helper',
setup: ->
@ret = '47.00%'
@stub(I18n, 'n').returns(@ret)

View File

@ -6,7 +6,7 @@ define [
], ($,helpDialog,fakeENV)->
# more tests are in spec/selenium/help_dialog_spec.rb
module 'HelpDialog',
QUnit.module 'HelpDialog',
setup: ->
fakeENV.setup({
help_link_name: 'Links'

View File

@ -11,7 +11,7 @@ define [
scope = I18n.scoped('foo')
t = (args...) -> scope.t(args...)
module "I18n",
QUnit.module "I18n",
setup: ->
I18nStubber.pushFrame()
@ -80,7 +80,7 @@ define [
test "pluralize: should format the number", ->
equal t({one: "1 thing", other: "%{count} things"}, {count: 1500}), '1,500 things'
module 'I18n localize number',
QUnit.module 'I18n localize number',
setup: ->
@delimiter = ' '
@separator = ','

View File

@ -7,7 +7,7 @@ define [
'helpers/I18nStubber'
'jquery.instructure_date_and_time'
], ($, tz, detroit, juneau, portuguese, I18nStubber) ->
module 'fudgeDateForProfileTimezone',
QUnit.module 'fudgeDateForProfileTimezone',
setup: ->
@snapshot = tz.snapshot()
@original = new Date(expectedTimestamp = Date.UTC(2013, 8, 1))
@ -50,7 +50,7 @@ define [
fudged = $.fudgeDateForProfileTimezone(@original)
equal fudged.toString('yyyy-MM-dd HH:mm:ss'), tz.format(@original, '%F %T')
module 'unfudgeDateForProfileTimezone',
QUnit.module 'unfudgeDateForProfileTimezone',
setup: ->
@snapshot = tz.snapshot()
@original = new Date(expectedTimestamp = Date.UTC(2013, 8, 1))
@ -86,7 +86,7 @@ define [
unfudged = $.unfudgeDateForProfileTimezone(@original)
equal tz.format(unfudged, '%F %T'), @original.toString('yyyy-MM-dd HH:mm:ss')
module 'sameYear',
QUnit.module 'sameYear',
setup: -> @snapshot = tz.snapshot()
teardown: -> tz.restore(@snapshot)
@ -105,7 +105,7 @@ define [
ok $.sameYear(date1, date2)
ok !$.sameYear(date1, date3)
module 'sameDate',
QUnit.module 'sameDate',
setup: -> @snapshot = tz.snapshot()
teardown: -> tz.restore(@snapshot)
@ -124,7 +124,7 @@ define [
ok $.sameDate(date1, date2)
ok !$.sameDate(date1, date3)
module 'dateString',
QUnit.module 'dateString',
setup: ->
@snapshot = tz.snapshot()
I18nStubber.pushFrame()
@ -138,7 +138,7 @@ define [
tz.changeZone(detroit, 'America/Detroit')
equal $.dateString(new Date(0)), 'Dec 31, 1969'
module 'timeString',
QUnit.module 'timeString',
setup: ->
@snapshot = tz.snapshot()
I18nStubber.pushFrame()
@ -162,7 +162,7 @@ define [
tz.changeZone(detroit, 'America/Detroit')
equal $.timeString(new Date(0)), '7pm'
module 'datetimeString',
QUnit.module 'datetimeString',
setup: ->
@snapshot = tz.snapshot()
I18nStubber.pushFrame()
@ -188,7 +188,7 @@ define [
'time.event': "%{date} em %{time}"
equal $.datetimeString('1970-01-01 15:01:00Z'), "1 Jan 1970 em 15:01"
module '$.datepicker.parseDate',
QUnit.module '$.datepicker.parseDate',
setup: ->
@snapshot = tz.snapshot()
I18nStubber.pushFrame()

View File

@ -6,7 +6,7 @@ define ['compiled/util/invoker'], (invoker) ->
noMethod: ->
'noMethod'
module 'Invoker'
QUnit.module 'Invoker'
test 'should call a method with invoke', =>
result = obj.invoke 'one'

View File

@ -1,6 +1,6 @@
define ['jquery'], (jQuery) ->
module 'instructure jquery patches'
QUnit.module 'instructure jquery patches'
test 'parseJSON', ->
deepEqual(jQuery.parseJSON('{ "var1": "1", "var2" : 2 }'), { "var1": "1", "var2" : 2 }, 'should still parse without the prefix')

View File

@ -4,7 +4,7 @@ define [
], (jQuery) ->
$ = jQuery
module 'instructure misc plugins'
QUnit.module 'instructure misc plugins'
test 'showIf', ->
el = $('<input type="checkbox" id="checkbox1">').appendTo("#fixtures")

View File

@ -2,7 +2,7 @@ define [
'jquery'
'compiled/jquery/ModuleSequenceFooter'
], ($) ->
module 'ModuleSequenceFooter: init',
QUnit.module 'ModuleSequenceFooter: init',
setup: ->
@$testEl = $('<div>')
$('#fixtures').append @$testEl
@ -58,7 +58,7 @@ define [
equal @$testEl.find('.module-sequence-footer:not(.no-animation)').length, 1, 'no-animation removed from module-sequence-footer'
equal @$testEl.find('.module-sequence-padding:not(.no-animation)').length, 1, 'no-animation removed from module-sequence-padding'
module 'ModuleSequenceFooter: rendering',
QUnit.module 'ModuleSequenceFooter: rendering',
setup: ->
@server = sinon.fakeServer.create()
@$testEl = $('<div>')

View File

@ -6,7 +6,7 @@ define [
storedInstEnv = null
module '$.fn.defaultAjaxError',
QUnit.module '$.fn.defaultAjaxError',
setup: ->
storedInstEnv = INST.environment
$.ajaxJSON.unhandledXHRs = []
@ -45,7 +45,7 @@ define [
ok spy.called
module '$.ajaxJSON.isUnauthenticated'
QUnit.module '$.ajaxJSON.isUnauthenticated'
test 'returns false if status is not 401', ->
equal $.ajaxJSON.isUnauthenticated({status: 200}), false

View File

@ -5,7 +5,7 @@ define [
'helpers/jquery.simulate'
], ($) ->
module 'fixDialogButtons',
QUnit.module 'fixDialogButtons',
setup: ->
@clock = sinon.useFakeTimers()

View File

@ -3,7 +3,7 @@ define [
'compiled/jquery/mediaComment'
], ($, MediaUtils)->
module 'mediaComment',
QUnit.module 'mediaComment',
setup: ->
@server = sinon.fakeServer.create()
window.INST.kalturaSettings = "settings set" # pretend kalturaSettings are set.
@ -55,7 +55,7 @@ define [
equal @$holder.find('source[type=mp4]').attr('src'),"http://some_mp4_url.com", "Video contains the mp4 source"
module "MediaCommentUtils functions",
QUnit.module "MediaCommentUtils functions",
setup: ->
teardown: ->

View File

@ -5,7 +5,7 @@ define [
], ($, _)->
# fragile spec
module 'mediaCommentThumbnail',
QUnit.module 'mediaCommentThumbnail',
setup: ->
# flop out the _.defer function to just call directly down to the passed
# function reference. this helps the tests run in a synchronous order

View File

@ -3,7 +3,7 @@ define [
'compiled/jquery/outerclick'
], ($) ->
module 'outerclick'
QUnit.module 'outerclick'
test 'should work', ->
handler = @spy()

View File

@ -3,7 +3,7 @@ define [
'compiled/jquery/redirectClickTo'
], ($) ->
module 'redirectClickTo'
QUnit.module 'redirectClickTo'
createClick = ->
e = document.createEvent('MouseEvents')

View File

@ -39,7 +39,7 @@ define [
</form>
''')
module "SerializeForm"
QUnit.module "SerializeForm"
test "Serializes valid input items correctly", ->
serialized = $sampleForm.serializeForm()

View File

@ -14,7 +14,7 @@ define [
React.render(createElement(data), wrapper)
module 'AssignmentConfigurationsTools',
QUnit.module 'AssignmentConfigurationsTools',
setup: ->
secureParams = "asdf234.lhadf234.adfasd23324"
wrapper = document.getElementById('fixtures')

View File

@ -6,7 +6,7 @@ define [
], (React, ReactDOM, FlashMessageHolder, configureStore) ->
module 'FlashMessageHolder',
QUnit.module 'FlashMessageHolder',
setup: ->
@props =
time: 123

View File

@ -6,7 +6,7 @@ define [
'jsx/assignments/constants'
], (React, ReactDOM, TestUtils, ModeratedColumnHeader, Constants) ->
module 'ModeratedColumnHeader',
QUnit.module 'ModeratedColumnHeader',
setup: ->
@props =
markColumn: Constants.markColumnNames.MARK_ONE

View File

@ -42,7 +42,7 @@ define [
]
}
module 'ModeratedStudentList'
QUnit.module 'ModeratedStudentList'
test 'only shows the next speedgrader link when in moderation set', ->
newFakeStudentList = _.extend({}, fakeStudentList)
@ -171,7 +171,7 @@ define [
equal radioInputs.length, 2, 'renders two radio buttons'
ReactDOM.unmountComponentAtNode(studentList.getDOMNode().parentNode)
module 'Persist provisional grades'
QUnit.module 'Persist provisional grades'
test 'selecting provisional grade triggers handleSelectProvisionalGrade handler', ->
newFakeStudentList = _.extend({}, fakeStudentList)

View File

@ -6,7 +6,7 @@ define [
'jsx/assignments/actions/ModerationActions'
], (React, ReactDOM, TestUtils, ModerationApp, Actions) ->
module 'ModerationApp',
QUnit.module 'ModerationApp',
setup: ->
@store =
subscribe: sinon.spy()

View File

@ -5,7 +5,7 @@ define [
'jsx/assignments/ModerationHeader'
], (React, ReactDOM, TestUtils, Header) ->
module 'ModerationHeader',
QUnit.module 'ModerationHeader',
setup: ->
@props =
onPublishClick: ->

View File

@ -2,7 +2,7 @@ define [
"jsx/assignments/actions/ModerationActions"
], (ModerationActions) ->
module "ModerationActions - Action Creators"
QUnit.module "ModerationActions - Action Creators"
test 'creates the SORT_MARK1_COLUMN action', ->
action = ModerationActions.sortMark1Column()
@ -130,7 +130,7 @@ define [
deepEqual action, expected, "creates the action successfully"
module "ModerationActions#apiGetStudents",
QUnit.module "ModerationActions#apiGetStudents",
setup: ->
@client =
get: ->
@ -182,7 +182,7 @@ define [
start()
, getState)
module "ModerationActions#publishGrades",
QUnit.module "ModerationActions#publishGrades",
setup: ->
@client = {
post: ->
@ -270,7 +270,7 @@ define [
start()
, getState)
module "ModerationActions#addStudentToModerationSet",
QUnit.module "ModerationActions#addStudentToModerationSet",
setup: ->
@client =
post: ->
@ -333,7 +333,7 @@ define [
start()
, getState)
module "ModerationActions#selectProvisionalGrade",
QUnit.module "ModerationActions#selectProvisionalGrade",
setup: ->
@client =
put: ->

View File

@ -97,7 +97,7 @@ define [
]
module "students reducer"
QUnit.module "students reducer"
test "concatenates students on GOT_STUDENTS", ->
initialState =
@ -219,7 +219,7 @@ define [
deepEqual newState.studentList.students, expected, 'student received updated selected_provisional_grade_id property'
module "urls reducer"
QUnit.module "urls reducer"
test "passes through whatever the current state is", ->
initialState =
@ -230,7 +230,7 @@ define [
newState = rootReducer(initialState, someRandomAction)
deepEqual newState.urls, initialState.urls, 'passes through unchanged'
module "assignments reducer"
QUnit.module "assignments reducer"
test "sets to published on PUBLISHED_GRADES", ->
initialState =
@ -245,7 +245,7 @@ define [
ok newState.assignment.published, 'successfully sets to publish'
module "flashMessage reducer"
QUnit.module "flashMessage reducer"
test "sets success message on PUBLISHED_GRADES", ->
initialState =
@ -331,7 +331,7 @@ define [
error: true
deepEqual newState.flashMessage, expected, 'updates state'
module 'inflightAction reducer',
QUnit.module 'inflightAction reducer',
setup: ->
@initialState =
inflightAction:
@ -400,7 +400,7 @@ define [
stateWithPublishLanded = rootReducer(@inflightInitialState, publishedGradesFailedAction)
equal stateWithPublishLanded.inflightAction.publish, false
module "sorting mark1 column on SORT_MARK1_COLUMN"
QUnit.module "sorting mark1 column on SORT_MARK1_COLUMN"
test 'default to descending order when clicking on a new column', ->
initialState =
@ -445,7 +445,7 @@ define [
equal newState.studentList.sort.direction, Constants.sortDirections.ASCENDING, 'sets the right direction'
deepEqual newState.studentList.students[0].id, 2, 'sorts the right student to the top'
module "sorting mark2 column on SORT_MARK2_COLUMN"
QUnit.module "sorting mark2 column on SORT_MARK2_COLUMN"
test 'default to descending order when clicking on a new column', ->
initialState =
@ -490,7 +490,7 @@ define [
equal newState.studentList.sort.direction, Constants.sortDirections.ASCENDING, 'sets the right direction'
deepEqual newState.studentList.students[0].id, 2, 'sorts the right student to the top'
module "sorting mark3 column on SORT_MARK3_COLUMN"
QUnit.module "sorting mark3 column on SORT_MARK3_COLUMN"
test 'default to descending order when clicking on a new column', ->
initialState =

Some files were not shown because too many files have changed in this diff Show More