Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update jQuery to 1.6.2. Closes #43

  • Loading branch information...
commit 05c14b511a6d2f2efdfc7c790c508de55db5ccd7 1 parent 3ed5d49
@mhemesath mhemesath authored tj committed
Showing with 4,901 additions and 2,163 deletions.
  1. +1 −0  lib/browser.js
  2. +4,883 −2,146 lib/jquery/core.js
  3. +17 −17 test/browser.navigation.test.js
View
1  lib/browser.js
@@ -92,6 +92,7 @@ Browser.prototype.parse = function(html){
}
this.source = html;
this.window = jsdom.jsdom(wrap(html), null, options).createWindow();
+ this.window.navigation = { userAgent: 'node' };
this.jQuery = jQuery.create(this.window);
this.jQuery.browser = this.jQuery.fn.browser = this;
require('./jquery')(this, this.jQuery);
View
7,029 lib/jquery/core.js
4,883 additions, 2,146 deletions not shown
View
34 test/browser.navigation.test.js
@@ -511,31 +511,31 @@ module.exports = {
var browser = tobi.createBrowser(app);
browser.get('/form', function(res, $){
res.should.have.status(200);
- $('[name=user[subscribe]]').should.be.checked;
+ $('[name="user[subscribe]"]').should.be.checked;
browser.uncheck('user[subscribe]');
- $('[name=user[subscribe]]').should.not.be.checked;
+ $('[name="user[subscribe]"]').should.not.be.checked;
done();
});
},
-
+
'test .check(name)': function(done){
var browser = tobi.createBrowser(app);
browser.get('/form', function(res, $){
res.should.have.status(200);
- $('[name=user[agreement]]').should.not.be.checked;
+ $('[name="user[agreement]"]').should.not.be.checked;
browser.check('user[agreement]');
- $('[name=user[agreement]]').should.be.checked;
+ $('[name="user[agreement]"]').should.be.checked;
done();
});
},
-
+
'test .check(css)': function(done){
var browser = tobi.createBrowser(app);
browser.get('/form', function(res, $){
res.should.have.status(200);
- $('[name=user[agreement]]').should.not.be.checked;
- browser.check('[name=user[agreement]]');
- $('[name=user[agreement]]').should.be.checked;
+ $('[name="user[agreement]"]').should.not.be.checked;
+ browser.check('[name="user[agreement]"]');
+ $('[name="user[agreement]"]').should.be.checked;
done();
});
},
@@ -544,9 +544,9 @@ module.exports = {
var browser = tobi.createBrowser(app);
browser.get('/form', function(res, $){
res.should.have.status(200);
- $('[name=user[agreement]]').should.not.be.checked;
+ $('[name="user[agreement]"]').should.not.be.checked;
browser.check('user-agreement');
- $('[name=user[agreement]]').should.be.checked;
+ $('[name="user[agreement]"]').should.be.checked;
done();
});
},
@@ -571,8 +571,8 @@ module.exports = {
var browser = tobi.createBrowser(app);
browser.get('/form', function(res, $){
res.should.have.status(200);
- $('[name=user[name]]').val('tjholowaychuk');
- $('[name=user[email]]').val('tj@vision-media.ca');
+ $('[name="user[name]"]').val('tjholowaychuk');
+ $('[name="user[email]"]').val('tj@vision-media.ca');
$('[type=submit]').click(function(res){
res.body.headers.should.have.property('content-type', 'application/x-www-form-urlencoded');
res.body.body.should.eql({
@@ -675,7 +675,7 @@ module.exports = {
, 'form > #user-email': 'tj@vision-media.ca'
, ':checkbox': true
, 'user[display_signature]': 'No'
- , '[name=user[forum_digest]]': 'daily'
+ , '[name="user[forum_digest]"]': 'daily'
, '#signature': 'TJ Holowaychuk'
})
.click(':submit', function(res){
@@ -700,7 +700,7 @@ module.exports = {
var browser = tobi.createBrowser(app);
browser.get('/form', function(res, $){
res.should.have.status(200);
- $('[name=user[name]]').val('tjholowaychuk');
+ $('[name="user[name]"]').val('tjholowaychuk');
$('#signature').val('Wahoo');
$('form').submit(function(res){
res.body.headers.should.have.property('content-type', 'application/x-www-form-urlencoded');
@@ -723,7 +723,7 @@ module.exports = {
var browser = tobi.createBrowser(app);
browser.get('/form-nested', function(res, $){
res.should.have.status(200);
- $('[name=user[name]]').val('tjholowaychuk');
+ $('[name="user[name]"]').val('tjholowaychuk');
$('#signature').val('Wahoo');
$('form').submit(function(res){
res.body.headers.should.have.property('content-type',
@@ -745,7 +745,7 @@ module.exports = {
var browser = tobi.createBrowser(app);
browser.get('/form', function(res, $){
res.should.have.status(200);
- $('[name=user[name]]').val('tjholowaychuk');
+ $('[name="user[name]"]').val('tjholowaychuk');
$('#signature').val('Wahoo');
browser.submit('user', function(res){
res.body.headers.should.have.property('content-type', 'application/x-www-form-urlencoded');
Please sign in to comment.
Something went wrong with that request. Please try again.