Update Behat and add more tests
This commit is contained in:
parent
b5a0281729
commit
7c1fed2d49
|
@ -3,11 +3,10 @@
|
|||
position: relative
|
||||
+clearfix
|
||||
|
||||
h2
|
||||
margin-top: 0
|
||||
|
||||
@include breakpoint(max-width $screen-tablet)
|
||||
+breakpoint(max-width $screen-tablet)
|
||||
h2
|
||||
font-size: 1.5em
|
||||
margin-top: 0
|
||||
|
||||
p:last-of-type
|
||||
margin-bottom: 0
|
||||
|
@ -24,7 +23,7 @@
|
|||
.experience
|
||||
&__logo
|
||||
@extend .pull-right
|
||||
margin: 0 0 2em 2em
|
||||
margin: 0 0 0 2em
|
||||
max-width: 20%
|
||||
|
||||
@include breakpoint($screen-md-min)
|
||||
|
|
10
behat.yml
10
behat.yml
|
@ -1,5 +1,11 @@
|
|||
default:
|
||||
extensions:
|
||||
Behat\MinkExtension\Extension:
|
||||
goutte: ~
|
||||
Behat\MinkExtension:
|
||||
base_url: http://127.0.0.1:8000
|
||||
goutte: ~
|
||||
|
||||
suites:
|
||||
default:
|
||||
contexts:
|
||||
- FeatureContext
|
||||
- Behat\MinkExtension\Context\MinkContext
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
"opdavies/sculpin-gist-embed-bundle": "dev-master"
|
||||
},
|
||||
"require-dev": {
|
||||
"behat/behat": "2.5.*@stable",
|
||||
"behat/mink": "1.5.*@stable",
|
||||
"behat/mink-extension": "*",
|
||||
"behat/mink-goutte-driver": "*"
|
||||
"behat/mink-extension": "@stable",
|
||||
"behat/mink-goutte-driver": "@stable"
|
||||
}
|
||||
}
|
||||
|
|
1653
composer.lock
generated
1653
composer.lock
generated
File diff suppressed because it is too large
Load diff
16
features/blog.feature
Normal file
16
features/blog.feature
Normal file
|
@ -0,0 +1,16 @@
|
|||
Feature: Blog
|
||||
|
||||
Scenario:
|
||||
Given I am on "/blog"
|
||||
Then the response status code should be 200
|
||||
And the ".nav li.active a" element should contain "Blog"
|
||||
|
||||
Scenario:
|
||||
Given I am on "/blog/simplifying-drupal-migrations-with-xautoload"
|
||||
Then the response status code should be 200
|
||||
And the ".nav li.active a" element should contain "Blog"
|
||||
|
||||
Scenario:
|
||||
Given I am on "/"
|
||||
Then I should see "Latest blog posts"
|
||||
And I should see 3 ".latest-posts .post" elements
|
23
features/bootstrap/FeatureContext.php
Normal file
23
features/bootstrap/FeatureContext.php
Normal 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()
|
||||
{
|
||||
}
|
||||
}
|
6
features/contact.feature
Normal file
6
features/contact.feature
Normal file
|
@ -0,0 +1,6 @@
|
|||
Feature: Contact page
|
||||
|
||||
Scenario:
|
||||
Given I am on "/contact"
|
||||
Then the response status code should be 200
|
||||
And the ".nav li.active a" element should contain "Contact"
|
6
features/experience.feature
Normal file
6
features/experience.feature
Normal file
|
@ -0,0 +1,6 @@
|
|||
Feature: Experience page
|
||||
|
||||
Scenario:
|
||||
Given I am on "/experience"
|
||||
Then the response status code should be 200
|
||||
And the ".nav li.active a" element should contain "Experience"
|
12
features/home.feature
Normal file
12
features/home.feature
Normal file
|
@ -0,0 +1,12 @@
|
|||
Feature: Home
|
||||
In order to check that the website still works
|
||||
As a website user
|
||||
I need to be able to see that the homepage is correct
|
||||
|
||||
Scenario:
|
||||
Given I am on the homepage
|
||||
Then the response status code should be 200
|
||||
And the ".nav li.active a" element should contain "About"
|
||||
And I should see "I’m a Web Developer and System Administrator based in Wales, UK."
|
||||
And the "title" element should contain "Web Developer, System Administrator - PHP, Drupal, Symfony, Linux | Oliver Davies"
|
||||
And the "title" element should not contain "About | Oliver Davies"
|
|
@ -1,11 +0,0 @@
|
|||
Feature: Homepage
|
||||
In order to check that the website still works
|
||||
As a website user
|
||||
I need to be able to see that the homepage is correct
|
||||
|
||||
Scenario:
|
||||
Given I am on "/"
|
||||
Then the response status code should be 200
|
||||
And I should see "I’m a Web Developer and System Administrator based in Wales, UK."
|
||||
And the "title" element should contain "Web Developer, System Administrator - PHP, Drupal, Symfony, Linux | Oliver Davies"
|
||||
And the "title" element should not contain "About | Oliver Davies"
|
11
features/talks.feature
Normal file
11
features/talks.feature
Normal file
|
@ -0,0 +1,11 @@
|
|||
Feature: Talks page
|
||||
|
||||
Scenario:
|
||||
Given I am on "/talks"
|
||||
Then the response status code should be 200
|
||||
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"
|
Loading…
Reference in a new issue