File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,20 @@ describe('remote-input', function() {
38
38
input . focus ( )
39
39
} )
40
40
41
+ it ( 'repects param attribute' , function ( done ) {
42
+ const remoteInput = document . querySelector ( 'remote-input' )
43
+ const input = document . querySelector ( 'input' )
44
+ const results = document . querySelector ( '#results' )
45
+ remoteInput . setAttribute ( 'param' , 'robot' )
46
+ assert . equal ( results . innerHTML , '' )
47
+ remoteInput . addEventListener ( 'loadend' , function ( ) {
48
+ assert . equal ( results . querySelector ( 'ol' ) . getAttribute ( 'data-src' ) , '/results?robot=test' )
49
+ done ( )
50
+ } )
51
+ input . value = 'test'
52
+ input . focus ( )
53
+ } )
54
+
41
55
it ( 'loads content again after src is changed' , function ( done ) {
42
56
const remoteInput = document . querySelector ( 'remote-input' )
43
57
const input = document . querySelector ( 'input' )
You can’t perform that action at this time.
0 commit comments