PHP Classes

File: public/asset/vendor/jquery-validation/test/aria.js

Recommend this page to a friend!
  Classes of fathurrahman   mnTemplate   public/asset/vendor/jquery-validation/test/aria.js   Download  
File: public/asset/vendor/jquery-validation/test/aria.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: mnTemplate
Route HTTP requests to callback functions
Author: By
Last change:
Date: 1 year ago
Size: 1,346 bytes
 

Contents

Class file image Download
QUnit.module( "aria" ); QUnit.test( "Invalid field adds aria-invalid=true", function( assert ) { var ariaInvalidFirstName = $( "#ariaInvalidFirstName" ), form = $( "#ariaInvalid" ); form.validate( { rules: { ariaInvalidFirstName: "required" } } ); ariaInvalidFirstName.val( "" ); ariaInvalidFirstName.valid(); assert.equal( ariaInvalidFirstName.attr( "aria-invalid" ), "true" ); } ); QUnit.test( "Valid field adds aria-invalid=false", function( assert ) { var ariaInvalidFirstName = $( "#ariaInvalidFirstName" ), form = $( "#ariaInvalid" ); form.validate( { rules: { ariaInvalidFirstName: "required" } } ); ariaInvalidFirstName.val( "not empty" ); ariaInvalidFirstName.valid(); assert.equal( ariaInvalidFirstName.attr( "aria-invalid" ), "false" ); assert.equal( $( "#ariaInvalid [aria-invalid=false]" ).length, 1 ); } ); QUnit.test( "resetForm(): removes all aria-invalid attributes", function( assert ) { var ariaInvalidFirstName = $( "#ariaInvalidFirstName" ), form = $( "#ariaInvalid" ), validator = form.validate( { rules: { ariaInvalidFirstName: "required" } } ); ariaInvalidFirstName.val( "not empty" ); ariaInvalidFirstName.valid(); validator.resetForm(); assert.equal( $( "#ariaInvalid [aria-invalid]" ).length, 0, "resetForm() should remove any aria-invalid attributes" ); } );