Skip to content

Instantly share code, notes, and snippets.

View rafaelanastacioalves's full-sized avatar
🎯
Focusing

Rafael Alves rafaelanastacioalves

🎯
Focusing
View GitHub Profile
@chbaranowski
chbaranowski / EchoTest.java
Created December 10, 2011 12:37
Cheat Sheet Test for Mockito
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.is;
import static org.mockito.Mockito.*;
import static org.mockito.BDDMockito.*;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
@unnamedd
unnamedd / .git-aliases.sh
Last active July 17, 2024 10:34
Personal Git Configurations / Git Config
#!/bin/bash
# Define colors
alias_color='\033[1;34m' # Bold blue
comment_color='\033[0;32m' # Green
no_color='\033[0m' # Reset color
printf "\nGit Aliases\n"
# Define the number of spaces for alignment
@esavard
esavard / calabash.groovy
Created June 29, 2013 21:16
Gradle plugin for calabash support in Android Studio
package com.mediaarc.gradle.plugins
import org.gradle.api.*
import org.gradle.api.plugins.*
import org.gradle.api.tasks.*
class CalabashPlugin implements Plugin<Project> {
void apply(Project project) {
project.extensions.create("calabash", CalabashPluginExtension)
@minakov
minakov / build.gradle
Last active September 3, 2016 14:18
Run calabash from android gradle build
apply from: '../calabash-tests/calabash.gradle'
calabashTest {
calabashPath "calabash-tests"
}
@thiagolioy
thiagolioy / SessionManagerSpec.m
Created June 11, 2015 13:59
How to use Specta, Expecta and OCMock . With ViewControllers and Helper|Utility Classes
#import <UIKit/UIKit.h>
#import <Specta.h>
#import <Expecta.h>
#import <OCMock.h>
#import "SessionManager.h"
SpecBegin(SessionManagerSpec)
@vasanthk
vasanthk / System Design.md
Last active July 24, 2024 07:54
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@rafaelanastacioalves
rafaelanastacioalves / calabash_android_helper_methods.rb
Last active October 29, 2017 19:46
Helper methods that I created for Android automations with Calabash.
# @author Rafael Alves <rafaelanastacioalves@gmail.com>
def scrolla_procurando_id element_id, scroll_location_id, scroll_location_query = nil, options = {}
#depois ele volta para onde ele tinha iniciado a procura
if scroll_location_query.nil?
scroll_location_query="* id:'#{scroll_location_id}'"
end
if options[:timeout].nil?
options[:timeout]=15
end
@rafaelanastacioalves
rafaelanastacioalves / calabash_ios_helper_methods.rb
Last active April 11, 2017 13:37
Helper methods that I created for iOS automations with Calabash.
# @param [String] marked The view's 'marked' attribute
# @param [String] query The complete view query (optional)
# @return [Array] return an array[String] associated with the views
# @author Rafael Alves <rafaelanastacioalves@gmail.com>
def text_array_from(marked, query = nil)
query = "* marked:'#{marked}'" if query.nil?
query(query, :text)
end
# @param [String] marked The view's 'marked' attribute