Merge branch 'update-behat'

This commit is contained in:
Oliver Davies 2016-06-15 00:20:06 +01:00
commit 8c11fb9195
6 changed files with 1008 additions and 691 deletions

View file

@ -1,5 +1,11 @@
default: default:
extensions: extensions:
Behat\MinkExtension\Extension: Behat\MinkExtension:
goutte: ~
base_url: http://127.0.0.1:8000 base_url: http://127.0.0.1:8000
goutte: ~
suites:
default:
contexts:
- FeatureContext
- Behat\MinkExtension\Context\MinkContext

View file

@ -17,9 +17,7 @@
"opdavies/sculpin-gist-embed-bundle": "dev-master" "opdavies/sculpin-gist-embed-bundle": "dev-master"
}, },
"require-dev": { "require-dev": {
"behat/behat": "2.5.*@stable", "behat/mink-extension": "@stable",
"behat/mink": "1.5.*@stable", "behat/mink-goutte-driver": "@stable"
"behat/mink-extension": "*",
"behat/mink-goutte-driver": "*"
} }
} }

1653
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,23 @@
<?php
use Behat\Behat\Context\Context;
use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
/**
* Defines application features from the specific context.
*/
class FeatureContext implements Context, SnippetAcceptingContext
{
/**
* Initializes context.
*
* Every scenario gets its own context instance.
* You can also pass arbitrary arguments to the
* context constructor through behat.yml.
*/
public function __construct()
{
}
}

View file

@ -4,7 +4,7 @@ Feature: Home
I need to be able to see that the homepage is correct I need to be able to see that the homepage is correct
Scenario: Scenario:
Given I am on "/" Given I am on the homepage
Then the response status code should be 200 Then the response status code should be 200
And the ".nav li.active a" element should contain "About" And the ".nav li.active a" element should contain "About"
And I should see "Im a Web Developer and System Administrator based in Wales, UK." And I should see "Im a Web Developer and System Administrator based in Wales, UK."

View file

@ -4,3 +4,8 @@ Feature: Talks page
Given I am on "/talks" Given I am on "/talks"
Then the response status code should be 200 Then the response status code should be 200
And the ".nav li.active a" element should contain "Talks" And the ".nav li.active a" element should contain "Talks"
Scenario:
Given I am on "/talks/drupal-8-rejoining-the-herd"
Then the response status code should be 200
And the ".nav li.active a" element should contain "Talks"