File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,24 @@ describe('auto-check element', function() {
51
51
assert . isFalse ( input . checkValidity ( ) )
52
52
} )
53
53
54
+ it ( 'validates the input element if there is no `src` attribute' , async function ( ) {
55
+ checker . removeAttribute ( 'src' )
56
+ const completeEvent = once ( checker , 'auto-check-complete' )
57
+ triggerChange ( input , 'hub' )
58
+ await completeEvent
59
+ assert . isTrue ( input . checkValidity ( ) )
60
+ checker . src = '/success'
61
+ } )
62
+
63
+ it ( 'validates the input element if there is no `csrf` attribute' , async function ( ) {
64
+ checker . removeAttribute ( 'csrf' )
65
+ const completeEvent = once ( checker , 'auto-check-complete' )
66
+ triggerChange ( input , 'hub' )
67
+ await completeEvent
68
+ assert . isTrue ( input . checkValidity ( ) )
69
+ checker . csrf = 'foo'
70
+ } )
71
+
54
72
it ( 'invalidates input request is in-flight' , async function ( ) {
55
73
triggerChange ( input , 'hub' )
56
74
await once ( checker , 'loadstart' )
You can’t perform that action at this time.
0 commit comments