Skip to content

Commit 4e627d9

Browse files
committed
fix updatemenu test
1 parent 5039aa5 commit 4e627d9

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

test/jasmine/tests/updatemenus_test.js

+6-13
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ describe('update menus interaction with other components:', function() {
826826

827827
afterEach(destroyGraphDiv);
828828

829-
it('buttons show be drawn above sliders', function(done) {
829+
it('draws buttons above sliders', function(done) {
830830

831831
Plotly.plot(createGraphDiv(), [{
832832
x: [1, 2, 3],
@@ -869,19 +869,12 @@ describe('update menus interaction with other components:', function() {
869869
})
870870
.then(function() {
871871
var infoLayer = d3.select('g.infolayer');
872-
var containerClassNames = ['slider-container', 'updatemenu-container'];
873-
var list = [];
874-
875-
infoLayer.selectAll('*').each(function() {
876-
var className = d3.select(this).attr('class');
877-
878-
if(containerClassNames.indexOf(className) !== -1) {
879-
list.push(className);
880-
}
881-
});
882-
883-
expect(list).toEqual(containerClassNames);
872+
var menuLayer = d3.select('g.menulayer');
873+
expect(infoLayer.selectAll('.slider-container').size()).toBe(1);
874+
expect(menuLayer.selectAll('.updatemenu-container').size()).toBe(1);
875+
expect(infoLayer.node().nextSibling).toBe(menuLayer.node());
884876
})
877+
.catch(fail)
885878
.then(done);
886879
});
887880
});

0 commit comments

Comments
 (0)