Commit 9769f364 by Will Daly

Updated tests to weaken "number" input field requirement, which

isn't supported in Firefox.
parent 0f9d7230
......@@ -113,6 +113,13 @@ describe "Test Metadata Editor", ->
verifyEntry = (index, display_name, type) ->
expect(childModels[index].get('display_name')).toBe(display_name)
# Some browsers (e.g. FireFox) do not support the "number"
# input type. We can accept a "text" input instead
# and still get acceptable behavior in the UI.
if type == 'number' and childViews[index].type != 'number'
type = 'text'
expect(childViews[index].type).toBe(type)
verifyEntry(0, 'Display Name', 'text')
......@@ -164,6 +171,13 @@ describe "Test Metadata Editor", ->
assertInputType = (view, expectedType) ->
input = view.$el.find('.setting-input')
expect(input.length).toEqual(1)
# Some browsers (e.g. FireFox) do not support the "number"
# input type. We can accept a "text" input instead
# and still get acceptable behavior in the UI.
if expectedType == 'number' and input[0].type != 'number'
expectedType = 'text'
expect(input[0].type).toEqual(expectedType)
assertValueInView = (view, expectedValue) ->
......
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