Skip to content

Instantly share code, notes, and snippets.

View EvanAgee's full-sized avatar
🎯
Focusing

Evan Agee EvanAgee

🎯
Focusing
View GitHub Profile
@EvanAgee
EvanAgee / ContentTypes.feature
Created May 9, 2014 19:36
Behat test for multiple Drupal Content Types
Feature: Content Type Tests
As an Administrator
I should be able to create nodes of all Content Types
@api @Env::Backend @Creator::EvanAgee
Scenario: Make sure we can create Basic Pages
Given I am logged in as a user with the "administrator" role
And I visit "node/add/page"
Then I enter "BDD TEST BASIC PAGE" for "Title"
And I attach the file "photo.jpg" to "edit-field-images-und-0-upload"
@EvanAgee
EvanAgee / Editors.feature
Created May 6, 2014 17:15
Example Behat feature for testing Drupal node creation
# https://gist.github.com/jhedstrom/5708233
Feature: Editor Tests
As a Conference Manager
I should be able to create a Node of type Session
@javascript @api
Scenario: Make sure Conference Manager can create Session
Given I am logged in as a user with the "Conference Manager" role
When I visit "node/add/session"
@EvanAgee
EvanAgee / Homepage.feature
Created May 6, 2014 17:14
Example Behat feature for testing element existence
Feature: Home Page Tests
As an anonymous user
I should see a set of tabs that display the conference sponsors
I should see a large rotating banner
I should see the home page video
I should be able to click the Register Now Button
@javascript @api
Scenario: Checking that important elements have rendered
Given I am not logged in
@EvanAgee
EvanAgee / FeatureContext.php
Created May 6, 2014 17:14
FeatureContext.php for Drupal sites
<?php
use Behat\Behat\Context\ClosuredContextInterface,
Behat\Behat\Context\TranslatedContextInterface,
Behat\Behat\Context\BehatContext,
Behat\Behat\Exception\PendingException;
use Behat\Gherkin\Node\PyStringNode,
Behat\Gherkin\Node\TableNode;
use Behat\MinkExtension\Context\MinkContext;
//
@EvanAgee
EvanAgee / behat.yml
Created May 6, 2014 17:13
Example behat.yml for Behat and Drupal
default:
paths:
features: features
bootstrap: %behat.paths.features%/bootstrap
extensions:
Behat\MinkExtension\Extension:
goutte: ~
selenium2: ~
base_url: http://staging.gatewayconference.com/
files_path: '~/Dropbox/Development/Projects/gateway1/docroot/sites/gwayconf/tests/'
@EvanAgee
EvanAgee / composer.json
Created May 6, 2014 17:13
Composer settings for Behat
{
"require": {
"behat/behat": "2.4.*@stable",
"behat/mink": "1.5.*@stable",
"behat/mink-goutte-driver": "*",
"behat/mink-extension": "*",
"behat/mink-selenium2-driver": "*",
"drupal/drupal-extension": "*",
"vipsoft/jira-extension": "*"
},
@EvanAgee
EvanAgee / index.html
Created April 30, 2014 12:47
HTML-Ipsum
<h1>This is the primary heading and there should only be one of these per page</h1>
<p>A small paragraph to <em>emphasis</em> and show <strong>important</strong> bits.</p>
<ul>
<li>This is a list item</li>
<li>So is this - there could be more</li>
<li>Make sure to style list items to:
<ul>
<li>Not forgetting child list items</li>
<li>Not forgetting child list items</li>
<li>Not forgetting child list items</li>
@EvanAgee
EvanAgee / main.js
Created April 29, 2014 19:34
Add hover on touch for mobile devices using jQuery
$("a").live("touchstart", function(e) {
$(this).trigger("hover");
});
$("a").live("touchend", function(e) {
$(this).trigger("blur");
});
@EvanAgee
EvanAgee / html5starter
Last active August 29, 2015 14:00
HTML5 Starter
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">