Questions tagged [mockjax]

jQuery Mockjax provides request/response mocking for ajax requests with jQuery and provides all standard behaviors in the request/response flow.

jQuery Mockjax provides request/response mocking for ajax requests with jQuery and provides all standard behaviors in the request/response flow.

github page

73 questions
0
votes
1 answer

Ember data sideloaded mockjax call

I try to model an ajax call via mockjax for ember data. my models: App.Service = DS.Model.extend({ name: DS.attr('string'), service_prices: DS.hasMany('servicePrice') }); App.ServicePrice = DS.Model.extend({ unit_price: DS.attr('number'), …
user3568719
  • 1,036
  • 15
  • 33
0
votes
0 answers

JSON datatype and text issue from jQuery ajax calls

I am making two ajax calls in one page via jquery. First one is for autocomplete in jquery mockjax and second one is to get listing data.Both of them conflect with return data. Here is for autocomple $.mockjax({ url: '*', responseTime:…
user3244721
  • 714
  • 2
  • 11
  • 29
0
votes
1 answer

Emberjs save record Mockjax

I want to save a record and add to an existing list in emberjs. I use two forms to simulate multiple models with the same property. But the main focus is on the 2nd one with books. http://jsbin.com/pexolude/46 I use books: store.find('book',{})…
user3568719
  • 1,036
  • 15
  • 33
0
votes
1 answer

mockjax with Jquery post

I have mockjax for auto complete and it is working great.I have no issue with mockjax and do not want to change it. Here is its code $.mockjax({ url: '*', responseTime: 2000, response: function (settings) { var query =…
user3244721
  • 714
  • 2
  • 11
  • 29
0
votes
1 answer

Mockjax not working when contentType is specified in the request

I am attempting to test some AJAX-related code with QUnit and jQuery Mockjax, and have run into a problem that Mockjax always appears to return null when the request contentType is modified. The working JS code: QUnit.asyncTest('$.ajax POST',…
Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
0
votes
1 answer

Issue with mocking ajax request

I am writing a test for webclient viewmodel in Qunit and used Mockjax for moking ajax request, but it seems i am doing something wrong while moking, please help me to solve the following problem. function WebmailViewModel() { // Data var…
Debu
  • 3
  • 2
0
votes
2 answers

mockjax loader - stop from running for specific function

I am making use of Jonathan Sampson's answer for my jquery busy loader. it works 100% and detects any jquery posting or the like and shows the loader. my problem is that most times I want the user to wait when I fetch info from the database so happy…
Smudger
  • 10,451
  • 29
  • 104
  • 179
0
votes
1 answer

Does mockjax could capture all ajax calls?

I am planning to use Mockjax for one of my offline applications. Will Mockjax capture the ajax calls made even by extjs or other javascript libarires?
lsiva
  • 473
  • 1
  • 7
  • 16
0
votes
1 answer

Is it possible to make mockjax trigger a $.ajaxPrefilter?

I just discovered the mockjax library, and it seems almost perfect for my testing needs. I say "almost", because there's one thing I can't seem to simulate: $.ajaxPrefilter handlers. Normally in jQuery you can specify: $.ajaxPrefilter(function() { …
machineghost
  • 33,529
  • 30
  • 159
  • 234
0
votes
3 answers

ember-simple-auth qunit test with jquery mockjax

I use ember-simple-auth within my application. For my test I use QUnit together with jquery-mockjax. But I didn't get my test, login with correct credentials, to work with a mocked response. If I didn't mock, the test below works. The mocked…
kunerd
  • 1,076
  • 10
  • 25
0
votes
1 answer

I'm getting null response from mockjax

I have this: $.ajax({ url: '/autocomplete', type: 'GET', dataType: 'json', success: function(data) { alert(data); } }); and trying to mock it with: $.mockjax({ url: '/autocomplete', …
Claudiu
  • 3,700
  • 1
  • 38
  • 35
0
votes
1 answer

Mockjax disturbs X-editable update (AJAX)

$(function(){ //enable / disable $('#enable').click(function() { $('#user .editable').editable('http://domain.com/update.php'); }); //modify buttons style …
Redzwan Latif
  • 886
  • 3
  • 14
  • 38
0
votes
1 answer

Why does mockjax return an altered response to my Ajax consumer?

I'm using mockjax to simulate an Ajax call, but I'm experiencing that the data received by my Ajax callback is different from what I pass to mockjax (via the 'responseText' parameter). In this example, I've chosen the response to be '14.0', but the…
aknuds1
  • 65,625
  • 67
  • 195
  • 317
1 2 3 4
5