Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/queuepro/node_modules/gmaps/test/spec/ drwxrwxr-x | |
| Viewing file: Select action/file-type: describe('Creating custom map controls', function () {
var map;
beforeEach(function() {
map = map || new GMaps({
el : '#basic-map',
lat: -12.0433,
lng: -77.0283,
zoom: 12
});
});
it('should add default styles for the control', function () {
map.addControl({
position: 'top_right',
content: 'Geolocate'
});
expect(map.controls[0].position).toEqual(google.maps.ControlPosition.TOP_RIGHT);
expect(map.controls[0].style.fontFamily).not.toEqual('');
});
it('should leave off default styles if requested', function () {
map.addControl({
position: 'top_right',
disableDefaultStyles: true,
content: '<i class="icon"></i>'
});
expect(map.controls[1].position).toEqual(google.maps.ControlPosition.TOP_RIGHT);
expect(map.map.controls[google.maps.ControlPosition.TOP_RIGHT].length).toEqual(2);
expect(map.controls[1].style.fontFamily).toEqual('');
});
it('should remove control', function () {
var control = map.controls[0];
map.removeControl(control);
expect(map.controls.length).toEqual(1);
expect(map.map.controls[google.maps.ControlPosition.TOP_RIGHT].length).toEqual(1);
expect(map.controls[0]).not.toEqual(control);
});
}); |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0055 ]-- |