Last active
August 29, 2015 14:17
-
-
Save ferclaverino/d114575753087503d145 to your computer and use it in GitHub Desktop.
starting protractor + cucumber + gherkin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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