Skip to content

Instantly share code, notes, and snippets.

View alexhidalgo's full-sized avatar
🌴
On vacation

Alex Hidalgo alexhidalgo

🌴
On vacation
View GitHub Profile
cp .env.example .env
mkdir android/app/src/main/assets
node node_modules/react-native/local-cli/cli.js bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
cd android/ && ./gradlew assembleDebug --stacktrace --scan
Loading dependency graph, done.
transform[stderr]:
transform[stderr]: You or one of the Babel plugins you are using are using Flow declarations as bindings.
transform[stderr]: Support for this will be removed in version 7. To find out the caller, grep for this
transform[stderr]: message and change it to a `console.trace()`.
transform[stderr]:
[Appium] Welcome to Appium v1.9.1
[Appium] Non-default server args:
[Appium] address: 127.0.0.1
[Appium] Appium REST http interface listener started on 127.0.0.1:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"automationName":"uiautomator","platformName":"Android","appWaitPackage":"com.xxxx.xx","appWaitActivity":"com.xxxx.xx.MainActivity","appWaitDuration":120000,"deviceName":"Android","app":"/Users//workspace/xx/psychic-adventure/mobile/android/app/build/outputs/apk/debug/app-debug.apk","maxTypingFrequency":30,"androidInstallTimeout":120000,"requestOrigins":{"url":"http://webdriver.io","version":"4.13.2","name":"webdriverio"}}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"automationName":"uiautomator","platformName":"Android","appWaitPackage":"com.xxxx.xx","appWaitActivity":"com.
@alexhidalgo
alexhidalgo / auth.spec.js
Created November 5, 2018 18:51
first spec test that runs
import LoginPage from '../pageobjects/login.page';
import ConsentPage from '../pageobjects/consent.page';
import TabBarPage from '../pageobjects/tabbar.page';
import ProfilePage from '../pageobjects/profile.page';
describe('new account auth flow', () => {
browser.timeouts('implicit', 10000);
it('logs in up to consent flow', () => {
LoginPage.signInButton.waitForVisible();
console.log(LoginPage.signInButton.getText());
@alexhidalgo
alexhidalgo / wdio.android.remote.sim.conf.js
Created November 5, 2018 18:49
android capabilities to run saucelabs sim apk
const config = require('./wdio.shared.conf').config;
// @TODO: To increase the number of devices to run in parrallel add more objects
// to the cap array.
config.capabilities = [
{
maxInstances: 1,
automationName: 'uiautomator2',
browserName: '',
deviceOrientation: 'portrait',
@alexhidalgo
alexhidalgo / wdio.shared.conf.js
Created November 5, 2018 18:48
shared config
exports.config = {
//
// ==================
// Specify Test Files
// ==================
// Define which test specs should run. The pattern is relative to the directory
// from which `wdio` was called. Notice that, if you are calling `wdio` from an
// NPM script (see https://docs.npmjs.com/cli/run-script) then the current working
// directory is where your package.json resides, so `wdio` will be called from there.
//
{
"platformVersion": "11.4",
"platformName": "iOS",
"automationName": "XCUITest",
"deviceName": "iPhone 6",
"udid": "67CD9028-3F3B-48DE-B39B-5A391980214F",
"usePrebuiltWDA": true,
"useNewWDA": false,
"waitForQuiescence": false,
"maxInstances": 1,
Verifying my Blockstack ID is secured with the address 1FyKT5ZJdTTtmTURqD9dXTkbmRMVKqrDrL https://explorer.blockstack.org/address/1FyKT5ZJdTTtmTURqD9dXTkbmRMVKqrDrL
MongoClient.connect('mongodb://localhost:27017/test', function (err, db) {
var query = {'company_code': 'biotech'}
var cursor = db.collection('companies').find(query)
cursor.forEach(
function (doc) {
console.log(doc.name + ' is a company')
},
function (err) {
var express = require('express'),
app = express(),
engines = require('consolidate'),
MongoClient = require('mongodb').MongoClient,
assert = require('assert')
app.engine('html', engines.nunjucks)
app.set('view engine', 'html')
app.set('views', __dirname + '/views')
<?php
$name = $_REQUEST['SendDigits']
// now greet the caller
header("content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<Response>
<Say>Hello <?php echo $name ?>.</Say>
</Response>