File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ < div id ="forceRenderAbove ">
2
+ < label > forceRenderAbove</ label >
3
+ < select >
4
+ < option value ="lorem "> lorem</ option >
5
+ < option value ="ipsum "> ipsum</ option >
6
+ < option value ="dolor "> dolor</ option >
7
+ </ select >
8
+ </ div >
Original file line number Diff line number Diff line change
1
+ /* eslint-env jasmine, jquery */
2
+ /* global loadFixtures */
3
+
4
+ 'use strict' ;
5
+
6
+ describe ( 'options' , function ( ) {
7
+
8
+ beforeEach ( function ( ) {
9
+ jasmine . getFixtures ( ) . fixturesPath = 'base/test/fixtures' ;
10
+ loadFixtures ( 'options.html' ) ;
11
+
12
+ $ ( '#forceRenderAbove select' ) . selectric ( { forceRenderAbove : true } ) ;
13
+ } ) ;
14
+
15
+ it ( 'should always have above class after initial open when using forceRenderAbove option' , function ( ) {
16
+ // initial open
17
+ $ ( '#forceRenderAbove' ) . find ( '.selectric' ) . trigger ( 'click' ) ;
18
+ expect ( $ ( '#forceRenderAbove' ) . find ( '.selectric-wrapper' ) . hasClass ( 'selectric-above' ) ) . toBe ( true ) ;
19
+ // close afterwards
20
+ $ ( '#forceRenderAbove' ) . find ( '.selectric' ) . trigger ( 'click' ) ;
21
+ expect ( $ ( '#forceRenderAbove' ) . find ( '.selectric-wrapper' ) . hasClass ( 'selectric-above' ) ) . toBe ( true ) ;
22
+ } ) ;
23
+
24
+ } ) ;
You can’t perform that action at this time.
0 commit comments