This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Test { | |
| @Test | |
| fun `should test recycler`() { | |
| onData(is(instanceOf(ItemModel.class))) | |
| .atPosition(0) | |
| .onChildView(withId(R.id.item_image)) | |
| .perform(click()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * How to use, place mockRelay in mock files or where you like | |
| * | |
| * jest.mock('react-relay', () => require('./mockRelay').mockRelay); | |
| */ | |
| import QueryRenderer from './mockQueryRenderer' | |
| const mockComponent = Component => props => <Component ...props />; | |
| exports.mockRelay = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias gb="git branch" | |
| alias cleangit="git branch | egrep -vE \"^\*|master\" | xargs git branch -d" | |
| alias swapgit="git branch | egrep -vEm1 \"^\*\" | xargs git checkout " | |
| gc() { git branch | grep "$*" | xargs git checkout;} | |
| alias cleanit="git pull && git remote prune origin && cleangit" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| grep -R --exclude-dir=node_modules "Dialog" * | sed 's/\/.*//g' | sort | uniq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe('test reading window.location', () => { | |
| beforeEach(() => | |
| window.history.replaceState( | |
| {}, | |
| 'Title', | |
| '/?code=0123456789&other=yes' | |
| ) | |
| ); | |
| it('should have code', () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # edit /etc/rc.local | |
| wifi_loaded=`dmesg | grep "ieee80211"` | |
| if [ -n "$wifi_loaded" ]; then | |
| /usr/bin/tvservice -o | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import relay from 'react-relay'; | |
| jest.mock('react-relay'); | |
| const mockQueryRenderer = props => { | |
| return class QueryRendererMock extends Component { | |
| render() { | |
| return this.props.render({ | |
| props: { | |
| ...props | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jest.mock('react-relay', () => ({ | |
| createFragmentContainer: Component => props => <Component {...props} /> | |
| })); | |
| jest.mock('react-router', () => ({ | |
| withRouter: Component => props => <Component {...props} /> | |
| })); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| export default class InputAutoComplete extends Component { | |
| constructor (props) { | |
| super(props); | |
| this.options = ['britain', 'ireland', 'norway', 'sweden', 'denmark', 'germany', 'holland', 'belgium', 'france', 'spain', 'portugal', 'italy', 'switzerland']; | |
| this.state = { | |
| input: '', | |
| selected: false |