1
- /* global chai */
1
+ /* global chai, scriptCount */
2
2
3
3
'use strict' ;
4
4
@@ -39,7 +39,7 @@ describe('form', function() {
39
39
40
40
it ( '"action" and "method" form attributes' , function ( ) {
41
41
var f = $ ( '#form1' ) ;
42
- assert . strictEqual ( f . attr ( 'action' ) , 'text.php ' , 'form "action"' ) ;
42
+ assert . strictEqual ( f . attr ( 'action' ) , 'ajax/ text.html ' , 'form "action"' ) ;
43
43
assert . strictEqual ( f . attr ( 'method' ) , 'get' , 'form "method"' ) ;
44
44
} ) ;
45
45
@@ -212,7 +212,6 @@ describe('form', function() {
212
212
assert . ok ( ! el . checked , 'success: ' + el . checked ) ;
213
213
} ) ;
214
214
215
-
216
215
// test clearForm
217
216
it ( 'clearForm (radio)' , function ( ) {
218
217
var el = $ ( '#form1 input:radio:checked' ) [ 0 ] ;
@@ -283,7 +282,7 @@ describe('form', function() {
283
282
284
283
var opts = {
285
284
target : '#targetDiv' ,
286
- url : 'doc-with-scripts.html?' + new Date ( ) . getTime ( ) ,
285
+ url : 'ajax/ doc-with-scripts.html?' + new Date ( ) . getTime ( ) ,
287
286
success : function ( responseText ) { // post-callback
288
287
assert . ok ( true , 'success-callback' ) ;
289
288
assert . ok ( $ ( '#targetDiv' ) . text ( ) . match ( 'Lorem ipsum' ) , 'targetDiv updated' ) ;
@@ -367,7 +366,7 @@ describe('form', function() {
367
366
// stop();
368
367
369
368
var opts = {
370
- url : 'json.json' ,
369
+ url : 'ajax/ json.json' ,
371
370
dataType : 'json' ,
372
371
success : function ( data , statusText ) { // post-submit callback
373
372
// assert that the json data was evaluated
@@ -387,7 +386,7 @@ describe('form', function() {
387
386
// stop();
388
387
389
388
var opts = {
390
- url : 'script.txt?' + new Date ( ) . getTime ( ) , // don't let ie cache it
389
+ url : 'ajax/ script.txt?' + new Date ( ) . getTime ( ) , // don't let ie cache it
391
390
dataType : 'script' ,
392
391
success : function ( responseText , statusText ) { // post-submit callback
393
392
assert . ok ( typeof formScriptTest == 'function' , 'script evaluated' ) ;
@@ -405,7 +404,7 @@ describe('form', function() {
405
404
// stop();
406
405
407
406
var opts = {
408
- url : 'test.xml' ,
407
+ url : 'ajax/ test.xml' ,
409
408
dataType : 'xml' ,
410
409
success : function ( responseXML , statusText ) { // post-submit callback
411
410
assert . ok ( typeof responseXML == 'object' , 'data type xml' ) ;
@@ -471,7 +470,7 @@ describe('form', function() {
471
470
} ,
472
471
// url and method must be provided for a pseudo form since they can
473
472
// not be extracted from the markup
474
- url : 'text.php ' ,
473
+ url : 'ajax/ text.html ' ,
475
474
type : 'post'
476
475
} ;
477
476
@@ -490,7 +489,7 @@ describe('form', function() {
490
489
assert . ok ( data . name == 'jquery-test' , 'evaled response' ) ;
491
490
// start();
492
491
} ,
493
- url : 'json.txt'
492
+ url : 'ajax/ json.txt'
494
493
} ;
495
494
496
495
// expect(2);
@@ -617,7 +616,7 @@ describe('form', function() {
617
616
// stop();
618
617
619
618
var opts = {
620
- url : 'bogus.php ' ,
619
+ url : 'ajax/404.html ' ,
621
620
error : function ( ) {
622
621
assert . ok ( true , 'error-callback' ) ;
623
622
// start();
0 commit comments