mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-25 17:37:49 +02:00
Convert some element ids to classes to avoid collisions when embedding iD
This commit is contained in:
@@ -3,20 +3,20 @@ describe('iD.uiFlash', function () {
|
||||
beforeEach(function() {
|
||||
d3.select('body')
|
||||
.append('div')
|
||||
.attr('id', 'flash-wrap')
|
||||
.attr('class', 'flash-wrap')
|
||||
.append('div')
|
||||
.attr('id', 'footer-wrap');
|
||||
.attr('class', 'map-footer-wrap');
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
d3.select('#flash-wrap')
|
||||
d3.select('.flash-wrap')
|
||||
.remove();
|
||||
});
|
||||
|
||||
it('flash is shown', function() {
|
||||
iD.uiFlash().duration(200)();
|
||||
var flashWrap = d3.selectAll('#flash-wrap');
|
||||
var footerWrap = d3.selectAll('#footer-wrap');
|
||||
var flashWrap = d3.selectAll('.flash-wrap');
|
||||
var footerWrap = d3.selectAll('.map-footer-wrap');
|
||||
expect(flashWrap.classed('footer-show')).to.be.ok;
|
||||
expect(footerWrap.classed('footer-hide')).to.be.ok;
|
||||
});
|
||||
@@ -25,8 +25,8 @@ describe('iD.uiFlash', function () {
|
||||
iD.uiFlash().duration(200)();
|
||||
window.setTimeout(function() {
|
||||
d3.timerFlush();
|
||||
var flashWrap = d3.selectAll('#flash-wrap');
|
||||
var footerWrap = d3.selectAll('#footer-wrap');
|
||||
var flashWrap = d3.selectAll('.flash-wrap');
|
||||
var footerWrap = d3.selectAll('.map-footer-wrap');
|
||||
expect(flashWrap.classed('footer-hide')).to.be.ok;
|
||||
expect(footerWrap.classed('footer-show')).to.be.ok;
|
||||
done();
|
||||
|
||||
Reference in New Issue
Block a user