Hey ๐Ÿ‘‹๐Ÿป

My name is Christian, an Agile Developer, living in Trento (IT)

I write good code at Wonderflow

You can follow me on and Github


More about me ๐Ÿค–




Debugging acceptance tests with Angular and Cucumber

I found myself quite helpless when debugging acceptance tests of any kind. One trick I found useful if you canโ€™t understand where the problem could be and want to โ€˜seeโ€™ what the web driver is seeing, is to add the following step definition to your web driver configuration:

Then /^show me the page/ do
            print page.html
          end

and use it like this to at least have a small clue whatโ€™s going on:

@javascript
          Scenario: controlling order
            Given there are 12 cucumbers
            Then show me the page
            When I eat 5 cucumbers
            Then I should have 7 cucumbers