Skip to content
This repository has been archived by the owner on Aug 12, 2018. It is now read-only.

Commit

Permalink
added selenium integration
Browse files Browse the repository at this point in the history
  • Loading branch information
inoryy committed Jan 29, 2013
1 parent 0887d9c commit 1edfe46
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,12 @@ public function thereIsCarEntryInTheDatabase($carName)
{
$this->app['db']->executeUpdate('INSERT INTO cars (name) VALUES (?)', array($carName));
}

/**
* @Given /^I wait for search results to appear$/
*/
public function iWaitForSearchResultsToAppear()
{
$this->getSession()->wait(5000, "$('#search_results table td').length > 0");
}
}
2 changes: 2 additions & 0 deletions features/search_bar.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ Scenario: No results for "mustang" search
And I press "Search"
Then I should see "Sorry, no cars found"

@javascript
Scenario: Search results for "mustang"
Given there are no car entries in the database
And there is "Ford Mustang GT500" car entry in the database
And I am on homepage
When I fill in "Car Name" with "mustang"
And I press "Search"
And I wait for search results to appear
Then I should see "Ford Mustang GT500" in results table
Binary file added selenium-server-standalone-2.28.0.jar
Binary file not shown.

0 comments on commit 1edfe46

Please sign in to comment.