Skip to content

Instantly share code, notes, and snippets.

@ferclaverino
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ferclaverino/d114575753087503d145 to your computer and use it in GitHub Desktop.
Save ferclaverino/d114575753087503d145 to your computer and use it in GitHub Desktop.
starting protractor + cucumber + gherkin
Feature: Home
Como comprador
Quiero buscar teléfonos
Scenario: Titulo en la home
Given Estoy en "phones"
Then El título es "Google Phone Gallery"
var chai = require('chai');
var chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
var expect = chai.expect;
module.exports = function() {
this.Given(/^Estoy en "([^"]*)"$/, function(arg1, callback) {
browser.get('http://angular.github.io/angular-phonecat/step-12/app/#/' + arg1);
callback();
});
this.Then(/^El título es "([^"]*)"$/, function(arg1, callback) {
expect(browser.getTitle()).to.eventually.equal(arg1).and.notify(callback);
});
}
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
framework: 'cucumber',
specs: [
'../features/*.feature',
],
capabilities: {
'browserName': 'chrome',
},
cucumberOpts: {
require: '../features/steps/*.steps.js',
format: 'pretty'
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment