diff --git a/test/spec/ui/fields/access.js b/test/spec/ui/fields/access.js index 45b84eb10f..4c8feadc11 100644 --- a/test/spec/ui/fields/access.js +++ b/test/spec/ui/fields/access.js @@ -4,7 +4,10 @@ describe('iD.uiFieldAccess', function() { beforeEach(function() { context = iD.coreContext(); selection = d3.select(document.createElement('div')); - field = context.presets().field('access'); + field = iD.presetField('access', { + keys: ['access', 'foot', 'motor_vehicle', 'bicycle', 'horse'], + type: 'access' + }); }); it('creates inputs for a variety of modes of access', function() { diff --git a/test/spec/ui/fields/localized.js b/test/spec/ui/fields/localized.js index e0736cf436..173d7e6f1c 100644 --- a/test/spec/ui/fields/localized.js +++ b/test/spec/ui/fields/localized.js @@ -4,7 +4,7 @@ describe('iD.uiFieldLocalized', function() { beforeEach(function() { context = iD.coreContext(); selection = d3.select(document.createElement('div')); - field = iD.presetField('test', {key: 'name'}); + field = iD.presetField('name', { key: 'name', type: 'localized' }); }); it('adds a blank set of fields when the + button is clicked', function() { diff --git a/test/spec/ui/fields/wikipedia.js b/test/spec/ui/fields/wikipedia.js index 6f7983545b..16b0fa23ea 100644 --- a/test/spec/ui/fields/wikipedia.js +++ b/test/spec/ui/fields/wikipedia.js @@ -2,10 +2,10 @@ describe('iD.uiFieldWikipedia', function() { var entity, context, selection, field, server; function changeTags(changed) { - var e = context.entity(entity.id), - annotation = 'Changed tags.', - tags = JSON.parse(JSON.stringify(e.tags)), // deep copy - didChange = false; + var e = context.entity(entity.id); + var annotation = 'Changed tags.'; + var tags = JSON.parse(JSON.stringify(e.tags)); // deep copy + var didChange = false; for (var k in changed) { if (changed.hasOwnProperty(k)) { @@ -47,7 +47,11 @@ describe('iD.uiFieldWikipedia', function() { context = iD.coreContext(); context.history().merge([entity]); selection = d3.select(document.createElement('div')); - field = context.presets().field('wikipedia'); + field = iD.presetField('wikipedia', { + key: 'wikipedia', + keys: ['wikipedia', 'wikidata'], + type: 'wikipedia' + }); server = createServer({ respondImmediately: true }); });