File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
3
## development
4
+ - Add test for customization of Leaflet Popup's "autoWidth" option
4
5
5
6
## v0.13.0
6
7
- Update basemaps URL to the new CARTO CDN URL. Thanks, @skgsergio !
7
8
- Editor UI cleanups. Thanks, @matschaffer !
9
+ - Upgrade to jQuery 3.5.1
8
10
9
11
## v0.12.0
10
12
- Add ` formatOmitEmptyValue ` settings parameter to hide ` n/a ` value. Thanks, @iruizr7 !
Original file line number Diff line number Diff line change
1
+ import * as L from './leaflet' ;
2
+
3
+ describe ( 'Leaflet' , ( ) => {
4
+ describe ( 'when creating a popup' , ( ) => {
5
+ it ( 'should have an autoWidth option, defaulting to true' , ( ) => {
6
+ let popup = new L . popup ( ) ;
7
+ popup . _initLayout ( ) ;
8
+ popup . _updateLayout ( ) ;
9
+
10
+ expect ( popup . options . autoWidth ) . toBe ( true ) ;
11
+ expect ( popup . _contentNode . style . width ) . toBe ( popup . options . minWidth + 1 + 'px' ) ;
12
+ } ) ;
13
+
14
+ it ( 'should not compute its width automatically when autoWidth option is false' , ( ) => {
15
+ let popup = new L . popup ( { autoWidth : false } ) ;
16
+ popup . _initLayout ( ) ;
17
+ popup . _updateLayout ( ) ;
18
+
19
+ expect ( popup . options . autoWidth ) . toBe ( false ) ;
20
+ expect ( popup . _contentNode . style . width ) . toBe ( '' ) ;
21
+ } ) ;
22
+ } ) ;
23
+ } ) ;
You can’t perform that action at this time.
0 commit comments