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
1 answer

ember-cli-mirage and babel error

I am following this tutorial: https://guides.emberjs.com/v2.8.0/tutorial/installing-addons/ and when i get to adding ember-cli-mirage it comes up with a build error and wont load the app: Richards-MacBook-Air:super-rentals rpt$ ember s WARNING:…
R.Thompson
  • 141
  • 1
  • 12
1
vote
1 answer

Include Property In Object Relationship in Ember

How can I return all the fields regarding to a relation in Ember ? I'm using JSONAPI but only ID and type are on the relation.
andrefurquin
  • 502
  • 6
  • 17
1
vote
1 answer

Mirage responds 404 on acceptances tests

I've been struggling with mirage for the past few days, and still haven't come up with a solution. Even with a very simplified configuration (see below), mirage responds with a 404 error code whenever it is called within acceptance tests. The calls…
1
vote
0 answers

Ember Mirage: route answered only if debugger is ran

I'm facing a weird issue with Ember mirage. I try to use it inside an integration test. The code looks like this: moduleForComponent('editors/steps/call-handler', 'Integration | Component | editors/steps/call handler', { integration: true, …
Vincent
  • 620
  • 7
  • 19
1
vote
1 answer

Can't get relationships with Ember Mirage

I'm currently writing tests for my App written with EmberJS. I'm using Mirage. I have the two following models: mirage/models/paperwork.js export default Model.extend({ customer: belongsTo('customer'), paperwork_products:…
Seybol
  • 142
  • 1
  • 11
1
vote
1 answer

Not possible to use shorthand route handlers if RestSerializer is used? (ember-cli-mirage)

I set up a simple Ember Twiddle to show you my error that is occurring when trying to update a model. It's considerable that I'm using ember-cli-mirage for mocking the data. According to the docs, I created a shorthand route that should handle the…
1
vote
1 answer

Ember.js + Mirage: pulling a mocked relationship in integration test

I have a component that makes use of this.get('model.property'), and it works as intended. For my integration tests I'm using Mirage, which has worked for all my other tests (integration tests included), however when I test this specific component I…
finferflu
  • 1,368
  • 2
  • 11
  • 28
1
vote
0 answers

Switching from .findall() to .query() breaks integration testing

I have a component that calls something like: this.get('store') .findAll('calendar-event') .then((data) => { // do stuff }); However, when I replace findAll() with query() it breaks my integration testing. this.get('store') …
thornomad
  • 6,707
  • 10
  • 53
  • 78
1
vote
2 answers

EmberJS with Mirage not fully populating the record

I have an Ember model set up with mirage and a serializer. When I added some new fields to the model, they never get populated despite being in the payload: serializers/application.js .... normalizeArrayResponse(store, primaryModelClass, payload,…
rickyduck
  • 4,030
  • 14
  • 58
  • 93
1
vote
1 answer

ember-cli-mirage response headers are missing from XHR object

Trying to understand the inconsistency in the response between using my api vs ember-cli-mirage. I have a handler waiting for a response for a POST request to authenticate a user. The expected parameters for the handler are response, status and…
Tom Doe
  • 866
  • 1
  • 13
  • 22
1
vote
1 answer

Unable to modify Ember mirage fixture from within acceptance test

I have a fixture create which looks somewhat like this. // mirage/fixtures/people.js export default { 'people': [ { 'id': 1, 'name': 'Ram', }, { 'id': 2, 'name': 'Raja', …
siwalikm
  • 1,792
  • 2
  • 16
  • 20
1
vote
0 answers

[Ember][Test][Model] How to test a model aware component

I'm quite new to the ember community, and I have created a component that generates its content base on a given DS.Model object : // templates/test.hbs {{my-component model=model.model modelName=model.modelName}} // routes/test.js import…
1
vote
0 answers

Ember tutorial - Server not starting after installing ember-cli-mirage

Following along with the ember tutorial and got to installing ember-cli-mirage here. After I install the add-on the server will not start. I get to "Serving on http://localhost:4200/" and then it just hangs there. When I try to kill the server…
Michael
  • 519
  • 4
  • 14
1
vote
0 answers

How to use angular-filemanager addon in Ember

I installed angular-filemanager with bower install angular-filemanager --save and imported the necessary dependencies in ember-cli-build.js. app.import('bower_components/angular/angular.js'); …
1
vote
1 answer

relative image source ember js

i have a problem with assets path in emberjs(ember-cli). I have 2 routes: index and article route, the path for index route is just a / and the path for the article route is article/:article_id router.js Router.map(function() { …
KarimS
  • 3,812
  • 9
  • 41
  • 64