Skip to content

Instantly share code, notes, and snippets.

View nicolanrizzo's full-sized avatar

Nicola Rizzo nicolanrizzo

View GitHub Profile
@nicolanrizzo
nicolanrizzo / Vagrantfile
Created November 5, 2016 15:37
Default Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
input {
http {
response_headers => {
"Access-Control-Allow-Origin" => "*"
"Access-Control-Allow-Headers" => "Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"
"Access-Control-Allow-Methods" => "*"
"Access-Control-Allow-Credentials" => "*"
}
host => "10.10.10.10"
port => 8080
input {
http {
response_headers => {
"Access-Control-Allow-Origin" => "*"
"Access-Control-Allow-Headers" => "Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"
"Access-Control-Allow-Methods" => "*"
"Access-Control-Allow-Credentials" => "*"
}
host => "10.10.10.10"
port => 8080
input {
http {
host => "10.10.10.10"
port => 8080
}
}
.config(["$provide", "$windowProvider", function ($provide, $windowProvider) {
var $window = $windowProvider.$get();
$provide.decorator('$log', function ($delegate){
function appLogging(message, type) {
$.ajax({
type: "POST",
url: "http://10.10.10.10:8080",
contentType: "application/json",
data: angular.toJson({
Feature: As a good developer i want to test my angular app in BDD
Scenario: I want to see the home page
Given I am on the "login"
When I fill "email" field with "[email protected]"
And I fill "password" field with "donkeycode"
And I click on the button "login"
Then I should be redirected on "home"
// protractor.conf.js
exports.config = {
allScriptsTimeout: 99999,
// The address of a running selenium server.
// seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
// The location of the selenium standalone server .jar file, relative
// to the location of this config. If no other method of starting selenium
// test/e2e/support/pages/home/home.js
'use strict';
module.exports = function home() {
return {
url: "home"
};
}();
// test/e2e/support/pages/login/login.js
'use strict';
module.exports = function login() {
return {
url: "login",
getButtonByName: function (buttonName) {
var mapping = {
"login": ".btn"