Skip to content

Commit

Permalink
Merge pull request #145 from fga-eps-mds/dev
Browse files Browse the repository at this point in the history
Merge dev in master
  • Loading branch information
min-ia authored Nov 26, 2018
2 parents a71c883 + a13b62b commit 3947641
Show file tree
Hide file tree
Showing 40 changed files with 1,718 additions and 326 deletions.
Empty file added .Rhistory
Empty file.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.env*
*.env
Config.js
mobile/app.json

# Xcode
!**/*.xcodeproj
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ build:
docker-compose build

run:
cp mobile/config/app-development.json mobile/app.json
python get-ip-address.py $(IP)
docker-compose up -d
docker-compose exec front bash -c "yarn; bash"
Expand Down
31 changes: 0 additions & 31 deletions mobile/app.json

This file was deleted.

4 changes: 2 additions & 2 deletions mobile/config/app-development.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
},
"android": {
"package": "com.unbgama.integra",
"versionCode": 3,
"versionCode": 8,
"config": {
"googleMaps": {
"apiKey": "AIzaSyBtDGKIxbngjRePVN93YgE176CMKBKUgzI"
"apiKey": "AIzaSyCTPTVfQS6T0YQn60cPezC-qYGinpMd5ag"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions mobile/config/app-production.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
},
"android": {
"package": "com.unbgama.integra",
"versionCode": 2,
"versionCode": 7,
"config": {
"googleMaps": {
"apiKey": "AIzaSyBtDGKIxbngjRePVN93YgE176CMKBKUgzI"
"apiKey": "AIzaSyCTPTVfQS6T0YQn60cPezC-qYGinpMd5ag"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"react-native-dialog-input": "^1.0.4",
"react-native-flash-message": "^0.1.10",
"react-native-google-maps-directions": "^2.0.0",
"react-native-keyboard-aware-scroll-view": "^0.7.4",
"react-native-maps": "^0.21.0",
"react-native-sectioned-multi-select": "^0.6.2",
"react-native-swiper": "^1.5.13",
Expand Down
18 changes: 12 additions & 6 deletions mobile/screens/LoginScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,19 @@ class LoginScreen extends Component {
}

termsOfUse = () => {
Linking.canOpenURL('https://github.com/fga-eps-mds/2018.2-FGAPP-FrontEnd/blob/indica-ai-app/195-homologation-environment/mobile/TERMS_OF_USE.md').then(supported => {
Linking.canOpenURL(
'https://github.com/fga-eps-mds/2018.2-FGAPP-FrontEnd/' +
'blob/master/mobile/TERMS_OF_USE.md'
).then(supported => {
if (supported) {
Linking.openURL('https://github.com/fga-eps-mds/2018.2-FGAPP-FrontEnd/blob/indica-ai-app/195-homologation-environment/mobile/TERMS_OF_USE.md');
Linking.openURL(
'https://github.com/fga-eps-mds/2018.2-FGAPP-FrontEnd/' +
'blob/master/mobile/TERMS_OF_USE.md'
);
} else {
console.log("Don't know how to open TERMS OF USE");
}
});
});
}

checkJson(responseJson){
Expand Down Expand Up @@ -184,11 +190,11 @@ class LoginScreen extends Component {
</Text>
</TouchableOpacity>
</View>

<View style={{padding: 20, alignItems: 'center', justifyContent: 'center'}}>
<TouchableOpacity onPress={ this.termsOfUse }>
<Text
style={{color: 'black', textDecorationLine: 'underline'}}>
style={{color: 'white', textDecorationLine: 'underline'}}>
Termos de Uso
</Text>
</TouchableOpacity>
Expand All @@ -208,4 +214,4 @@ const styles = StyleSheet.create({
alignItems: 'center',
justifyContent: 'center'
}
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import Adapter from 'enzyme-adapter-react-16';
import {shallow} from 'enzyme';
import Enzyme from 'enzyme';
import renderer from 'react-test-renderer';

import ButtonWithIcon from '../components/ButtonWithIcon';

Enzyme.configure({adapter: new Adapter()});

it('renders correctly', () => {
const tree = renderer.create(<ButtonWithIcon />).toJSON();
expect(tree).toMatchSnapshot();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import Adapter from 'enzyme-adapter-react-16';
import {shallow} from 'enzyme';
import Enzyme from 'enzyme';
import renderer from 'react-test-renderer';

import DirectionModal from '../components/DirectionModal';

Enzyme.configure({adapter: new Adapter()});

it('renders correctly', () => {
const tree = renderer.create(<DirectionModal />).toJSON();
expect(tree).toMatchSnapshot();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import Adapter from 'enzyme-adapter-react-16';
import {shallow} from 'enzyme';
import Enzyme from 'enzyme';
import renderer from 'react-test-renderer';

import ErrorModal from '../components/ErrorModal';

Enzyme.configure({adapter: new Adapter()});

it('renders correctly', () => {
const tree = renderer.create(<ErrorModal />).toJSON();
expect(tree).toMatchSnapshot();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import Adapter from 'enzyme-adapter-react-16';
import {shallow} from 'enzyme';
import Enzyme from 'enzyme';
import renderer from 'react-test-renderer';

import FavoriteIcon from '../components/FavoriteIcon';

Enzyme.configure({adapter: new Adapter()});

it('renders correctly', () => {
const tree = renderer.create(<FavoriteIcon />).toJSON();
expect(tree).toMatchSnapshot();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import Adapter from 'enzyme-adapter-react-16';
import {shallow} from 'enzyme';
import Enzyme from 'enzyme';
import renderer from 'react-test-renderer';

import IconMessage from '../components/IconMessage';

Enzyme.configure({adapter: new Adapter()});

it('renders correctly', () => {
const tree = renderer.create(<IconMessage />).toJSON();
expect(tree).toMatchSnapshot();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import Adapter from 'enzyme-adapter-react-16';
import {shallow} from 'enzyme';
import Enzyme from 'enzyme';
import renderer from 'react-test-renderer';

import ImageModal from '../components/ImageModal';

Enzyme.configure({adapter: new Adapter()});

it('renders correctly', () => {
const tree = renderer.create(<ImageModal />).toJSON();
expect(tree).toMatchSnapshot();
});
28 changes: 28 additions & 0 deletions mobile/screens/tab_navigator/indica_ai/__tests__/SearchBar.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from 'react';
import { shallow } from 'enzyme';
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

import SearchBar from '../screens/search_local/SearchScreen';
import ButtonWithIcon from '../components/ButtonWithIcon';
import InputWithButton from '../components/InputWithButton.js';
import renderer from 'react-test-renderer';


Enzyme.configure({adapter: new Adapter()});

describe('Test SearchScreen action', () => {

it("Test search locals by name was success", () => {
const url = 'https://indicaai.herokuapp.com/locals/name/${name}';
const name = 'fgaTest';

expect(name.length).toBeGreaterThan(0);
})

it ("Test searchAction", () => {
const url = 'https://indicaai.herokuapp.com/locals/name/${"test"}';

expect([1,2]).toEqual([1,2]);
})
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import Adapter from 'enzyme-adapter-react-16';
import {shallow} from 'enzyme';
import Enzyme from 'enzyme';
import renderer from 'react-test-renderer';

import SuccessModal from '../components/SuccessModal';

Enzyme.configure({adapter: new Adapter()});

it('renders correctly', () => {
const tree = renderer.create(<SuccessModal />).toJSON();
expect(tree).toMatchSnapshot();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import Adapter from 'enzyme-adapter-react-16';
import {shallow} from 'enzyme';
import Enzyme from 'enzyme';
import renderer from 'react-test-renderer';

import WarningModal from '../components/WarningModal';

Enzyme.configure({adapter: new Adapter()});

it('renders correctly', () => {
const tree = renderer.create(<WarningModal />).toJSON();
expect(tree).toMatchSnapshot();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`renders correctly 1`] = `
<View
accessibilityComponentType={undefined}
accessibilityLabel={undefined}
accessibilityTraits={undefined}
accessible={true}
collapsable={undefined}
hasTVPreferredFocus={undefined}
hitSlop={undefined}
isTVSelectable={true}
nativeID={undefined}
onLayout={undefined}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"alignItems": "center",
"alignSelf": "stretch",
"backgroundColor": "#62B1F6",
"borderBottomWidth": null,
"borderColor": "#007aff",
"borderLeftWidth": null,
"borderRadius": 5,
"borderRightWidth": null,
"borderTopWidth": null,
"borderWidth": undefined,
"elevation": 2,
"flexDirection": "row",
"height": 45,
"justifyContent": "center",
"marginHorizontal": 10,
"opacity": 1,
"paddingBottom": 6,
"paddingTop": 6,
"shadowColor": undefined,
"shadowOffset": undefined,
"shadowOpacity": undefined,
"shadowRadius": undefined,
"top": 30,
}
}
testID={undefined}
tvParallaxProperties={undefined}
>
<Text
accessible={true}
allowFontScaling={true}
ellipsizeMode="tail"
/>
<Text
accessible={true}
allowFontScaling={true}
ellipsizeMode="tail"
style={
Array [
Object {
"backgroundColor": "transparent",
"color": "#fff",
"fontFamily": "System",
"fontSize": 16.5,
"marginLeft": 0,
"marginRight": 0,
"paddingLeft": 16,
"paddingRight": 16,
},
Object {
"color": "white",
},
]
}
uppercase={false}
virtual={undefined}
/>
</View>
`;
Loading

0 comments on commit 3947641

Please sign in to comment.