Step 0. Create an AngularJs Project!
yo gulp-angular DESIRED_MODULE_NAME
Step 1. Install Cucumber Via NPM
npm install cucumber --save-dev
Step 2. Create a "Features" Folder
./node_modules/cucumber/bin/cucumber.js
mkdir features
Step 3. Get a Clean Run With No Scenarios
Step 4. Add a Feature File
Feature: The Phrase "Hello World" shows up on the page when site first loads. In order to fulfill my desire to see the "Hello World" message As a user of the app I want to see the "Hello World" message when the app loads. Scenario: "Hello World" is displayed. Given the user is not currently at the site When the user lands on the site Then it should display the message "Hello World"
Step 5. Create a "World"
function World() { console.log('world running.'); } module.exports = function() { this.World = World; };
Step 6. Create a Step Definition File
module.exports = function () { this.Given(/^the user is not currently at the site$/, function (callback) { callback.pending(); }); this.When(/^the user lands on the site$/, function (callback) { callback.pending(); }); this.Then(/^it should display the message "Hello World"$/, function (callback) { callback.pending() }); };