Skip to content

Instantly share code, notes, and snippets.

---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
trigger_map:
- push_branch: "*"
workflow: tests
workflows:
_tests_setup:
steps:
- activate-ssh-key: {}
@PillowUnicorn
PillowUnicorn / 1_login.spec.js
Created September 6, 2017 19:26
Detox - Login Test
describe('Pillow Pro - Login', () => {
beforeEach(async () => {
await device.reloadReactNative();
});
it('should login a pro fellow', async () => {
await waitFor(element(by.id('login_title'))).toBeVisible().withTimeout(5000);
await expect(element(by.id('login_subtitle'))).toBeVisible();
await element(by.text('Email address')).typeText('monte@pillow.com');
@PillowUnicorn
PillowUnicorn / 0_permissions.spec.js
Created September 6, 2017 19:20
Detox - Setting iOS Permissions
describe('Pillow Pro - Permissions', () => {
it('Push Notifications permission is granted', async () => {
await device.launchApp({ permissions: { notifications: 'YES' } });
});
it('Location permission is granted', async () => {
await device.launchApp({ permissions: { location: 'inuse' } });
});
});
@PillowUnicorn
PillowUnicorn / component.spec.js
Created June 22, 2017 23:30
Jest test for React Components
import 'react-native';
import React from 'react';
import renderer from 'react-test-renderer';
import { EnterLogin } from '../enter_login';
test( 'EnterLogin view renders correctly', () => {
const tree = renderer.create(
<EnterLogin />
@PillowUnicorn
PillowUnicorn / reducers.spec.js
Created June 22, 2017 23:27
Jest test for Redux Reducers [Template]
import configureStore from 'redux-mock-store'
import * as errorsActions from '../../../actions/errors'
import { mock_errors } from '../../../store/mock_data'
import setErrorMessage from '../set_error_message'
import resetErrorMessage from '../reset_error_message'
const middlewares = []
@PillowUnicorn
PillowUnicorn / actions.spec.js
Created June 22, 2017 23:23
Jest test for Redux actions [Template]
import configureStore from 'redux-mock-store'
import * as activityActions from '../activity'
import { mock_activity } from '../../store/mock_data'
const middlewares = []
const mockStore = configureStore( middlewares )
const initialState = {}
@PillowUnicorn
PillowUnicorn / ios-bitrise.yml
Created April 28, 2017 22:29
Pillow's iOS bitrise.yml
---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
app:
envs:
- BITRISE_PROJECT_PATH: ios/pro_mobile.xcodeproj
opts:
is_expand: false
- BITRISE_SCHEME: pro_mobile
opts:
@PillowUnicorn
PillowUnicorn / android_bitrise.yml
Created April 28, 2017 22:21
Pillow's Android bitrise.yml
---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
trigger_map:
- push_branch: qa
workflow: qa
workflows:
_init_install:
steps:
- activate-ssh-key: