Questions tagged [ember-cli-mirage]

Ember CLI Mirage is a mock server that lets you easily mock a JSON API.

Ember CLI Mirage is a mock server that lets you easily mock a JSON API. Factories and fixtures can be defined. It allows for pass-through to an existing API, making it useful for developing new features.

See the homepage, and on github.

168 questions
1
vote
0 answers

Testing in Ember with Mirage - delete item without dependent items

In my Ember Application you can add, edit and delete events and todos and connect the todos with the events. The backend is a rails application. For testing I use Mirage. The models in Mirage have following relationships: //Mirage event import {…
1
vote
1 answer

ember-cli-mirage error: Nothing returned by handler, but handler exists

In the app I'm working with, we have a GET route that validates a user's email address. If the email is invalid, the server responds with: a 200 status code response headers with Content-Type:application/json; charset=utf-8 and the response data…
Tom Netzband
  • 1,110
  • 1
  • 6
  • 13
1
vote
1 answer

How to pass through `ember-cli-mirage` request to a specific API and Host

I am trying to use passthrough feature of ember-cli-mirage to allow my app to request to different API and Host. export default function() { //window.server = this; //this.namespace = 'api'; this.passthrough('locales/en/translation.json'); …
amesh
  • 1,311
  • 3
  • 21
  • 51
1
vote
1 answer

Is it possible to enable Ember Cli Mirage Scenario for acceptance test

In documentation it shows how to use server global to create models and everything, but it is possible to use scenarios to populate the mock database? Or are we supposed to create objects on the fly?
1
vote
2 answers

EmberJS Mirage 404 error on get /rentals

I'm following tutorial on this page (https://guides.emberjs.com/v2.7.0/tutorial/installing-addons/) until the next tutorial page. (Actually I follow until finished the tutorial.) Everything seems to working fine. ✔ Ember server is serving and…
vee
  • 4,506
  • 5
  • 44
  • 81
1
vote
1 answer

What is the difference between returning a Mirage.Response object vs returning a raw JSON object through Mirage?

I am trying to build an EmberJS test server in the browser. I have an API call to "myApiMethod", from which I am trying to GET a JSON object. While trying to test the response from a specific method I found out that that I can either return a raw…
Tom Mathew
  • 144
  • 1
  • 11
1
vote
1 answer

When does Ember mirage use your real API and when does it use your mock API

Ember mirage simulates your API Server to return "mock" data that can be used to test in your ember app. How do you know when Ember mirage will use your real API and when its using your mock API. How can you turn this on/off?
Arthur Putnam
  • 1,026
  • 1
  • 9
  • 26
1
vote
2 answers

how to do pagination using mirage fake data in emberjs?

I am using mirage for creating fake data. scenario/default.js export default function(server) { server.createList('product', 48); server.loadFixtures(); } Above I am creating 48 products and from controller I am…
murli2308
  • 2,976
  • 4
  • 26
  • 47
1
vote
1 answer

How can I set up an Ember Simple Auth session in dev with data from Mirage?

I want to configure the Ember Simple Auth session to be authenticated for a user generated by Ember CLI Mirage on startup. During testing I can use the Ember Simple Auth authenticateSession() helper, but as far as I can tell, this isn't available…
cbnz
  • 656
  • 1
  • 9
  • 19
1
vote
1 answer

ember-cli-mirage redirects socket.io client, which is injected in mirage

the issue that occurs here, is that, when i connect between sample socekt.io client with this socket.io server by node.js ( just running two terminals and opening socket connection between client and server) I have no problems. But, when I am…
1
vote
1 answer

Unable to map store's response to model - EmberJS

I am trying an ember application where I have installed Mirage and tried to fake the server. I am using a RestAdapter, the model is not getting the data from the response. adapters/application.js import DS from 'ember-data'; export default…
1
vote
2 answers

Cli mirage routes not working in acceptace test

I was trying acceptance test for login page, using cli mirage as mock server. Routes defined in a mirage works fine, when accessing it from application. But when trying it in ember test it returns Mirage: Your Ember app tried to POST…
Kurshith
  • 81
  • 1
  • 7
1
vote
1 answer

ember: handlebars does not satisfy its siblings' peerDependencies

I've just updated ember to 2.4.2: % ember -v version: 2.4.2 node: 5.8.0 os: darwin x64 and when I enter: ember init to re run the blueprint as described here: https://github.com/ember-cli/ember-cli/releases/tag/v2.4.2 I get the following error: …
Don Giulio
  • 2,946
  • 3
  • 43
  • 82
1
vote
2 answers

Introduce momentary delays in ember-cli-mirage

I am using ember-cli-mirage for acceptance tests. For a specific case, I would like to check the behaviour while fetching data over a slow connection. There's a setting in ember-cli-mirage called timing that simulates a delay in the response.…
pablobm
  • 2,026
  • 2
  • 20
  • 30
1
vote
1 answer

Integrating Ember_simple_auth with acceptance tests (using Mirage)

I created a basic test app that uses the OMDb API (The Open Movie Database), and with some help from SO posters everything is working fine. I added ember-simple-auth (version 1.0.0) to the project, and got the dev side of things going. Basically…
A B
  • 131
  • 1
  • 13