indexiatech / ember-forms

Smart, Intuitive forms for Ember.js styled with Bootstrap, Multi layouts and Validation support.
http://indexiatech.github.io/ember-forms
Apache License 2.0
218 stars 45 forks source link

Running application test leads to error #87

Closed spruce closed 7 years ago

spruce commented 9 years ago

Hey, first I want to thank you for the great work all of you do on ember-forms.

I started looking at the tests which are auto generated by ember-cli. In one template where I use ember-forms inside a custom component the test fails: First it said cannot locate em-forms component. So I added this needs: ['component:em-form', 'component:em-input', 'component:em-select'] to the testfile. Now the test complains that it can't find some layout/HTMLBars file

component:my-comp: it renders
    ✘ Died on test #2     at http://localhost:7357/assets/test-support.js:2623
        at test (http://localhost:7357/assets/test-support.js:1781)
        at http://localhost:7357/assets/project.js:16998
        at http://localhost:7357/assets/vendor.js:79
        at http://localhost:7357/assets/test-loader.js:29
        at http://localhost:7357/assets/test-loader.js:21
        at http://localhost:7357/assets/test-loader.js:36
        at http://localhost:7357/assets/test-support.js:5382: Assertion Failed: You specified the layoutName components/em-form-group for <(subclass of Ember.Component):ember277>, but it did not exist.

Anything I can do to fix that?

Thanks :)

Versions:

    "jquery": "^1.11.1",
    "ember": "1.11.0-beta.1",
    "ember-data": "1.0.0-beta.15",
    "ember-resolver": "~0.1.11",
    "loader.js": "ember-cli/loader.js#1.0.1",
    "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
    "ember-cli-test-loader": "ember-cli/ember-cli-test-loader#0.1.1",
    "ember-load-initializers": "ember-cli/ember-load-initializers#0.0.2",
    "ember-qunit": "0.2.8",
    "ember-qunit-notifications": "0.0.7",
    "qunit": "~1.17.1",
asaf commented 9 years ago

Hey,

I'm not sure about the state of the tests, I'm pretty sure they stopped working properly while migrating from custom build to Ember CLI Addon,

Actually the error means that it can't find the components/em-form-group template.

Except tests do you have any problem using the component itself?

spruce commented 9 years ago

Hey, No I can use that component in the app itself.

spruce commented 9 years ago

@asaf anything new on the issue?

he9qi commented 9 years ago

@spruce I think what you need is needs: ['template:components/em-form-group'] , you need to specify the template name in your test