Skip to content

Instantly share code, notes, and snippets.

View lucipacurar's full-sized avatar

Lucian Pacurar lucipacurar

View GitHub Profile
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\lucian.pacurar\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'i',
1 verbose cli '--verbose' ]
2 info using npm@5.5.1
3 info using node@v6.11.4
4 verbose npm-session aa8dc16a5f66e683
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall insights-admin-ui@1.0.0
var util = require('util');
describe("login modal", function () {
var ptor;
beforeEach(function() {
// get protractor instance
ptor = protractor.getInstance();
});
// An example configuration file.
exports.config = {
// The address of a running selenium server.
seleniumAddress: 'http://localhost:4444/wd/hub',
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome'
},
// URL of the app you want to test.
angular.module("myApp").factory("Users", ["$http", "APIUrls",
function ($http, APIUrls) {
return {
getUsers: function () {
return $http.get(APIUrls.getUrl("users"));
},
login: function (username, data) {
return $http.post(APIUrls.getUrl("userAuthentication", username), {
params: data
});
angular.module("myApp").config(["APIUrlsProvider",
function (APIUrlsProvider) {
APIUrlsProvider.hostname = "app.busymachines.com";
APIUrlsProvider.apiVersion = 1;
APIUrlsProvider.port = 8080;
APIUrlsProvider.urls = {
"users": "/users",
"userAuthentication": function (username) {
return "/users/" + username + "/authentication";
},
angular.module("myApp").provider("APIUrls", function () {
var that = this; // hold a reference to the current service provider
this.hostname = "";
this.apiVersion = "";
this.port = "";
this.secure = false;
this.urls = {};
angular.module("myApp").factory("Users", ["$http", "APIUrls",
function ($http, APIUrls) {
return {
getUsers: function () {
return $http.get(APIUrls.users);
}
}
}
]);
angular.module("myApp").value("APIUrls", {
"users": "v1/users",
"employees": "v1/employees"
});
@lucipacurar
lucipacurar / index.html
Created May 12, 2012 09:28
img and iframe
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
</head>
<body>
<img src="" />
<iframe src="#"></iframe>
</body>
@lucipacurar
lucipacurar / Tab.js
Created December 8, 2011 14:23
Problems on iOS
exports.load = function(app, params) {
var tab = Ti.UI.createTab({
title: 'Tab title'
});
app.activeTabGroup().add(tab);
app.lastAddedTab(tab);
require('modules/ui/Window').load(app, params);
};