Blog

04 Jan 2015
|

What's fun about having a tool like Hedley is that every new best practice we acquire can be easily added to our ever evolving, versioned, and codified knowledge base - and it's there for the community to use and improve.

So, as if it didn't have enough of best practices bundled in it already, we've taken another step to get PhantomCSS a "CSS regression testing" tool in.

PhantomCSS in action
26 Dec 2014
|

Bingo! I think we're on to something here. It's called yo hedley - and it's one command that brings a true headless Drupal to everybody.

In my last DrupalCon BoF presentation "Gizra - we've got your headless covered" I've taken the time to explain why "headless" was in fact mostly a buzzword. While I encourage you to have a look at the presentation, I'm actually more excited about telling you why I feel this is no longer the case.

Go ahead an check the live demo!

04 Dec 2014
|

In my previous blog post Behat - The Right Way I made a statement that I think Behat was a better choice for writing tests even for the frontend. Some good arguments were raised in favor of CasperJS.

I believe my comparison was wrong in the sense it was lacking the key point to Behat's stength for us. It's not really about "Behat vs. Casper". The proper comparison should have been "Behat vs. Casper - With a Drupal backend"

And here's the key difference: With Behat you can interact with Drupal's API even when testing using PhantomJS. That is a lot of testing power!

23 Nov 2014
|

The Drupal community can now proudly claim its own implementation of a Todo app with a RESTful backend!

TodoMVC is a site that helps you select the right JS MVC library. But more then that, it allows you to learn by comparing those libraries, as they all implement the same thing - a simple Todo app.

I've decided to fork the Angular example, and build it on top of RESTful. Looking at the Angular code, I was pleasantly surprised.

17 Nov 2014
|

Behat is a wonderful tool for automatic testing. It allows you to write your user stories and scenarios in proper English, which is then parsed by Behat and transformed to a set of clicks or other operations that mimic a real user.

If you don't have automated tests on your project, I would argue that you're doing it wrong (I explain why on The Gizra Way presentation). Even having a single test is much better than none.

With that said, it's super easy to abuse Behat. We are developers and we think sort of like machines (not really, but you get my point). If you would like to test login to your site you could easily do

Given I visit "/user/login"
 # fill the username and password input fields, and click submit
 When I fill "username" with "foo"
  And I fill "password" with "bar"
  And I press "Login"
 Then I should get a "200" HTTP response

Your test will return green, but it could be improved: