Down to 7 test failures

This commit is contained in:
Tom MacWright
2016-09-06 11:16:47 -04:00
parent fcb2c3df58
commit 6bfe6a8640
6 changed files with 12 additions and 11 deletions

View File

@@ -1,5 +1,4 @@
import { rebind } from '../../modules/util/rebind';
import 'd3-selection-multi';
import * as d3 from 'd3';
export function d3combobox() {
@@ -115,7 +114,9 @@ export function d3combobox() {
break;
// tab
case 9:
container.selectAll('a.selected').each(event.accept);
container.selectAll('a.selected').each(function (d) {
event.call('accept', this, d);
});
break;
// return
case 13:
@@ -143,7 +144,9 @@ export function d3combobox() {
break;
// return
case 13:
container.selectAll('a.selected').each(event.accept);
container.selectAll('a.selected').each(function (d) {
event.call('accept', this, d);
});
hide();
break;
}
@@ -253,7 +256,7 @@ export function d3combobox() {
input
.property('value', d.value)
.trigger('change');
event.accept(d);
event.call('accept', this, d);
hide();
}
};

View File

@@ -53,9 +53,9 @@ export function RawTagEditor(context) {
$newTag.enter()
.append('button')
.attr('class', 'add-tag')
.call(Icon('#icon-plus', 'light'));
$newTag.on('click', addTag);
.call(Icon('#icon-plus', 'light'))
.merge($newTag)
.on('click', addTag);
var $items = $list.selectAll('li')
.data(entries, function(d) { return d.key; });

View File

@@ -1,5 +1,4 @@
import * as d3 from 'd3';
import 'd3-selection-multi';
import { getDimensions } from './dimensions';
import { rebind } from './rebind';
import { Toggle } from '../ui/toggle';

View File

@@ -1,6 +1,5 @@
import * as d3 from 'd3';
import { functor } from './index';
import 'd3-selection-multi';
export function tooltip() {
var tooltip = function(selection) {

View File

@@ -24,7 +24,6 @@
],
"license": "ISC",
"dependencies": {
"d3-selection-multi": "1.0.0",
"diacritics": "1.2.3",
"lodash": "4.13.1",
"marked": "0.3.6",

View File

@@ -37,8 +37,9 @@ describe('iD.ui.RawTagEditor', function() {
});
it('adds tags when clicking the add button', function (done) {
iD.util.triggerEvent(element.selectAll('button.add-tag'), 'click');
happen.click(element.selectAll('button.add-tag').node());
setTimeout(function() {
console.log(element.select('.tag-list').selectAll('input').nodes());
expect(element.select('.tag-list').selectAll('input').nodes()[2].value).to.be.empty;
expect(element.select('.tag-list').selectAll('input').nodes()[3].value).to.be.empty;
done();