DEV Community

Testing your Jekyll Website with Capybara

Philipp Hansch on March 26, 2017

Cross posted from my personal blog: Link Even when it is just a static website like this one, it is always good to know that the most important th...
Collapse
 
mrwesdunn profile image
Wes Dunn

Fantastic post!! I've done a bit of googling to find a simple testing solution for Jekyll and never came up with something that I could get excited about.

I'll definitely be giving your solution a test run (pun somewhat intended)!! Thanks for sharing this!!

Collapse
 
phansch profile image
Philipp Hansch

Happy to hear!

There is one gotcha for which I haven't found a workaround, yet. If you have a bigger site, then you probably have to sleep a few seconds in the test_helper until the site has been built completely. Without sleeping you will run into 'Element not found' errors from Capybara.

Collapse
 
simonini profile image
Alessandro

Hi Philipp, thanks for your article!
I've a problem with link to your tests; i get a 404 (gitlab.com/phansch/phansch.gitlab....)

Thanks again