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

Access to mirage internals (db) in development mode?

I know how to use 'db' to work with internal mirage database in tests but I did not found out if it is possible to access internals like 'db' in standard routes. I understand that my app has no knowledge that mirage is used so it might not be…
Marek Grác
  • 743
  • 9
  • 24
0
votes
1 answer

Nginx not getting file available on route through Ember.js

Works on local and github pages but with nginx. Even on nginx I can properly get the json file from the browser, just not within the ember app on nginx. export default Ember.Route.extend({ model: function () { return…
Hillboy
  • 472
  • 6
  • 19
0
votes
2 answers

ember demo ember-cli-mirage doesn't work on server without backend

I'm preparing a demo of my new ember app, temporarily deploying it to a static http server, without a proper backend. I've configured the project to fetch its data from mirage, and it works nicely locally. The problem is that when I upload it to…
Don Giulio
  • 2,946
  • 3
  • 43
  • 82
0
votes
0 answers

Ember acceptance test not recognizing change to dropdown

In my Ember app, there is a dropdown that controls a status field. The status field controls how many columns appear in a table. If the dropdown = Open, there are 14 columns. Otherwise, there are 12. The app behaves fine on this front. I'm trying…
A B
  • 131
  • 1
  • 13
0
votes
1 answer

Failed authentification requests (401 Unauthorized) from mirage always resolves in ember-simple-auth-token

In my Ember app, I have an action for login. login: function(emailAddress, password) { this.get('session').authenticate('authenticator:jwt', { 'identification': emailAddress, 'password': password }).catch((reason) => { …
Marc-François
  • 3,900
  • 3
  • 28
  • 47
0
votes
1 answer

Ember CLI + Mirage: When are objects saved to the store

I'm writing some tests where I create a bunch of objects which rely on each other. My code looks like: let translations = [server.create('translation', { key: 'positive.callRating', value: 'How would you rate your call with…
0
votes
1 answer

Ember allow certain requests to pass mirage to internet

I am using ember-cli-mirage and I want to mock some requests, but allow others to actually call out to the internet. Is there a way to tell mirage requests that match a certain pattern should be ignored and allowed to actually hit the web?
Nick Ellis
  • 1,048
  • 11
  • 24
0
votes
0 answers

How to display nested related model data in Ember

To preface this, I'm new to Ember and using Mirage to mock a JSON-API compliant backend, but I've hit a snag on what I think would be a common scenario. Ideally, I'm looking to create a single view that lists posts and the comments for each post…
ElijahC
  • 1
  • 2
0
votes
3 answers

Ember tests/Mirage not finding DOM elements

I'm trying to do some basic acceptance tests in Ember, using Mirage. I'm using only fixtures at this point to populate the test environment, just to find my feet. When I run ember in the test environment (i.e., with -e test), I can see my app is…
A B
  • 131
  • 1
  • 13
0
votes
1 answer

Ember-Cli-Mirage 404

Just followed the documentation but every time I navigate or call to the url, it returns 404 for me // app/mirage/config.js export default function() { this.get('/api/users', function() { return { users: [ {id: 1, name:…
LYu
  • 2,316
  • 4
  • 21
  • 38
0
votes
3 answers

Ember-cli-mirage not showing any data with get

I am learning Ember and I am getting stuck on making the mock api with ember-cli-mirage. I modified the config file as specified in the ember tutorial as well as on the ember-cli-mirage site, but everytime I hit the endpoint I get nothing. Here is…
Schnaars
  • 47
  • 2
  • 10
0
votes
0 answers

Calling visit() in acceptance test for Ember 2.2.0 times out

New Ember developer coming from a Rails world. Developing my first Ember client side app to interact with a Rails app for our API endpoint. Using Ember 2.2.0, ember-cli, ember-cli-mirage 0.1.11, and PhantomJS 2.0.0, somehow, when calling…
remino
  • 324
  • 2
  • 17
0
votes
1 answer

How to serialize embedded belongsTo relationship

I'm using the master ember-cli-mirage branch to take advantage of active model serializer and relationships support, now i've a fully working example with hasMany relationships, but now given a model User that hasOne Organization i can't figure out…
brayancastrop
  • 381
  • 5
  • 17
0
votes
1 answer

Ember-CLI with Mirage gives me this error : Uncaught TypeError: Cannot read property 'destroyRecord' of undefined

I'm trying to create a simple Ember-CLI app with mirage mock server. I can insert and generate random data in the database but I can't delete a record. My application.hbs

Contacts

{{#each contact in model}} …
splunk
  • 6,435
  • 17
  • 58
  • 105
0
votes
1 answer

ember data 1.13.8 and ember cli mirage confusion

This is my Ember inspector info tab: I am using ember-cli-mirage and I'm facing issue here. I am not able to get belongsTo relationship of a model. When I do car.get('user'), I get a promise in result which gets fullfilled but the value is always…
Rigel
  • 882
  • 1
  • 11
  • 32
1 2 3
11
12