Menu icon Foundation
Foundation Reflow issue

I have a couple of routes in my angularJS application. I am using foundation, karma, jasmine, grunt, bower (used Yeoman). So, in every controller file at the top, i had to write $(document).foundation(‘reflow'); for the foundation components to work correctly.

But, while the application works fine, the unit test cases are throwing the following error: PhantomJS 1.9.8 (Mac OS X) Controller: LoginCtrl should have empty email field FAILED Error: Syntax error, unrecognized expression: [data-'Times New Roman'-abide]

When i comment out the “$(document).foundation(‘reflow’);”, everything works fine with the unit test cases, but, the application wont work (as in the foundation components don’t have event handlers anymore.). Any ideas on how to fix this?

Happens only when i use phantomJS to do the unit test.. Everything runs perfectly for all the browsers.

AngularJSKarmaFoundation Reflowunrecognized expressionPhantomJSphantom

I have a couple of routes in my angularJS application. I am using foundation, karma, jasmine, grunt, bower (used Yeoman). So, in every controller file at the top, i had to write $(document).foundation(‘reflow'); for the foundation components to work correctly.

But, while the application works fine, the unit test cases are throwing the following error: PhantomJS 1.9.8 (Mac OS X) Controller: LoginCtrl should have empty email field FAILED Error: Syntax error, unrecognized expression: [data-'Times New Roman'-abide]

When i comment out the “$(document).foundation(‘reflow’);”, everything works fine with the unit test cases, but, the application wont work (as in the foundation components don’t have event handlers anymore.). Any ideas on how to fix this?

Happens only when i use phantomJS to do the unit test.. Everything runs perfectly for all the browsers.

Rafi Benkual almost 5 years ago

Not sure what the conflict is but in F4S you could call reflow individually like
$(document).foundation('orbit', 'reflow');

Arya Reddy almost 5 years ago

Firstly, thank you for the response.

I actually tried that as well.. I got the same exact error. :(