Skip to content

Commit

Permalink
Added scenarios for new functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
baphled committed May 14, 2010
1 parent 27cafcf commit aef858e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 13 deletions.
37 changes: 24 additions & 13 deletions features/plain/lighthouse_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,30 @@ Feature: Lighthouse integration
And we have an the project number "50164"
When we specify the ticket type "state:open tagged:feature"
When we retrieve tickets

Scenario: We want to be able to get a list of tickets using the give tag
Given there is a parking area
And we click import tickets
When we submit the search
Then should have a list of all tickets we would like to import

Scenario: We need a place to edit our lighthouse resource information
Given I visit the parking page
When I use the "New Resource information" link
Then I should be sent to the "New Resource" page

Scenario: We want to be able to add a new lighthouse resource
Given we visit the edit parking page
When we fill in the "parking_project_name" with "baphled"
And we fill in the "parking_project_id" with "50164"
And we submit the form
Then the resource information should be saved

Scenario: We should be able to use the lighthouse resource when it has been stored
Given we have setup the lighthouse resource
And I visit the parking page
When we fill in the "parking_tag" with "feature"
Then we should be sent to the "tickets" page
And we submit the form
And there should be a list of tickets found

Scenario: We should be able to import all found tickets into the parking area.
Given there is a parking area
When we the page loads we should have a list of all tickets we would like to import
Given we are using the account name in the config file
And we have an the project number in the config file
When we visit the "parking" page
Given we have set up the lighthouse resource
And I visit the parking page
When we submit a ticket search for "feature"
And we specify the ticket type as "feature"
And we submit the search
Then it should display a list of tickets that could be saved as parked features
Then we should be able to select tickets to add to parking
8 changes: 8 additions & 0 deletions features/step_definitions/lighthouse_integration_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
@project_number = project_number
end

Given /^I visit the parking page$/ do
visit parking_index_path
end

When /^we specify the ticket type "([^\"]*)"$/ do |ticket_parameters|
@lighthouse_tickets = Lighthouse::Ticket.find(:all, :params => { :project_id => @project_number, :q => "state:open tagged:feature" })
end
Expand All @@ -17,3 +21,7 @@
Then /^each of the features should be using the "([^\"]*)" tag$/ do |tag|
@lighthouse_tickets.each {|ticket| ticket.tag.should contain 'feature'}
end

Then /^I should be sent to the "([^\"]*)" page$/ do |page_title|
response.should contain page_title
end

0 comments on commit aef858e

Please sign in to comment.