@@ -3,43 +3,43 @@ import { html, fixture, assert } from '@open-wc/testing';
33import * as EventHandlers from '@practical-computer/error-handling/event-handlers' ;
44
55suite ( 'Event Handlers' , async ( ) => {
6- test ( `liveInputValidationEventHandler : does nothing if no data-live -validation` , async ( ) => {
6+ test ( `inputValidationEventHandler : does nothing if no data-validation` , async ( ) => {
77 const input = await fixture ( html `
88 < input type ="email " required >
99 ` )
1010
11- input . addEventListener ( `test-event` , EventHandlers . liveInputValidationEventHandler )
11+ input . addEventListener ( `test-event` , EventHandlers . inputValidationEventHandler )
1212
1313 input . dispatchEvent ( new CustomEvent ( `test-event` ) )
1414
1515 assert . equal ( false , input . hasAttribute ( `aria-invalid` ) )
1616 } )
1717
18- test ( `liveInputValidationEventHandler : fires if data-live- validation` , async ( ) => {
18+ test ( `inputValidationEventHandler : fires if data-validation="input" ` , async ( ) => {
1919 const input = await fixture ( html `
20- < input type ="email " required data-live- validation >
20+ < input type ="email " required data-validation =" input " >
2121 ` )
2222
23- input . addEventListener ( `test-event` , EventHandlers . liveInputValidationEventHandler )
23+ input . addEventListener ( `test-event` , EventHandlers . inputValidationEventHandler )
2424
2525 input . dispatchEvent ( new CustomEvent ( `test-event` ) )
2626
2727 assert . equal ( "true" , input . getAttribute ( `aria-invalid` ) )
2828 } )
2929
30- test ( `liveInputValidationEventHandler : does nothing if data-live- validation but data- skip-validation ` , async ( ) => {
30+ test ( `inputValidationEventHandler : does nothing if data-validation=" skip" ` , async ( ) => {
3131 const input = await fixture ( html `
32- < input type ="email " required data-live- validation data- skip-validation >
32+ < input type ="email " required data-validation =" skip " >
3333 ` )
3434
35- input . addEventListener ( `test-event` , EventHandlers . liveInputValidationEventHandler )
35+ input . addEventListener ( `test-event` , EventHandlers . inputValidationEventHandler )
3636
3737 input . dispatchEvent ( new CustomEvent ( `test-event` ) )
3838
3939 assert . equal ( false , input . hasAttribute ( `aria-invalid` ) )
4040 } )
4141
42- test ( `focusoutValidationEventHandler: does nothing if no data-focusout- validation` , async ( ) => {
42+ test ( `focusoutValidationEventHandler: does nothing if no data-validation="input" ` , async ( ) => {
4343 const input = await fixture ( html `
4444 < input type ="email " required >
4545 ` )
@@ -51,9 +51,9 @@ suite('Event Handlers', async () => {
5151 assert . equal ( false , input . hasAttribute ( `aria-invalid` ) )
5252 } )
5353
54- test ( `focusoutValidationEventHandler: fires if data-focusout- validation-validation ` , async ( ) => {
54+ test ( `focusoutValidationEventHandler: fires if data-validation="focusout" ` , async ( ) => {
5555 const input = await fixture ( html `
56- < input type ="email " required data-focusout- validation >
56+ < input type ="email " required data-validation =" focusout " >
5757 ` )
5858
5959 input . addEventListener ( `test-event` , EventHandlers . focusoutValidationEventHandler )
@@ -63,9 +63,9 @@ suite('Event Handlers', async () => {
6363 assert . equal ( "true" , input . getAttribute ( `aria-invalid` ) )
6464 } )
6565
66- test ( `focusoutValidationEventHandler: does nothing if data-focusout- validation but data- skip-validation ` , async ( ) => {
66+ test ( `focusoutValidationEventHandler: does nothing if data-validation=" skip" ` , async ( ) => {
6767 const input = await fixture ( html `
68- < input type ="email " required data-focusout- validation data- skip-validation >
68+ < input type ="email " required data-validation =" skip " >
6969 ` )
7070
7171 input . addEventListener ( `test-event` , EventHandlers . focusoutValidationEventHandler )
0 commit comments