2012-11-08 17:11:43 +01:00
|
|
|
/*global casper*/
|
|
|
|
/*jshint strict:false*/
|
|
|
|
casper.start('tests/site/urls.html', function() {
|
|
|
|
this.clickLabel('raw unicode', 'a');
|
|
|
|
}).then(function() {
|
|
|
|
this.test.assertHttpStatus(200);
|
|
|
|
this.test.assertUrlMatches('Forlì', 'Casper.getCurrentUrl() retrieves a raw unicode URL');
|
|
|
|
this.clickLabel('escaped', 'a');
|
|
|
|
});
|
|
|
|
|
|
|
|
casper.then(function() {
|
|
|
|
this.test.assertHttpStatus(200);
|
|
|
|
this.test.assertUrlMatches('Forlì', 'Casper.getCurrentUrl() retrieves an escaped URL');
|
|
|
|
this.clickLabel('uri encoded', 'a');
|
|
|
|
});
|
|
|
|
|
|
|
|
casper.run(function() {
|
|
|
|
this.test.assertHttpStatus(200);
|
|
|
|
this.test.assertUrlMatches('Forlì', 'Casper.getCurrentUrl() retrieves a decoded URL');
|
2013-03-05 17:10:02 +01:00
|
|
|
this.test.done(6);
|
2012-11-08 17:11:43 +01:00
|
|
|
});
|