From 078556e7d71090f691443af5e03880fbec2d0464 Mon Sep 17 00:00:00 2001 From: Diego Mello <diegolmello@gmail.com> Date: Fri, 18 May 2018 15:43:04 -0300 Subject: [PATCH] Tests updated --- __tests__/__snapshots__/RoomItem.js.snap | 213 ++++++++--- .../__snapshots__/Storyshots.test.js.snap | 335 ++++++++++++++++-- 2 files changed, 472 insertions(+), 76 deletions(-) diff --git a/__tests__/__snapshots__/RoomItem.js.snap b/__tests__/__snapshots__/RoomItem.js.snap index 9d388e323..079beb685 100644 --- a/__tests__/__snapshots__/RoomItem.js.snap +++ b/__tests__/__snapshots__/RoomItem.js.snap @@ -61,26 +61,16 @@ exports[`render channel 1`] = ` style={ Array [ Object { - "color": undefined, - "fontSize": 12, + "color": "#ffffff", }, - Array [ - Object { - "color": "#ffffff", - }, - Object { - "fontSize": 23, - }, - ], Object { - "fontFamily": "Material Design Icons", - "fontStyle": "normal", - "fontWeight": "normal", + "fontSize": 28.75, + "fontWeight": "800", }, ] } > - ï£ + G </Text> </View> <View @@ -104,6 +94,30 @@ exports[`render channel 1`] = ` } } > + <Text + accessible={true} + allowFontScaling={false} + ellipsizeMode="tail" + style={ + Array [ + Object { + "color": undefined, + "fontSize": 15, + }, + Object { + "marginRight": 5, + "marginTop": 3, + }, + Object { + "fontFamily": "Material Design Icons", + "fontStyle": "normal", + "fontWeight": "normal", + }, + ] + } + > + ï£ + </Text> <Text accessible={true} allowFontScaling={true} @@ -219,26 +233,16 @@ exports[`render no icon 1`] = ` style={ Array [ Object { - "color": undefined, - "fontSize": 12, + "color": "#ffffff", }, - Array [ - Object { - "color": "#ffffff", - }, - Object { - "fontSize": 23, - }, - ], Object { - "fontFamily": "Material Design Icons", - "fontStyle": "normal", - "fontWeight": "normal", + "fontSize": 28.75, + "fontWeight": "800", }, ] } > - + N </Text> </View> <View @@ -262,6 +266,30 @@ exports[`render no icon 1`] = ` } } > + <Text + accessible={true} + allowFontScaling={false} + ellipsizeMode="tail" + style={ + Array [ + Object { + "color": undefined, + "fontSize": 15, + }, + Object { + "marginRight": 5, + "marginTop": 3, + }, + Object { + "fontFamily": "Material Design Icons", + "fontStyle": "normal", + "fontWeight": "normal", + }, + ] + } + > + + </Text> <Text accessible={true} allowFontScaling={true} @@ -377,26 +405,16 @@ exports[`render private group 1`] = ` style={ Array [ Object { - "color": undefined, - "fontSize": 12, + "color": "#ffffff", }, - Array [ - Object { - "color": "#ffffff", - }, - Object { - "fontSize": 23, - }, - ], Object { - "fontFamily": "Material Design Icons", - "fontStyle": "normal", - "fontWeight": "normal", + "fontSize": 28.75, + "fontWeight": "800", }, ] } > - + P </Text> </View> <View @@ -420,6 +438,30 @@ exports[`render private group 1`] = ` } } > + <Text + accessible={true} + allowFontScaling={false} + ellipsizeMode="tail" + style={ + Array [ + Object { + "color": undefined, + "fontSize": 15, + }, + Object { + "marginRight": 5, + "marginTop": 3, + }, + Object { + "fontFamily": "Material Design Icons", + "fontStyle": "normal", + "fontWeight": "normal", + }, + ] + } + > + + </Text> <Text accessible={true} allowFontScaling={true} @@ -539,12 +581,13 @@ exports[`render unread +999 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 23, + "fontSize": 28.75, + "fontWeight": "800", }, ] } > - NA + N </Text> <View style={ @@ -635,6 +678,30 @@ exports[`render unread +999 1`] = ` } } > + <Text + accessible={true} + allowFontScaling={false} + ellipsizeMode="tail" + style={ + Array [ + Object { + "color": undefined, + "fontSize": 15, + }, + Object { + "marginRight": 5, + "marginTop": 3, + }, + Object { + "fontFamily": "Material Design Icons", + "fontStyle": "normal", + "fontWeight": "normal", + }, + ] + } + > + ï¥ + </Text> <Text accessible={true} allowFontScaling={true} @@ -776,12 +843,13 @@ exports[`render unread 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 23, + "fontSize": 28.75, + "fontWeight": "800", }, ] } > - NA + N </Text> <View style={ @@ -872,6 +940,30 @@ exports[`render unread 1`] = ` } } > + <Text + accessible={true} + allowFontScaling={false} + ellipsizeMode="tail" + style={ + Array [ + Object { + "color": undefined, + "fontSize": 15, + }, + Object { + "marginRight": 5, + "marginTop": 3, + }, + Object { + "fontFamily": "Material Design Icons", + "fontStyle": "normal", + "fontWeight": "normal", + }, + ] + } + > + ï¥ + </Text> <Text accessible={true} allowFontScaling={true} @@ -1013,12 +1105,13 @@ exports[`renders correctly 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 23, + "fontSize": 28.75, + "fontWeight": "800", }, ] } > - NA + N </Text> <View style={ @@ -1109,6 +1202,30 @@ exports[`renders correctly 1`] = ` } } > + <Text + accessible={true} + allowFontScaling={false} + ellipsizeMode="tail" + style={ + Array [ + Object { + "color": undefined, + "fontSize": 15, + }, + Object { + "marginRight": 5, + "marginTop": 3, + }, + Object { + "fontFamily": "Material Design Icons", + "fontStyle": "normal", + "fontWeight": "normal", + }, + ] + } + > + ï¥ + </Text> <Text accessible={true} allowFontScaling={true} diff --git a/__tests__/__snapshots__/Storyshots.test.js.snap b/__tests__/__snapshots__/Storyshots.test.js.snap index 9310dc94c..1751229cd 100644 --- a/__tests__/__snapshots__/Storyshots.test.js.snap +++ b/__tests__/__snapshots__/Storyshots.test.js.snap @@ -30,12 +30,13 @@ exports[`Storyshots Avatar avatar 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 12.5, + "fontSize": 15.625, + "fontWeight": "800", }, ] } > - TE + T </Text> <View style={ @@ -108,12 +109,13 @@ exports[`Storyshots Avatar avatar 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 20, + "fontSize": 25, + "fontWeight": "800", }, ] } > - AA + A </Text> <View style={ @@ -186,12 +188,13 @@ exports[`Storyshots Avatar avatar 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 15, + "fontSize": 18.75, + "fontWeight": "800", }, ] } > - BB + B </Text> <View style={ @@ -264,12 +267,13 @@ exports[`Storyshots Avatar avatar 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 12.5, + "fontSize": 15.625, + "fontWeight": "800", }, ] } > - TE + T </Text> <View style={ @@ -384,12 +388,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 23, + "fontSize": 28.75, + "fontWeight": "800", }, ] } > - RC + R </Text> <View style={ @@ -480,6 +485,30 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } } > + <Text + accessible={true} + allowFontScaling={false} + ellipsizeMode="tail" + style={ + Array [ + Object { + "color": undefined, + "fontSize": 15, + }, + Object { + "marginRight": 5, + "marginTop": 3, + }, + Object { + "fontFamily": "Material Design Icons", + "fontStyle": "normal", + "fontWeight": "normal", + }, + ] + } + > + ï¥ + </Text> <Text accessible={true} allowFontScaling={true} @@ -593,12 +622,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 23, + "fontSize": 28.75, + "fontWeight": "800", }, ] } > - RC + R </Text> <View style={ @@ -689,6 +719,30 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } } > + <Text + accessible={true} + allowFontScaling={false} + ellipsizeMode="tail" + style={ + Array [ + Object { + "color": undefined, + "fontSize": 15, + }, + Object { + "marginRight": 5, + "marginTop": 3, + }, + Object { + "fontFamily": "Material Design Icons", + "fontStyle": "normal", + "fontWeight": "normal", + }, + ] + } + > + ï¥ + </Text> <Text accessible={true} allowFontScaling={true} @@ -806,12 +860,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 23, + "fontSize": 28.75, + "fontWeight": "800", }, ] } > - RC + R </Text> <View style={ @@ -902,6 +957,30 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } } > + <Text + accessible={true} + allowFontScaling={false} + ellipsizeMode="tail" + style={ + Array [ + Object { + "color": undefined, + "fontSize": 15, + }, + Object { + "marginRight": 5, + "marginTop": 3, + }, + Object { + "fontFamily": "Material Design Icons", + "fontStyle": "normal", + "fontWeight": "normal", + }, + ] + } + > + ï¥ + </Text> <Text accessible={true} allowFontScaling={true} @@ -1038,12 +1117,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 23, + "fontSize": 28.75, + "fontWeight": "800", }, ] } > - LC + L </Text> <View style={ @@ -1134,6 +1214,30 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } } > + <Text + accessible={true} + allowFontScaling={false} + ellipsizeMode="tail" + style={ + Array [ + Object { + "color": undefined, + "fontSize": 15, + }, + Object { + "marginRight": 5, + "marginTop": 3, + }, + Object { + "fontFamily": "Material Design Icons", + "fontStyle": "normal", + "fontWeight": "normal", + }, + ] + } + > + ï¥ + </Text> <Text accessible={true} allowFontScaling={true} @@ -1274,12 +1378,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 23, + "fontSize": 28.75, + "fontWeight": "800", }, ] } > - LC + L </Text> <View style={ @@ -1370,6 +1475,30 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } } > + <Text + accessible={true} + allowFontScaling={false} + ellipsizeMode="tail" + style={ + Array [ + Object { + "color": undefined, + "fontSize": 15, + }, + Object { + "marginRight": 5, + "marginTop": 3, + }, + Object { + "fontFamily": "Material Design Icons", + "fontStyle": "normal", + "fontWeight": "normal", + }, + ] + } + > + ï¥ + </Text> <Text accessible={true} allowFontScaling={true} @@ -1506,12 +1635,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 23, + "fontSize": 28.75, + "fontWeight": "800", }, ] } > - LC + L </Text> <View style={ @@ -1602,6 +1732,30 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } } > + <Text + accessible={true} + allowFontScaling={false} + ellipsizeMode="tail" + style={ + Array [ + Object { + "color": undefined, + "fontSize": 15, + }, + Object { + "marginRight": 5, + "marginTop": 3, + }, + Object { + "fontFamily": "Material Design Icons", + "fontStyle": "normal", + "fontWeight": "normal", + }, + ] + } + > + ï¥ + </Text> <Text accessible={true} allowFontScaling={true} @@ -1738,12 +1892,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 23, + "fontSize": 28.75, + "fontWeight": "800", }, ] } > - LC + L </Text> <View style={ @@ -1834,6 +1989,30 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } } > + <Text + accessible={true} + allowFontScaling={false} + ellipsizeMode="tail" + style={ + Array [ + Object { + "color": undefined, + "fontSize": 15, + }, + Object { + "marginRight": 5, + "marginTop": 3, + }, + Object { + "fontFamily": "Material Design Icons", + "fontStyle": "normal", + "fontWeight": "normal", + }, + ] + } + > + ï¥ + </Text> <Text accessible={true} allowFontScaling={true} @@ -1970,12 +2149,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 23, + "fontSize": 28.75, + "fontWeight": "800", }, ] } > - LC + L </Text> <View style={ @@ -2066,6 +2246,30 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } } > + <Text + accessible={true} + allowFontScaling={false} + ellipsizeMode="tail" + style={ + Array [ + Object { + "color": undefined, + "fontSize": 15, + }, + Object { + "marginRight": 5, + "marginTop": 3, + }, + Object { + "fontFamily": "Material Design Icons", + "fontStyle": "normal", + "fontWeight": "normal", + }, + ] + } + > + ï¥ + </Text> <Text accessible={true} allowFontScaling={true} @@ -2202,7 +2406,8 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 23, + "fontSize": 28.75, + "fontWeight": "800", }, ] } @@ -2298,6 +2503,30 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } } > + <Text + accessible={true} + allowFontScaling={false} + ellipsizeMode="tail" + style={ + Array [ + Object { + "color": undefined, + "fontSize": 15, + }, + Object { + "marginRight": 5, + "marginTop": 3, + }, + Object { + "fontFamily": "Material Design Icons", + "fontStyle": "normal", + "fontWeight": "normal", + }, + ] + } + > + ï¥ + </Text> <Text accessible={true} allowFontScaling={true} @@ -2411,12 +2640,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 23, + "fontSize": 28.75, + "fontWeight": "800", }, ] } > - WW + W </Text> <View style={ @@ -2507,6 +2737,30 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } } > + <Text + accessible={true} + allowFontScaling={false} + ellipsizeMode="tail" + style={ + Array [ + Object { + "color": undefined, + "fontSize": 15, + }, + Object { + "marginRight": 5, + "marginTop": 3, + }, + Object { + "fontFamily": "Material Design Icons", + "fontStyle": "normal", + "fontWeight": "normal", + }, + ] + } + > + ï¥ + </Text> <Text accessible={true} allowFontScaling={true} @@ -2620,7 +2874,8 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 23, + "fontSize": 28.75, + "fontWeight": "800", }, ] } @@ -2716,6 +2971,30 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } } > + <Text + accessible={true} + allowFontScaling={false} + ellipsizeMode="tail" + style={ + Array [ + Object { + "color": undefined, + "fontSize": 15, + }, + Object { + "marginRight": 5, + "marginTop": 3, + }, + Object { + "fontFamily": "Material Design Icons", + "fontStyle": "normal", + "fontWeight": "normal", + }, + ] + } + > + ï¥ + </Text> <Text accessible={true} allowFontScaling={true} -- GitLab