This file contains 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 PhotoCard extends React.Component { | |
constructor(props) { | |
super(props) | |
this.state = { | |
liked: false | |
} | |
this.lastPress = 0 |
This file contains 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
render() { | |
const { liked } = this.state | |
return ( | |
<TouchableOpacity | |
activeOpacity={1} | |
style={styles.card} | |
onPress={this.handleOnPress} | |
> | |
<AnimatedIcon |
This file contains 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 { StyleSheet } from 'react-native' | |
const colors = { | |
transparent: 'transparent', | |
white: '#fff', | |
heartColor: '#e92f3c', | |
textPrimary: '#515151', | |
black: '#000', | |
} |
This file contains 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 from 'react' | |
import { View, Text, Image, TouchableOpacity, StyleSheet } from 'react-native' | |
import * as Animatable from 'react-native-animatable' | |
import Icon from 'react-native-vector-icons/AntDesign' | |
const colors = { | |
transparent: 'transparent', | |
white: '#fff', | |
heartColor: '#e92f3c', | |
textPrimary: '#515151', |
This file contains 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('Login credentials', () => { | |
it('Should write the Login in the text Input', async () => { | |
await expect(element(by.text('Log In'))).toBeVisible() | |
await element(by.id('Login')).clearText() | |
await element(by.id('Login')).typeText('Admin') | |
}) | |
it('Should write the Password in the text Input', async () => { | |
await element(by.id('Password')).clearText() |
This file contains 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('Go through the app', () => { | |
it('should Go to the Second Screen ', async () => { | |
await expect(element(by.text('Log In'))).toBeVisible() | |
await element(by.text('Log In')).tap() | |
await expect(element(by.text('Second Screen'))).toBeVisible() | |
await element(by.text('Second Screen')).tap() | |
}) | |
it('should tap on a filter', async () => { |
This file contains 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 from 'react'; | |
import { View, Text, Picker, Platform } from 'react-native'; | |
const styles = { | |
wrapper: { | |
justifyContent: 'center', alignItems: 'center', flex: 1 | |
}, | |
title: { | |
fontSize: 20, | |
marginBottom: 40 |
This file contains 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 from 'react'; | |
import { View, Text, Picker, Platform } from 'react-native'; | |
class MyPicker extends React.Component { | |
state = { | |
system: '' | |
}; | |
render() { | |
return ( |
This file contains 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-native'; | |
import React from 'react'; | |
import NameScreen from '../NameScreen'; | |
import configureStore from 'redux-mock-store'; | |
import { shallow, configure } from 'enzyme'; | |
import Adapter from 'enzyme-adapter-react-16'; | |
configure({ adapter: new Adapter() }); |
This file contains 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('LoginScreen', () => { | |
beforeEach(async () => { | |
try { | |
await device.reloadReactNative(); | |
} catch (error) {} | |
}); | |
it('should login ', async () => { | |
await waitFor(element(by.id('logIn'))) | |
.toBeVisible() |