mattermost-mobile/app/components/post_draft/__snapshots__/post_draft.test.js.snap
Elias Nahum f73db6e51c
MM-29948 Display error msg when pasting files and uploads are disabled (#4927)
* MM-29948 Display error msg when pasting files and uploads are disabled

* Remove unnecessary ref and Animated.View

Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2020-10-28 12:06:09 -03:00

663 lines
15 KiB
Text

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`PostDraft Should render the Archived for channelIsArchived 1`] = `
<View
style={
Object {
"backgroundColor": "#ffffff",
"borderTopColor": "rgba(61,60,64,0.2)",
"borderTopWidth": 1,
"paddingBottom": 10,
"paddingLeft": 20,
"paddingRight": 20,
"paddingTop": 10,
}
}
>
<Text>
<Text
style={
Array [
Object {
"color": "#3d3c40",
"textAlign": "center",
},
Array [
undefined,
],
]
}
>
You are viewing an
</Text>
<Text
style={
Array [
Object {
"color": "#3d3c40",
"textAlign": "center",
},
Array [
undefined,
Object {
"fontWeight": "bold",
},
],
]
}
>
archived channel
</Text>
<Text
style={
Array [
Object {
"color": "#3d3c40",
"textAlign": "center",
},
Array [
undefined,
],
]
}
>
. New messages cannot be posted.
</Text>
</Text>
<View
accessibilityRole="button"
accessible={true}
focusable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"alignItems": "center",
"backgroundColor": "#166de0",
"borderRadius": 4,
"height": 40,
"marginTop": 10,
"opacity": 1,
"paddingBottom": 5,
"paddingTop": 5,
}
}
>
<Text
style={
Object {
"color": "white",
"fontWeight": "bold",
"marginTop": 7,
}
}
>
Close Channel
</Text>
</View>
</View>
`;
exports[`PostDraft Should render the Archived for deactivatedChannel 1`] = `
<View
style={
Object {
"backgroundColor": "#ffffff",
"borderTopColor": "rgba(61,60,64,0.2)",
"borderTopWidth": 1,
"paddingBottom": 10,
"paddingLeft": 20,
"paddingRight": 20,
"paddingTop": 10,
}
}
>
<Text>
<Text
style={
Array [
Object {
"color": "#3d3c40",
"textAlign": "center",
},
Array [
undefined,
],
]
}
>
You are viewing an
</Text>
<Text
style={
Array [
Object {
"color": "#3d3c40",
"textAlign": "center",
},
Array [
undefined,
Object {
"fontWeight": "bold",
},
],
]
}
>
archived channel
</Text>
<Text
style={
Array [
Object {
"color": "#3d3c40",
"textAlign": "center",
},
Array [
undefined,
],
]
}
>
. New messages cannot be posted.
</Text>
</Text>
<View
accessibilityRole="button"
accessible={true}
focusable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"alignItems": "center",
"backgroundColor": "#166de0",
"borderRadius": 4,
"height": 40,
"marginTop": 10,
"opacity": 1,
"paddingBottom": 5,
"paddingTop": 5,
}
}
>
<Text
style={
Object {
"color": "white",
"fontWeight": "bold",
"marginTop": 7,
}
}
>
Close Channel
</Text>
</View>
</View>
`;
exports[`PostDraft Should render the DraftInput 1`] = `
<KeyboardTrackingView>
<View
style={
Object {
"bottom": 0,
}
}
>
<View
style={
Object {
"backgroundColor": "#ffffff",
"flex": 1,
"marginLeft": 0,
"marginRight": 0,
}
}
>
<Text
ellipsizeMode="tail"
numberOfLines={1}
style={
Object {
"backgroundColor": "transparent",
"color": "#3d3c40",
"fontSize": 11,
"marginBottom": 2,
"paddingLeft": 10,
"paddingTop": 3,
"position": "absolute",
}
}
/>
<View
style={
Object {
"backgroundColor": "#ffffff",
"height": 0,
}
}
/>
</View>
</View>
<View
onLayout={[Function]}
style={
Array [
Object {
"alignItems": "flex-end",
"backgroundColor": "#ffffff",
"borderTopColor": "rgba(61,60,64,0.2)",
"borderTopWidth": 1,
"flexDirection": "row",
"justifyContent": "center",
"paddingBottom": 2,
},
null,
]
}
>
<RCTScrollView
contentContainerStyle={
Object {
"alignItems": "stretch",
"paddingTop": 7,
}
}
disableScrollViewPanResponder={true}
keyboardShouldPersistTaps="always"
overScrollMode="never"
pinchGestureEnabled={false}
scrollEnabled={false}
showsHorizontalScrollIndicator={false}
showsVerticalScrollIndicator={false}
style={
Object {
"flex": 1,
"flexDirection": "column",
}
}
>
<View>
<TextInput
allowFontScaling={true}
autoCompleteType="off"
blurOnSubmit={false}
disableFullscreenUI={true}
keyboardAppearance="light"
keyboardType="default"
multiline={true}
onChangeText={[Function]}
onEndEditing={[Function]}
onPaste={[Function]}
onSelectionChange={[Function]}
placeholder="Write to "
placeholderTextColor="rgba(61,60,64,0.5)"
rejectResponderTermination={true}
style={
Object {
"color": "#3d3c40",
"fontSize": 15,
"lineHeight": 20,
"maxHeight": 150,
"minHeight": 30,
"paddingBottom": 6,
"paddingHorizontal": 12,
"paddingTop": 6,
}
}
testID="post_input"
textContentType="none"
underlineColorAndroid="transparent"
/>
<View
style={
Object {
"display": "flex",
"flexDirection": "column",
}
}
>
<View
forwardedRef={[Function]}
isInteraction={true}
style={
Object {
"display": "flex",
"flexDirection": "row",
"height": 0,
"paddingBottom": 0,
}
}
>
<RCTScrollView
contentContainerStyle={
Object {
"alignItems": "flex-end",
"paddingRight": 12,
}
}
horizontal={true}
keyboardShouldPersistTaps="handled"
style={
Object {
"flex": 1,
}
}
>
<View />
</RCTScrollView>
</View>
<View
forwardedRef={[Function]}
isInteraction={true}
style={
Object {
"height": 0,
}
}
>
<View
style={
Object {
"flex": 1,
"marginHorizontal": 12,
"marginTop": 4,
}
}
/>
</View>
</View>
<View
style={
Object {
"alignItems": "center",
"display": "flex",
"flexDirection": "row",
"justifyContent": "space-between",
"paddingBottom": 1,
}
}
>
<View
style={
Object {
"display": "flex",
"flexDirection": "row",
"height": 44,
}
}
>
<View
accessible={true}
focusable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"alignItems": "center",
"justifyContent": "center",
"opacity": 1,
"padding": 10,
}
}
>
<Icon
color="rgba(61,60,64,0.64)"
name="at"
size={24}
/>
</View>
<View
accessible={true}
focusable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"alignItems": "center",
"justifyContent": "center",
"opacity": 1,
"padding": 10,
}
}
>
<Icon
color="rgba(61,60,64,0.64)"
name="slash-forward-box-outline"
size={24}
/>
</View>
<View
accessible={true}
focusable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"alignItems": "center",
"justifyContent": "center",
"opacity": 1,
"padding": 10,
}
}
>
<Icon
color="rgba(61,60,64,0.64)"
name="file-document-outline"
size={24}
/>
</View>
<View
accessible={true}
focusable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"alignItems": "center",
"justifyContent": "center",
"opacity": 1,
"padding": 10,
}
}
>
<Icon
color="rgba(61,60,64,0.64)"
name="image-outline"
size={24}
/>
</View>
<View
accessible={true}
focusable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"alignItems": "center",
"justifyContent": "center",
"opacity": 1,
"padding": 10,
}
}
>
<Icon
color="rgba(61,60,64,0.64)"
name="camera-outline"
size={24}
/>
</View>
</View>
<View
style={
Object {
"justifyContent": "flex-end",
"paddingRight": 8,
}
}
testID="disabled_send_button"
>
<View
style={
Array [
Object {
"alignItems": "center",
"backgroundColor": "#166de0",
"borderRadius": 4,
"height": 32,
"justifyContent": "center",
"width": 80,
},
Object {
"backgroundColor": "rgba(22,109,224,0.3)",
},
]
}
>
<Icon
color="rgba(255,255,255,0.5)"
name="send"
size={24}
/>
</View>
</View>
</View>
</View>
</RCTScrollView>
</View>
</KeyboardTrackingView>
`;
exports[`PostDraft Should render the ReadOnly for canPost 1`] = `
<RCTSafeAreaView
emulateUnlessSupported={true}
style={
Object {
"backgroundColor": "rgba(61,60,64,0.04)",
}
}
>
<View
style={
Object {
"alignItems": "center",
"borderTopColor": "rgba(61,60,64,0.2)",
"borderTopWidth": 1,
"flexDirection": "row",
"height": 50,
"paddingHorizontal": 12,
}
}
>
<Icon
color="#3d3c40"
name="glasses"
style={
Object {
"fontSize": 20,
"lineHeight": 22,
"opacity": 0.56,
}
}
/>
<Text
style={
Object {
"color": "#3d3c40",
"fontSize": 15,
"lineHeight": 20,
"marginLeft": 9,
"opacity": 0.56,
}
}
>
This channel is read-only.
</Text>
</View>
</RCTSafeAreaView>
`;
exports[`PostDraft Should render the ReadOnly for channelIsReadOnly 1`] = `
<RCTSafeAreaView
emulateUnlessSupported={true}
style={
Object {
"backgroundColor": "rgba(61,60,64,0.04)",
}
}
>
<View
style={
Object {
"alignItems": "center",
"borderTopColor": "rgba(61,60,64,0.2)",
"borderTopWidth": 1,
"flexDirection": "row",
"height": 50,
"paddingHorizontal": 12,
}
}
>
<Icon
color="#3d3c40"
name="glasses"
style={
Object {
"fontSize": 20,
"lineHeight": 22,
"opacity": 0.56,
}
}
/>
<Text
style={
Object {
"color": "#3d3c40",
"fontSize": 15,
"lineHeight": 20,
"marginLeft": 9,
"opacity": 0.56,
}
}
>
This channel is read-only.
</Text>
</View>
</RCTSafeAreaView>
`;