initial commit
This commit is contained in:
14
features/bootstrap/FeatureContext.php
Normal file
14
features/bootstrap/FeatureContext.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
use Behat\MinkExtension\Context\MinkContext;
|
||||
|
||||
class FeatureContext extends MinkContext
|
||||
{
|
||||
/**
|
||||
* @Then /^I wait for the suggestion box to appear$/
|
||||
*/
|
||||
public function iWaitForTheSuggestionBoxToAppear()
|
||||
{
|
||||
$this->getSession()->wait(5000, "$('.suggestions-results').children().length > 0");
|
||||
}
|
||||
}
|
||||
23
features/search.feature
Normal file
23
features/search.feature
Normal file
@@ -0,0 +1,23 @@
|
||||
Feature: Search
|
||||
In order to see a word definition
|
||||
As a website user
|
||||
I need to be able to search for a word
|
||||
|
||||
Scenario: Searching for a page that does exist
|
||||
Given I am on "/wiki/Main_Page"
|
||||
When I fill in "search" with "Behavior Driven Development"
|
||||
And I press "searchButton"
|
||||
Then I should see "agile software development"
|
||||
|
||||
Scenario: Searching for a page that does NOT exist
|
||||
Given I am on "/wiki/Main_Page"
|
||||
When I fill in "search" with "Glory Driven Development"
|
||||
And I press "searchButton"
|
||||
Then I should see "Search results"
|
||||
|
||||
@javascript
|
||||
Scenario: Searching for a page with autocompletion
|
||||
Given I am on "/wiki/Main_Page"
|
||||
When I fill in "search" with "Behavior Driv"
|
||||
And I wait for the suggestion box to appear
|
||||
Then I should see "Behavior Driven Development"
|
||||
Reference in New Issue
Block a user