HuddleEng / PhantomCSS

Visual/CSS regression testing with PhantomJS
MIT License
4.72k stars 259 forks source link

Screenshot sorting #105

Closed chris-dura closed 9 years ago

chris-dura commented 9 years ago

I think it's very helpful to have my screenshots sorted in the order that they're actually taken. PhantomCSS does this by default by creating screenshot_0.png, e.g.:

screenshot_0.png
screenshot_1.png
screenshot_2.png

However, I also agree with the best practice of naming my screenshots, but more often then not this jumbles them up into a less than ideal order...

awesome_1.png
component_2.png
my_0.png

It would be nice to have an option to use a prefix on the screenshot names, instead of a suffix.

0_my.png
1_awesome.png
2_component.png
jamescryer commented 9 years ago

I agree, this was be a nice feature for some. Though you override the fileNameGetter method to achieve what you want,

I'll accept a PR on the new prefix/suffix option