diff options
author | João Ferreiro <ferreiro@pinkroom.dev> | 2022-12-22 15:32:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-22 09:32:39 -0600 |
commit | 7517b65dcd676f36d38f31c991929c32168b3e12 (patch) | |
tree | 65793d2575b205365c2997b4bbddc1ba6424d2ba /__tests__/view/screens/__snapshots__/PostThread.test.tsx.snap | |
parent | 4913a07e3365d2004e67e9131dd4b4c15094dd33 (diff) | |
download | voidsky-7517b65dcd676f36d38f31c991929c32168b3e12.tar.zst |
Unit testing (#32)
* add testing lib * remove coverage folder from git * finished basic test setup * fix tests typescript and import paths * add first snapshot * testing utils * rename test files; update script flags; ++tests * testing utils functions * testing downloadAndResize wip * remove download test * specify unwanted coverage paths; remove update snapshots flag * fix strings tests * testing downloadAndResize method * increasing testing * fixing snapshots wip * fixed shell mobile snapshot * adding snapshots for the screens * fix onboard snapshot * fix typescript issues * fix TabsSelector snapshot * Account for testing device's locale in ago() tests * Remove platform detection on regex Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to '__tests__/view/screens/__snapshots__/PostThread.test.tsx.snap')
-rw-r--r-- | __tests__/view/screens/__snapshots__/PostThread.test.tsx.snap | 437 |
1 files changed, 437 insertions, 0 deletions
diff --git a/__tests__/view/screens/__snapshots__/PostThread.test.tsx.snap b/__tests__/view/screens/__snapshots__/PostThread.test.tsx.snap new file mode 100644 index 000000000..abb36931c --- /dev/null +++ b/__tests__/view/screens/__snapshots__/PostThread.test.tsx.snap @@ -0,0 +1,437 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`PostThread renders correctly 1`] = ` +<View + style={ + Object { + "flex": 1, + } + } +> + <View + style={ + Object { + "alignItems": "center", + "backgroundColor": "#ffffff", + "borderBottomColor": "#f8f3f3", + "borderBottomWidth": 1, + "flexDirection": "row", + "paddingBottom": 6, + "paddingHorizontal": 12, + "paddingTop": 6, + } + } + > + <View + accessible={true} + collapsable={false} + focusable={true} + hitSlop={ + Object { + "bottom": 10, + "left": 10, + "right": 30, + "top": 10, + } + } + onClick={[Function]} + onResponderGrant={[Function]} + onResponderMove={[Function]} + onResponderRelease={[Function]} + onResponderTerminate={[Function]} + onResponderTerminationRequest={[Function]} + onStartShouldSetResponder={[Function]} + style={ + Object { + "height": 30, + "opacity": 1, + "width": 40, + } + } + > + <RNSVGSvgView + align="xMidYMid" + bbHeight={30} + bbWidth={30} + focusable={false} + height={30} + meetOrSlice={0} + minX={0} + minY={0} + style={ + Array [ + Object { + "backgroundColor": "transparent", + "borderWidth": 0, + }, + Object { + "flex": 0, + "height": 30, + "width": 30, + }, + ] + } + vbHeight={100} + vbWidth={100} + width={30} + > + <RNSVGGroup> + <RNSVGDefs> + <RNSVGLinearGradient + gradient={ + Array [ + 0, + -1292135, + 1, + -2424577, + ] + } + gradientTransform={null} + gradientUnits={0} + name="grad" + x1="0" + x2="1" + y1="0" + y2="1" + /> + </RNSVGDefs> + <RNSVGCircle + cx="50" + cy="50" + fill={ + Array [ + 1, + "grad", + ] + } + propList={ + Array [ + "fill", + ] + } + r="50" + /> + <RNSVGText + content={null} + dx={Array []} + dy={Array []} + fill={4294967295} + font={ + Object { + "fontSize": "50", + "fontWeight": "bold", + "textAnchor": "middle", + } + } + propList={ + Array [ + "fill", + ] + } + rotate={Array []} + x={ + Array [ + "50", + ] + } + y={ + Array [ + "67", + ] + } + > + <RNSVGTSpan + content="X" + dx={Array []} + dy={Array []} + font={Object {}} + rotate={Array []} + x={Array []} + y={Array []} + /> + </RNSVGText> + </RNSVGGroup> + </RNSVGSvgView> + </View> + <View + pointerEvents="none" + style={ + Object { + "alignItems": "baseline", + "flexDirection": "row", + "marginRight": "auto", + } + } + > + <Text + style={ + Array [ + Object { + "color": "#000000", + }, + Object { + "color": "#000000", + "fontSize": 21, + "fontWeight": "600", + }, + ] + } + > + Post + </Text> + <Text + numberOfLines={1} + style={ + Array [ + Object { + "color": "#000000", + }, + Object { + "color": "#968d8d", + "fontSize": 18, + "marginLeft": 6, + "maxWidth": 200, + }, + ] + } + > + by test name + </Text> + </View> + <View + accessible={true} + collapsable={false} + focusable={true} + hitSlop={ + Object { + "bottom": 10, + "left": 10, + "right": 10, + "top": 10, + } + } + onClick={[Function]} + onResponderGrant={[Function]} + onResponderMove={[Function]} + onResponderRelease={[Function]} + onResponderTerminate={[Function]} + onResponderTerminationRequest={[Function]} + onStartShouldSetResponder={[Function]} + style={ + Object { + "alignItems": "center", + "backgroundColor": "#f8f3f3", + "borderRadius": 20, + "flexDirection": "row", + "height": 36, + "justifyContent": "center", + "opacity": 1, + "width": 36, + } + } + > + < + icon="plus" + size={18} + /> + </View> + <View + accessible={true} + collapsable={false} + focusable={true} + hitSlop={ + Object { + "bottom": 10, + "left": 10, + "right": 10, + "top": 10, + } + } + onClick={[Function]} + onResponderGrant={[Function]} + onResponderMove={[Function]} + onResponderRelease={[Function]} + onResponderTerminate={[Function]} + onResponderTerminationRequest={[Function]} + onStartShouldSetResponder={[Function]} + style={ + Object { + "alignItems": "center", + "backgroundColor": "#f8f3f3", + "borderRadius": 20, + "flexDirection": "row", + "height": 36, + "justifyContent": "center", + "marginLeft": 8, + "opacity": 1, + "width": 36, + } + } + > + <RNSVGSvgView + align="xMidYMid" + bbHeight={18} + bbWidth={18} + color={4278190080} + fill="none" + focusable={false} + height={18} + meetOrSlice={0} + minX={0} + minY={0} + stroke="currentColor" + strokeWidth={3} + style={ + Array [ + Object { + "backgroundColor": "transparent", + "borderWidth": 0, + }, + Object { + "color": "#000000", + "position": "relative", + "top": -1, + }, + Object { + "flex": 0, + "height": 18, + "width": 18, + }, + ] + } + tintColor={4278190080} + vbHeight={24} + vbWidth={24} + width={18} + > + <RNSVGGroup + fill={null} + propList={ + Array [ + "fill", + "stroke", + "strokeWidth", + ] + } + stroke={ + Array [ + 2, + ] + } + strokeWidth={3} + > + <RNSVGPath + d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" + propList={ + Array [ + "strokeLinecap", + "strokeLinejoin", + ] + } + strokeLinecap={1} + strokeLinejoin={1} + /> + </RNSVGGroup> + </RNSVGSvgView> + </View> + <View + accessible={true} + collapsable={false} + focusable={true} + onClick={[Function]} + onResponderGrant={[Function]} + onResponderMove={[Function]} + onResponderRelease={[Function]} + onResponderTerminate={[Function]} + onResponderTerminationRequest={[Function]} + onStartShouldSetResponder={[Function]} + style={ + Object { + "alignItems": "center", + "backgroundColor": "#ffffff", + "borderRadius": 20, + "flexDirection": "row", + "height": 36, + "justifyContent": "center", + "marginLeft": 8, + "opacity": 1, + "width": 36, + } + } + > + < + icon="signal" + size={18} + style={ + Array [ + Object { + "color": "#000000", + }, + ] + } + /> + < + icon="x" + size={12} + style={ + Object { + "backgroundColor": "#ffffff", + "color": "#d1106f", + "left": -4, + "position": "relative", + "top": 6, + } + } + /> + </View> + </View> + <View + style={ + Object { + "flex": 1, + } + } + > + <RCTScrollView + contentContainerStyle={ + Object { + "paddingBottom": 200, + } + } + data={Array []} + getItem={[Function]} + getItemCount={[Function]} + keyExtractor={[Function]} + onContentSizeChange={[Function]} + onLayout={[Function]} + onMomentumScrollBegin={[Function]} + onMomentumScrollEnd={[Function]} + onRefresh={[Function]} + onScroll={[Function]} + onScrollBeginDrag={[Function]} + onScrollEndDrag={[Function]} + onScrollToIndexFailed={[Function]} + refreshControl={ + <RefreshControlMock + onRefresh={[Function]} + refreshing={false} + /> + } + refreshing={false} + removeClippedSubviews={false} + renderItem={[Function]} + scrollEventThrottle={50} + stickyHeaderIndices={Array []} + style={ + Object { + "flex": 1, + } + } + viewabilityConfigCallbackPairs={Array []} + > + <RCTRefreshControl /> + <View /> + </RCTScrollView> + </View> +</View> +`; |