ember-app-kit

How to implement Ember-Validations in Ember-App-Kit(EAK)

♀尐吖头ヾ 提交于 2019-12-13 17:24:57
问题 I have a ember-app-kit application. For the form I am using ember default views. But for form validations I have came across with this lib which everyone highly recommends. Ember Validations By Docyard . But I am not sure how to implement the same with my eak set-up. Questions that I have: 1. Where should I add validations ? 2. What to declare when defining validations? 3. Errors how to show them on focus out or even on submit button ? Say for example I have a sign up form and I want to

api-stubs failing when running tests with testem in ember-app-kit

二次信任 提交于 2019-12-11 03:48:56
问题 I am trying to make use of the api-stubs provided in ember-app-kit for testing. The stubs work correctly when I view the site in the browser, and when I run the tests by visting /tests in the browser. However, when I run the tests from the command line with testem (by running grunt test:server ) the tests fail as the stub data isn't returned. You can find a minimal example demonstrating the problem here: https://github.com/tomclose/minimal_eak_test_stub_problem, created from the most recent

Adding firebase & emberfire dependencies to an ember.js app (ember-cli)

江枫思渺然 提交于 2019-12-10 18:11:30
问题 I'm an emberjs begginer and I have been searching how to add the "firebase" and "emberfire" dependencies to my ember application that I created using ember-cli. I used bower to install these 2 dependencies but I get this error: Firebase is not defined ReferenceError: Firebase is not defined at eval (app/adapters/application.js:6:23) at requireModule (loader.js:54:29) at resolveOther (ember-resolver.js:158:20) at superWrapper (ember.js:1267:16) at Ember.DefaultResolver.extend.resolve (ember

Testing Ember Simple Auth in Ember App Kit with sinon

天涯浪子 提交于 2019-12-07 20:00:35
问题 I would like to mock server login responses when testing Ember Simple Auth in my Ember App Kit application. However, with the following code I get an opaque error 'Unexpected end of input' when the click action is called on the visit function : var App; module('Acceptances - SignIn', { setup: function(){ App = startApp(); this.xhr = sinon.useFakeXMLHttpRequest(); this.server = sinon.fakeServer.create(); this.server.autoRespond = true; sinon.spy(Ember.$, 'ajax'); this.server.respondWith('POST'

Ember App Kit with ember data

假如想象 提交于 2019-12-07 04:51:32
问题 I'm trying to start a new project with ember app kit and ember data using ES6. I've managed to create a store using the following code in adapter.js var ApplicationAdapter = DS.FixtureAdapter.extend(); export default ApplicationAdapter; However, I'm failing to create a model and access it. In models/account.js I have this var Account = DS.Model.extend({ name: DS.attr('string') }); Account.FIXTURES = [ { 'id': 1, 'name': 'Acc 1' }, { 'id': 2, 'name': 'Acc 2' } ] export default Account; and in

Testing Ember Simple Auth in Ember App Kit with sinon

十年热恋 提交于 2019-12-06 14:00:07
I would like to mock server login responses when testing Ember Simple Auth in my Ember App Kit application. However, with the following code I get an opaque error 'Unexpected end of input' when the click action is called on the visit function : var App; module('Acceptances - SignIn', { setup: function(){ App = startApp(); this.xhr = sinon.useFakeXMLHttpRequest(); this.server = sinon.fakeServer.create(); this.server.autoRespond = true; sinon.spy(Ember.$, 'ajax'); this.server.respondWith('POST', '/oauth/token', [ 200, { 'Content-Type': 'application/json' }, '{"access_token":"secret token 2!",

Ember App Kit with ember data

笑着哭i 提交于 2019-12-05 10:37:50
I'm trying to start a new project with ember app kit and ember data using ES6. I've managed to create a store using the following code in adapter.js var ApplicationAdapter = DS.FixtureAdapter.extend(); export default ApplicationAdapter; However, I'm failing to create a model and access it. In models/account.js I have this var Account = DS.Model.extend({ name: DS.attr('string') }); Account.FIXTURES = [ { 'id': 1, 'name': 'Acc 1' }, { 'id': 2, 'name': 'Acc 2' } ] export default Account; and in my routes/accounts.js I have this: var AccountsRoute = Ember.Route.extend({ model: function() { var