Skip to content

Instantly share code, notes, and snippets.

View raphaelrodrigues's full-sized avatar

Raphael Rodrigues raphaelrodrigues

View GitHub Profile
#!/bin/sh
### BEGIN INIT INFO
# Provides: dockercompose
# Required-Start: $docker
# Required-Stop: $docker
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Docker Services
### END INIT INFO
@raphaelrodrigues
raphaelrodrigues / alert.js
Last active May 7, 2021 13:24
Minium Snippets
// get alert
var a = page.alert();
// check the message of alert
expect(String(a.getText())).to.be(msg);
// close the alert
a.accept();
// dismiss (cancel/close) a modal
@raphaelrodrigues
raphaelrodrigues / seacrh.feature
Created June 19, 2015 12:26
Cucumber Example Minium
# language: en
# ------------------------------------------------------------------------------
Feature: Search results in Google
Scenario: Search something in google
Given I'm at http://www.google.com/ncr
When I search for minium github
Then a link for https://github.com/viltgroup/minium is displayed
Scenario Outline: Search something in google (results in a JSON file)
@raphaelrodrigues
raphaelrodrigues / amazon.js
Last active August 29, 2015 14:23
Snippets Minium
browser.get("http://www.amazon.com/");
var searchBox = $("#twotabsearchtextbox");
var goBtn = $(":submit").withValue("Go");
var results = $(".s-access-title");
var addToCartBtn = $("#add-to-cart-button");
var confirmText = $("#confirm-text");
var cartCount = $("#nav-cart-count");
searchBox.fill("Hubsan X4");
@raphaelrodrigues
raphaelrodrigues / directives.js
Last active August 29, 2015 14:18
directive to validate 2 dates
.directive('lowerThan', [
function() {
var link = function($scope, $element, $attrs, ctrl) {
var validate = function(viewValue) {
var comparisonModel = $attrs.lowerThan;
var t, f;
if (!viewValue || !comparisonModel) {
@raphaelrodrigues
raphaelrodrigues / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console