Skip to content

Instantly share code, notes, and snippets.

@fofr
Created October 25, 2013 12:52
Show Gist options
  • Save fofr/7154210 to your computer and use it in GitHub Desktop.
Save fofr/7154210 to your computer and use it in GitHub Desktop.
Cucumber feature for Google chart
@wip @javascript
Scenario: Hits exist and can be filtered by error
And I click the link "Errors"
And I wait until a graph is visible
Then I should see all hits with an error status for the Attorney General's office in descending count order
And an errors graph showing two dates and a red trend line
When /^I wait until a graph is visible$/ do
find('.js-hits-graph svg')
end
Then(/^an errors graph showing two dates and a red trend line$/) do
puts page.body
expect(page).to have_selector('svg')
expect(page).to have_selector('svg g')
expect(page).to have_selector('svg path')
#expect(page).to have_selector('text', text: 'Errors')
expect(page).to have_svg_text('Errors')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment