HuddleEng / PhantomFlow

Describe and visualise user flows through tests with PhantomJS
MIT License
682 stars 60 forks source link

Picture files are not loaded inside a test #20

Closed NiGhTTraX closed 10 years ago

NiGhTTraX commented 10 years ago

I traced it to this function.

First of all, why are you blocking image requests? It doesn't make much sense to block images in visual tests, but maybe I'm missing something here.

If that function is indeed useful, than you should note that the Regex you are using in the first conditional is incorrect:

The second conditional does the right thing.

Check here for more info http://regex101.com/r/cA4hV4/3

I would remove the !data part out of the first conditional and remove the second conditional completely.

Also, the shouldAbort variable you're using here is set to true at the beginning of the file. It is then set to false here but in my debugging sessions I never entered that function.

jamescryer commented 10 years ago

This is code that probably shouldn't have found it's way into PhantomFlow. I had problems with images causing un-timely layout reflows on load where the image didn't have fixed dimensions.

I'll remove it, sorry about that, symptom of evolutionary code.