Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding more component jest snapshots #30

Merged
merged 25 commits into from
Dec 19, 2018
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2c3000d
refs #22
marcelomorgado Dec 18, 2018
7fda7ae
Merge branch 'develop' into feature/snapshots
pcowgill Dec 18, 2018
e5732e4
Merge pull request #7 from pcowgill/feature/snapshots
marcelomorgado Dec 18, 2018
ceed977
Screen/Presentational components refactoring
marcelomorgado Dec 18, 2018
59ed95d
Screens components snapshot update
marcelomorgado Dec 18, 2018
0cf20ba
Presentational components tests & snapshots
marcelomorgado Dec 18, 2018
60ce394
Bug fix
marcelomorgado Dec 18, 2018
2926d9c
Merge branch 'feature/snapshots' of https://github.com/marcelomorgado…
marcelomorgado Dec 18, 2018
2ad694f
Merge branch 'develop' of https://github.com/tasitlabs/tasit into fea…
marcelomorgado Dec 18, 2018
4ec934a
Merge branch 'develop' into feature/snapshots
pcowgill Dec 18, 2018
1170dc4
Update demo/components/presentational/EthereumQuestion.js
pcowgill Dec 19, 2018
a4290da
Update demo/components/presentational/EthereumSignIn.js
pcowgill Dec 19, 2018
8416143
Update demo/components/presentational/Home.js
pcowgill Dec 19, 2018
f3c0081
Update demo/components/presentational/LandClaim.js
pcowgill Dec 19, 2018
bf976c4
Update demo/components/presentational/ListLands.js
pcowgill Dec 19, 2018
17daf30
Update demo/components/presentational/OnboardingHome.js
pcowgill Dec 19, 2018
aac14c4
Update demo/screens/EthereumQuestionScreen.js
pcowgill Dec 19, 2018
2646ea3
Update demo/screens/EthereumSignInScreen.js
pcowgill Dec 19, 2018
f8f6a47
Update demo/screens/EthereumSignUpScreen.js
pcowgill Dec 19, 2018
02b6958
Update demo/screens/HomeScreen.js
pcowgill Dec 19, 2018
94db968
Update demo/screens/LandClaimScreen.js
pcowgill Dec 19, 2018
bd354cc
Update demo/screens/OnboardingHomeScreen.js
pcowgill Dec 19, 2018
f8f718c
Removing old components (without Screen suffix).
marcelomorgado Dec 19, 2018
47f3899
react-native-responsive-dimensions
marcelomorgado Dec 19, 2018
951427b
Update snapshots of components affected by responsive-dimentions
marcelomorgado Dec 19, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions demo/components/presentational/EthereumQuestion.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from "react";
import { Button, StyleSheet, View } from "react-native";
import { responsiveHeight } from "react-native-responsive-dimensions";
import LargeText from "./LargeText";
import Colors from "../../constants/Colors";
import Colors from "@constants/Colors";

