Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use latest ol6 #715

Merged
merged 2 commits into from
Aug 25, 2022
Merged

Use latest ol6 #715

merged 2 commits into from
Aug 25, 2022

Conversation

buehner
Copy link
Contributor

@buehner buehner commented Aug 25, 2022

@simonseyock
Copy link
Member

Could you look into why the test is failing?

@marcjansen
Copy link
Member

marcjansen commented Aug 25, 2022

            var store;
            var map;
            var layer;
            beforeEach(function() {
                layer = new ol.layer.Vector();
                var layer2 = new ol.layer.Vector();
                map = new ol.Map({
                    layers: [layer, layer2]
                });
                store = Ext.create('GeoExt.data.store.Layers', {map: map});
            });

            it('unbinds events on destroy store', function() {
                store.destroy();
                expect(store.map).to.be(null);
                // exemplary check "remove" event to ensure the events are
                // unregistered
                expect(function() {
                    map.removeLayer(layer);
                }).not.to.throwException();
                // map layers remain untouched
                expect(map.getLayers().getLength()).to.be(1);
                // store is empty now
                expect(store.getCount()).to.be(0);
            });

This is the test that fails in both browsers. Unexpectedly map.removeLayer(layer); throws an exception, and map.getLayers().getLength() is 2 not as in the test expected 1.

Hmm. My expectation would be that map.getLayers().getLength() is a follow up error, since the removal hasn't worked. The test itself though is a bit pointless.

@buehner buehner merged commit eaa57aa into master Aug 25, 2022
@marcjansen
Copy link
Member

Nice find, friends.

@marcjansen marcjansen deleted the latest-ol6 branch August 25, 2022 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants