Skip to content

Commit

Permalink
updating the ajax test to provide a bit more time for the request
Browse files Browse the repository at this point in the history
  • Loading branch information
anutron committed Oct 15, 2011
1 parent ea7a2fc commit 0c27598
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Tests/Specs/more-behaviors/Delegators/Delegator.Ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ provides: [Delegator.Ajax.Tests]


(function(){

var getDom = function(filter, wrap){
var container = new Element('div[id=container]');
var wrapper = new Element('div[id=wrapper]').inject(container);
Expand Down Expand Up @@ -41,14 +41,14 @@ provides: [Delegator.Ajax.Tests]
describe('Delegator.Ajax (' + action + ')', function(){
it('Should load in ajax: ' + action, function(){
del.trigger('Ajax', link, 'click');
waits(200);
waits(400);
runs(function(){
expect(dom.getElement('#wrapper').get('html')).toBe(results[action]);
});
});
});
});

['injectBottom', 'injectTop', 'replace', 'update', 'injectAfter', 'injectBefore'].each(function(action){
var dom = getDom(action);
var del = new Delegator().attach(dom),
Expand All @@ -57,12 +57,12 @@ provides: [Delegator.Ajax.Tests]
it('Should load in ajax with a filter: ' + action, function(){
link.setData('ajax-filter', 'p');
del.trigger('Ajax', link, 'click');
waits(200);
waits(400);
runs(function(){
expect(dom.getElement('#wrapper').get('html')).toBe(results[action]);
});
});
});
});

})();

0 comments on commit 0c27598

Please sign in to comment.