aurelia / testing

Simplifies the testing of UI components by providing an elegant, fluent interface for arranging test setups along with a number of runtime debug/test helpers.
MIT License
40 stars 27 forks source link

Package aurelia-validation not supported? #45

Closed altenstedt closed 7 years ago

altenstedt commented 7 years ago

I'm submitting a feature request

Current behavior: Potentially unhandled rejection [1] Error: No BindingBehavior named "validate" was found!

Expected/desired behavior:

I have a view that I use the aurelia-validation package, v0.13.1 Bindings are using the "& validate" syntax. When running tests, I get a an error saying that binding behavior "validate" was not found.

Is it possible to use the aurelia-testing package to test views that use the aurelia-validation package?

EisenbergEffect commented 7 years ago

@jdanyow Thoughts?

jdanyow commented 7 years ago

The validation library's own test suite uses aurelia-testing to test itself. It should work. Did you call .plugin('aurelia-validation') in your test?

EisenbergEffect commented 7 years ago

Seems like a setup issue. Closing for now but we can assist the OP if he has further issues.

altenstedt commented 7 years ago

I did not call .plugin() in my tests!

Thanks also for the pointer to aurelia-validation library's own test suite. That code helped me a lot, understanding how to use aurelia-validation for scenarios that are a little more complex than the ones covered in the documenation.