export default function EthereumQuestion(props) {
return (
Expand All @@ -26,6 +27,6 @@ const styles = StyleSheet.create({
},
buttonView: {
flexDirection: "row",
marginTop: 20,
marginTop: responsiveHeight(4),
},
});
5 changes: 3 additions & 2 deletions demo/components/presentational/EthereumSignIn.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from "react";
import { Button, StyleSheet, View } from "react-native";
import { responsiveHeight } from "react-native-responsive-dimensions";
import LargeText from "./LargeText";
import Colors from "../../constants/Colors";
import Colors from "@constants/Colors";

export default function EthereumSignIn(props) {
return (
Expand All @@ -23,6 +24,6 @@ const styles = StyleSheet.create({
},
buttonView: {
flexDirection: "row",
marginTop: 30,
marginTop: responsiveHeight(5),
},
});
3 changes: 2 additions & 1 deletion demo/components/presentational/EthereumSignUp.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React from "react";
import { StyleSheet, KeyboardAvoidingView } from "react-native";
import { responsiveHeight } from "react-native-responsive-dimensions";
import { Header } from "react-navigation";
import Colors from "@constants/Colors";
import LargeText from "@presentational/LargeText";
import EthereumSignUpForm from "@presentational/EthereumSignUpForm";

export default class EthereumSignUp extends React.Component {
render() {
const OFFSET = 20;
const OFFSET = responsiveHeight(3);
return (
<KeyboardAvoidingView
keyboardVerticalOffset={Header.HEIGHT + OFFSET}
Expand Down
15 changes: 12 additions & 3 deletions demo/components/presentational/EthereumSignUpForm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import React from "react";
import { Button, StyleSheet, View, Text, TextInput } from "react-native";
import {
responsiveHeight,
responsiveWidth,
responsiveFontSize,
} from "react-native-responsive-dimensions";
import { Account } from "tasit-sdk";

export default class EthereumSignUpForm extends React.Component {
Expand Down Expand Up @@ -43,11 +48,15 @@ export default class EthereumSignUpForm extends React.Component {
const styles = StyleSheet.create({
userRow: { flexDirection: "row" },
userInputView: { flex: 1, alignItems: "flex-end" },
userInput: { justifyContent: "flex-start", width: 90, fontSize: 20 },
userInput: {
justifyContent: "flex-start",
width: responsiveWidth(28),
fontSize: responsiveFontSize(3),
},
ensView: { flex: 1 },
ensText: { justifyContent: "flex-end", fontSize: 20 },
ensText: { justifyContent: "flex-end", fontSize: responsiveFontSize(3) },
buttonView: {
flexDirection: "row",
marginTop: 30,
marginTop: responsiveHeight(5),
},
});
2 changes: 1 addition & 1 deletion demo/components/presentational/Home.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { Image, Button, StyleSheet, View } from "react-native";
import LargeText from "./LargeText";
import Colors from "../../constants/Colors";
import Colors from "@constants/Colors";

export default function Home(props) {
return (
Expand Down
3 changes: 2 additions & 1 deletion demo/components/presentational/Land.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import { Image, StyleSheet, View, Text } from "react-native";
import { responsiveWidth } from "react-native-responsive-dimensions";

export default function Land({ land }) {
return (
Expand All @@ -15,6 +16,6 @@ export default function Land({ land }) {

const styles = StyleSheet.create({
landContainer: {
width: 224,
width: responsiveWidth(60),
},
});
5 changes: 3 additions & 2 deletions demo/components/presentational/LandClaim.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from "react";
import { StyleSheet, View, Button } from "react-native";
import { responsiveHeight } from "react-native-responsive-dimensions";
import Land from "./Land";
import Colors from "../../constants/Colors";
import Colors from "@constants/Colors";

export default function LandClaim(props) {
return (
Expand All @@ -27,6 +28,6 @@ const styles = StyleSheet.create({
},
buttonView: {
flexDirection: "row",
marginTop: 30,
marginTop: responsiveHeight(5),
},
});
11 changes: 9 additions & 2 deletions demo/components/presentational/LandRow.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import React from "react";
import { StyleSheet, View, TouchableHighlight } from "react-native";
import {
responsiveHeight,
responsiveWidth,
} from "react-native-responsive-dimensions";
import Land from "./Land";

export default function LandRow(props) {
Expand All @@ -14,8 +18,11 @@ export default function LandRow(props) {

const styles = StyleSheet.create({
row: {
padding: 15,
marginBottom: 5,
paddingTop: responsiveHeight(3),
pcowgill marked this conversation as resolved.
Show resolved Hide resolved
paddingBottom: responsiveHeight(3),
paddingLeft: responsiveWidth(3),
paddingRight: responsiveWidth(3),
marginBottom: responsiveHeight(1),
alignItems: "center",
justifyContent: "center",
},
Expand Down
7 changes: 5 additions & 2 deletions demo/components/presentational/LargeText.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import React from "react";
import { StyleSheet, Text } from "react-native";
import { responsiveHeight } from "react-native-responsive-dimensions";
import {
responsiveHeight,
responsiveFontSize,
} from "react-native-responsive-dimensions";
import Colors from "@constants/Colors";

export default function LargeText(props) {
Expand All @@ -10,7 +13,7 @@ export default function LargeText(props) {
const styles = StyleSheet.create({
text: {
padding: responsiveHeight(2),
fontSize: 30,
fontSize: responsiveFontSize(4),
textAlign: "center",
fontWeight: "bold",
color: Colors.textColor,
Expand Down
2 changes: 1 addition & 1 deletion demo/components/presentational/ListLands.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { ListView, StyleSheet } from "react-native";
import Colors from "../../constants/Colors";
import Colors from "@constants/Colors";

export default function ListLands(props) {
return (
Expand Down
5 changes: 3 additions & 2 deletions demo/components/presentational/OnboardingHome.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from "react";
import { Image, Button, StyleSheet, View } from "react-native";
import { responsiveHeight } from "react-native-responsive-dimensions";
import LargeText from "./LargeText";
import Colors from "../../constants/Colors";
import Colors from "@constants/Colors";

export default function OnboardingHome(props) {
return (
Expand All @@ -24,6 +25,6 @@ const styles = StyleSheet.create({
},
buttonView: {
flexDirection: "row",
marginTop: 30,
marginTop: responsiveHeight(5),
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports[`EthereumQuestion renders the component 1`] = `
style={
Object {
"flexDirection": "row",
"marginTop": 20,
"marginTop": 53.36,
}
}
>
Expand All @@ -31,7 +31,7 @@ exports[`EthereumQuestion renders the component 1`] = `
style={
Object {
"flexDirection": "row",
"marginTop": 20,
"marginTop": 53.36,
}
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports[`EthereumSignIn renders the component 1`] = `
style={
Object {
"flexDirection": "row",
"marginTop": 30,
"marginTop": 66.7,
}
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`EthereumSignUp renders the component 1`] = `
<KeyboardAvoidingView
behavior="padding"
enabled={true}
keyboardVerticalOffset={84}
keyboardVerticalOffset={104.02}
style={
Object {
"alignItems": "center",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ exports[`EthereumSignUpForm renders the component 1`] = `
placeholder="username"
style={
Object {
"fontSize": 20,
"fontSize": 45.89389937671454,
pcowgill marked this conversation as resolved.
Show resolved Hide resolved
"justifyContent": "flex-start",
"width": 90,
"width": 210.00000000000003,
}
}
underlineColorAndroid="transparent"
Expand All @@ -44,7 +44,7 @@ exports[`EthereumSignUpForm renders the component 1`] = `
<Component
style={
Object {
"fontSize": 20,
"fontSize": 45.89389937671454,
"justifyContent": "flex-end",
}
}
Expand All @@ -57,7 +57,7 @@ exports[`EthereumSignUpForm renders the component 1`] = `
style={
Object {
"flexDirection": "row",
"marginTop": 30,
"marginTop": 66.7,
}
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`Land renders the component 1`] = `
<Component
style={
Object {
"width": 224,
"width": 450,
}
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports[`LandClaim renders the component 1`] = `
style={
Object {
"flexDirection": "row",
"marginTop": 30,
"marginTop": 66.7,
}
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ exports[`LandRow renders the component 1`] = `
Object {
"alignItems": "center",
"justifyContent": "center",
"marginBottom": 5,
"padding": 15,
"marginBottom": 13.34,
"paddingBottom": 40.019999999999996,
"paddingLeft": 22.5,
"paddingRight": 22.5,
"paddingTop": 40.019999999999996,
}
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`LargeText renders the component 1`] = `
style={
Object {
"color": "gray",
"fontSize": 30,
"fontSize": 61.191865835619396,
"fontWeight": "bold",
"padding": 26.68,
"textAlign": "center",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`OnboardingHome renders the component 1`] = `
style={
Object {
"flexDirection": "row",
"marginTop": 30,
"marginTop": 66.7,
}
}
>
Expand Down
39 changes: 0 additions & 39 deletions demo/screens/EthereumQuestion.js

This file was deleted.

2 changes: 1 addition & 1 deletion demo/screens/EthereumQuestionScreen.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import EthereumQuestion from "../components/presentational/EthereumQuestion";
import EthereumQuestion from "@presentational/EthereumQuestion";

export default class EthereumQuestionScreen extends React.Component {
render() {
Expand Down
30 changes: 0 additions & 30 deletions demo/screens/EthereumSignIn.js

This file was deleted.

2 changes: 1 addition & 1 deletion demo/screens/EthereumSignInScreen.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import EthereumSignIn from "../components/presentational/EthereumSignIn";
import EthereumSignIn from "@presentational/EthereumSignIn";

export default class EthereumSignInScreen extends React.Component {
render() {
Expand Down
Loading