mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 21:28:11 +02:00
Fix references to iD
This commit is contained in:
@@ -6,7 +6,7 @@ describe('access', function() {
|
||||
});
|
||||
|
||||
it('creates inputs for a variety of modes of access', function() {
|
||||
var access = access(field);
|
||||
var access = iD.ui.fields.access(field);
|
||||
selection.call(access);
|
||||
expect(selection.selectAll('.preset-access-access')[0].length).to.equal(1);
|
||||
expect(selection.selectAll('.preset-access-foot')[0].length).to.equal(1);
|
||||
@@ -16,20 +16,20 @@ describe('access', function() {
|
||||
});
|
||||
|
||||
it('does not include "yes", "designated", "dismount" options for general access (#934), (#2213)', function() {
|
||||
var access = access(field);
|
||||
var access = iD.ui.fields.access(field);
|
||||
expect(_.map(access.options('access'), 'value')).not.to.include('yes');
|
||||
expect(_.map(access.options('access'), 'value')).not.to.include('designated');
|
||||
expect(_.map(access.options('access'), 'value')).not.to.include('dismount');
|
||||
});
|
||||
|
||||
it('does include a "dismount" option for bicycles (#2726)', function() {
|
||||
var access = access(field);
|
||||
var access = iD.ui.fields.access(field);
|
||||
expect(_.map(access.options('bicycle'), 'value')).to.include('dismount');
|
||||
expect(_.map(access.options('foot'), 'value')).not.to.include('dismount');
|
||||
});
|
||||
|
||||
it('sets foot placeholder to "yes" for steps and pedestrian', function() {
|
||||
var access = access(field);
|
||||
var access = iD.ui.fields.access(field);
|
||||
selection.call(access);
|
||||
|
||||
access.tags({highway: 'steps'});
|
||||
@@ -40,7 +40,7 @@ describe('access', function() {
|
||||
});
|
||||
|
||||
it('sets foot placeholder to "designated" for footways', function() {
|
||||
var access = access(field);
|
||||
var access = iD.ui.fields.access(field);
|
||||
selection.call(access);
|
||||
|
||||
access.tags({highway: 'footway'});
|
||||
@@ -48,7 +48,7 @@ describe('access', function() {
|
||||
});
|
||||
|
||||
it('sets bicycle placeholder to "designated" for cycleways', function() {
|
||||
var access = access(field);
|
||||
var access = iD.ui.fields.access(field);
|
||||
selection.call(access);
|
||||
|
||||
access.tags({highway: 'cycleway'});
|
||||
@@ -56,7 +56,7 @@ describe('access', function() {
|
||||
});
|
||||
|
||||
it('sets horse placeholder to "designated" for bridleways', function() {
|
||||
var access = access(field);
|
||||
var access = iD.ui.fields.access(field);
|
||||
selection.call(access);
|
||||
|
||||
access.tags({highway: 'bridleway'});
|
||||
@@ -64,7 +64,7 @@ describe('access', function() {
|
||||
});
|
||||
|
||||
it('sets motor_vehicle placeholder to "no" for footways, steps, pedestrian, cycleway, bridleway, and path', function() {
|
||||
var access = access(field);
|
||||
var access = iD.ui.fields.access(field);
|
||||
selection.call(access);
|
||||
['footway', 'steps', 'pedestrian', 'cycleway', 'bridleway', 'path'].forEach(function(value) {
|
||||
access.tags({highway: value});
|
||||
@@ -73,7 +73,7 @@ describe('access', function() {
|
||||
});
|
||||
|
||||
it('sets motor_vehicle placeholder to "yes" for various other highway tags', function() {
|
||||
var access = access(field);
|
||||
var access = iD.ui.fields.access(field);
|
||||
selection.call(access);
|
||||
['residential', 'motorway', 'trunk', 'primary', 'secondary', 'tertiary', 'service',
|
||||
'unclassified', 'motorway_link', 'trunk_link', 'primary_link', 'secondary_link', 'tertiary_link'].forEach(function(value) {
|
||||
@@ -83,7 +83,7 @@ describe('access', function() {
|
||||
});
|
||||
|
||||
it('overrides a "yes" or "designated" placeholder with more specific access tag (#2213)', function() {
|
||||
var access = access(field);
|
||||
var access = iD.ui.fields.access(field);
|
||||
selection.call(access);
|
||||
|
||||
access.tags({highway: 'service', access: 'emergency'});
|
||||
@@ -94,7 +94,7 @@ describe('access', function() {
|
||||
});
|
||||
|
||||
it('overrides a "no" placeholder with more specific access tag (#2763)', function() {
|
||||
var access = access(field);
|
||||
var access = iD.ui.fields.access(field);
|
||||
selection.call(access);
|
||||
|
||||
access.tags({highway: 'cycleway', access: 'destination'});
|
||||
|
||||
@@ -7,7 +7,7 @@ describe('localized', function() {
|
||||
});
|
||||
|
||||
it('adds a blank set of fields when the + button is clicked', function() {
|
||||
var localized = localized(field, {});
|
||||
var localized = iD.ui.fields.localized(field, {});
|
||||
selection.call(localized);
|
||||
happen.click(selection.selectAll('.localized-add').node());
|
||||
expect(selection.selectAll('.localized-lang').size()).to.equal(1);
|
||||
@@ -15,7 +15,7 @@ describe('localized', function() {
|
||||
});
|
||||
|
||||
it('doesn\'t create a tag when the value is empty', function() {
|
||||
var localized = localized(field, {});
|
||||
var localized = iD.ui.fields.localized(field, {});
|
||||
selection.call(localized);
|
||||
happen.click(selection.selectAll('.localized-add').node());
|
||||
|
||||
@@ -29,7 +29,7 @@ describe('localized', function() {
|
||||
});
|
||||
|
||||
it('doesn\'t create a tag when the name is empty', function() {
|
||||
var localized = localized(field, {});
|
||||
var localized = iD.ui.fields.localized(field, {});
|
||||
selection.call(localized);
|
||||
happen.click(selection.selectAll('.localized-add').node());
|
||||
|
||||
@@ -43,7 +43,7 @@ describe('localized', function() {
|
||||
});
|
||||
|
||||
it('creates a tag after setting language then value', function() {
|
||||
var localized = localized(field, {});
|
||||
var localized = iD.ui.fields.localized(field, {});
|
||||
selection.call(localized);
|
||||
happen.click(selection.selectAll('.localized-add').node());
|
||||
|
||||
@@ -59,7 +59,7 @@ describe('localized', function() {
|
||||
});
|
||||
|
||||
it('creates a tag after setting value then language', function() {
|
||||
var localized = localized(field, {});
|
||||
var localized = iD.ui.fields.localized(field, {});
|
||||
selection.call(localized);
|
||||
happen.click(selection.selectAll('.localized-add').node());
|
||||
|
||||
@@ -75,7 +75,7 @@ describe('localized', function() {
|
||||
});
|
||||
|
||||
it('changes an existing language', function() {
|
||||
var localized = localized(field, {});
|
||||
var localized = iD.ui.fields.localized(field, {});
|
||||
selection.call(localized);
|
||||
localized.tags({'name:de': 'Value'});
|
||||
|
||||
@@ -90,7 +90,7 @@ describe('localized', function() {
|
||||
});
|
||||
|
||||
it('ignores similar keys like `old_name`', function() {
|
||||
var localized = localized(field, {});
|
||||
var localized = iD.ui.fields.localized(field, {});
|
||||
selection.call(localized);
|
||||
localized.tags({'old_name:de': 'Value'});
|
||||
|
||||
@@ -99,7 +99,7 @@ describe('localized', function() {
|
||||
});
|
||||
|
||||
it('removes the tag when the language is emptied', function() {
|
||||
var localized = localized(field, {});
|
||||
var localized = iD.ui.fields.localized(field, {});
|
||||
selection.call(localized);
|
||||
localized.tags({'name:de': 'Value'});
|
||||
|
||||
@@ -112,7 +112,7 @@ describe('localized', function() {
|
||||
});
|
||||
|
||||
it('removes the tag when the value is emptied', function() {
|
||||
var localized = localized(field, {});
|
||||
var localized = iD.ui.fields.localized(field, {});
|
||||
selection.call(localized);
|
||||
localized.tags({'name:de': 'Value'});
|
||||
|
||||
|
||||
@@ -38,9 +38,8 @@ describe('wikipedia', function() {
|
||||
context.selectedIDs.restore();
|
||||
});
|
||||
|
||||
|
||||
it('recognizes lang:title format', function() {
|
||||
var wikipedia = wikipedia(field, context);
|
||||
var wikipedia = iD.ui.fields.wikipedia(field, context);
|
||||
selection.call(wikipedia);
|
||||
wikipedia.tags({wikipedia: 'en:Title'});
|
||||
expect(selection.selectAll('.wiki-lang').value()).to.equal('English');
|
||||
@@ -49,7 +48,7 @@ describe('wikipedia', function() {
|
||||
});
|
||||
|
||||
it('sets language, value, wikidata', function() {
|
||||
var wikipedia = wikipedia(field, context).entity(entity);
|
||||
var wikipedia = iD.ui.fields.wikipedia(field, context).entity(entity);
|
||||
wikipedia.on('change', changeTags);
|
||||
selection.call(wikipedia);
|
||||
|
||||
@@ -74,7 +73,7 @@ describe('wikipedia', function() {
|
||||
});
|
||||
|
||||
it('recognizes pasted URLs', function() {
|
||||
var wikipedia = wikipedia(field, context).entity(entity);
|
||||
var wikipedia = iD.ui.fields.wikipedia(field, context).entity(entity);
|
||||
wikipedia.on('change', changeTags);
|
||||
selection.call(wikipedia);
|
||||
|
||||
@@ -85,10 +84,10 @@ describe('wikipedia', function() {
|
||||
});
|
||||
|
||||
it('preserves existing language', function() {
|
||||
selection.call(wikipedia(field, context));
|
||||
selection.call(iD.ui.fields.wikipedia(field, context));
|
||||
selection.selectAll('.wiki-lang').value('Deutsch');
|
||||
|
||||
var wikipedia = wikipedia(field, context);
|
||||
var wikipedia = iD.ui.fields.wikipedia(field, context);
|
||||
selection.call(wikipedia);
|
||||
wikipedia.tags({});
|
||||
|
||||
@@ -96,7 +95,7 @@ describe('wikipedia', function() {
|
||||
});
|
||||
|
||||
it('does not set delayed wikidata tag if wikipedia field has changed', function(done) {
|
||||
var wikipedia = wikipedia(field, context).entity(entity);
|
||||
var wikipedia = iD.ui.fields.wikipedia(field, context).entity(entity);
|
||||
wikipedia.on('change', changeTags);
|
||||
selection.call(wikipedia);
|
||||
wikiDelay = 20;
|
||||
@@ -127,7 +126,7 @@ describe('wikipedia', function() {
|
||||
});
|
||||
|
||||
it('does not set delayed wikidata tag if selected entity has changed', function(done) {
|
||||
var wikipedia = wikipedia(field, context).entity(entity);
|
||||
var wikipedia = iD.ui.fields.wikipedia(field, context).entity(entity);
|
||||
wikipedia.on('change', changeTags);
|
||||
selection.call(wikipedia);
|
||||
wikiDelay = 20;
|
||||
|
||||
Reference in New Issue
Block a user