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
2
votes
3 answers

Ember DS.Store.findAll() returns empty collection

Hey I need to modify some records which I get from the DataStore. If I add the following code in my router I can see that the requests get passed to my template, but I can't modify each request of the collection because the collection is empty. …
webpapaya
  • 809
  • 12
  • 21
2
votes
0 answers

How to I simulate facebook login in ember-testing and mock fb graph data

I am writing test for my ember app. I have ember-cli-mirage installed My Acceptance test flow consists of facebook login visit('/'); click('#btn-login'); fillIn('#email',"mark_ourde@tfbnw.net");//label is on fb login popup andThen(function()…
Rigel
  • 882
  • 1
  • 11
  • 32
2
votes
0 answers

ember-cli-migrator "Do not know how to import App" error

I'm migrating a custom made Ember project (I do not use a build system, but actually created my own grunt script). When I run ember-cli-migrate but I'm getting the following error: Git Move Moving templates/users.hbs to app\templates\users.hbs Do…
Dory Zidon
  • 10,497
  • 2
  • 25
  • 39
1
vote
1 answer

Configure Ember CLI Mirage to support liverload for mirage configuration with Embroider

I have an Ember.js application, which uses Embroider and Ember CLI Mirage. Sadly live-reload is not working for Mirage configuration changes. A change to Mirage configuration does not trigger a rebuild. It seems as if mirage/ folder is not…
jelhan
  • 6,149
  • 1
  • 19
  • 35
1
vote
1 answer

ember error this.store.findAll is not a function

hey all im going through the emberjs tutorial and i've run into this issue that i'm unable to resolve. when i try to call the findAll function from store it throws a typeerror and says that findAll is not a function. when i use The this.get() method…
jordan
  • 305
  • 1
  • 7
  • 17
1
vote
0 answers

Multiple polymorphic relationships in Ember (Octane) models and Mirage

In our Rails backend, we have a lot of Concerns server side. For example, several models import an AppointableConcern which allows the resources to be associated with Appointments. Each model can import an unlimited number of Concerns. In our Ember…
Pida
  • 928
  • 9
  • 32
1
vote
0 answers

Mirage Passthrough returns Response Object instead of JSON data returned from network call

I am getting an error: Mirage: Your Ember app tried to GET 'http://localhost:3006/data.json', but there was no route defined to handle this request. Define a route that matches this path in your mirage/config.js file. Did you forget to add your…
Shreya Shah
  • 582
  • 1
  • 4
  • 17
1
vote
1 answer

How to create a object in ember-cli-mirage?

I have a foo model that hasMany bar and bar belongsTo baz. How can I include the creation of baz when a foo is created together with it's bar? Whenver a foo is created a 10 bar must create and a baz is created for each bar On my /factories/foo.js I…
Mikelemuel
  • 378
  • 1
  • 3
  • 15
1
vote
1 answer

Generate jwt web auth tokens in ember-cli-mirage (or any JavaScript) for use in your ember app

I work on an Ember team that implemented djangorestframework-simplejwt for our API security. It's a good API solution, but our mirage user was getting logged out after a period of time and could not log back into our app (for testing, development).…
1
vote
0 answers

ember-simple-auth and Implicit Grant authentication: use authenticateSession test helper

If a User is not authenticated, I redirect him to a corporate login page: https://super-secret-gateway/authorization.oauth2?client_id=XXXX&redirect_uri=http://localhost:4200/callback&response_type=token&scope=profile%20openid Once he is…
belgoros
  • 3,590
  • 7
  • 38
  • 76
1
vote
1 answer

ember data different models for same endpoint

I have an API that doesn't return JSON data in a format that Ember-Data expects. Especially when getting a list of resources versus a single resource. For example, GET /api/widgets/{id} Should return a single widget model that might look like…
1
vote
1 answer

Ember cli mirage: using fixtures in acceptance test

I am trying to use fixtures with my acceptance tests however its causing tests to fail due to duplicate data since fixtures are re-inserted in the mirage DB every test. Is there a way to get around this or remove the fixtures every…
jpoiri
  • 347
  • 1
  • 8
1
vote
0 answers

ember-cli-mirage factory only includes one child

I have my mirage setup with two models and factories like so mirage/models/user.js import { Model, hasMany } from 'ember-cli-mirage'; export default Model.extend({ posts: hasMany() }); mirage/models/post.js import { Model, belongsTo } from…
reggaemahn
  • 6,272
  • 6
  • 34
  • 59
1
vote
0 answers

RangeError: Maximum call stack size exceeded when using ember-cli-mirage

I am having issue using ember-cli-mirage. My instance of mirage is configured to use the RESTSerializer and the EmbeddedRecordsMixin for relationships. I am able to get records with relationship without a problem, however when I save the parent…
jpoiri
  • 347
  • 1
  • 8
1
vote
1 answer

Ember use local JSON file instead of Mirage provided in tutorial

I am new to building websites and all I want to do at this stage is to use local JSON file to retrive data instead of mirage provided in ember tutorial. you have mirage/config.js like this: export default function() { this.namespace = '/api'; …
Xeno
  • 41
  • 7
1 2
3
11 12