mattermost-mobile/app/components/post_draft/__snapshots__/post_draft.test.js.snap
Saturnino Abril f05faaa949
E2E: Initial Detox setup for Mobile UI automation (#4535)
* initial Detox setup for mobile UI automation

* fix iOS allow permission on opening the app, add npm script to root folder, fix test when using longer site URL and add detox dependency to root for android build dependency

* remove detox proguardFile

* update packages and emulator

* change folder build on local and CI

* add test to post a message, ability to have test in isolation, server API commands, server config, dependency updates and update folder structure

* update snapshot

* update detox and do clean up

* update dependencies
2020-08-29 07:18:41 +08:00

663 lines
16 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}
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"
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
forwardedRef={[Function]}
isInteraction={true}
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,
}
}
/>
<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,
}
}
>
<Image
source={
Object {
"testUri": "../../../dist/assets/images/icons/slash-forward-box.png",
}
}
style={
Array [
Object {
"height": 24,
"opacity": 1,
"tintColor": "rgba(61,60,64,0.64)",
"width": 24,
},
null,
]
}
/>
</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,
}
}
/>
<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,
}
}
/>
<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,
}
}
/>
</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)",
},
]
}
>
<RNSVGSvgView
align="xMidYMid"
bbHeight={16}
bbWidth={19}
focusable={false}
height={16}
meetOrSlice={0}
minX={0}
minY={0}
style={
Array [
Object {
"backgroundColor": "transparent",
"borderWidth": 0,
},
Object {
"flex": 0,
"height": 16,
"width": 19,
},
]
}
vbHeight={14}
vbWidth={16}
width={19}
>
<RNSVGGroup>
<RNSVGPath
d="M1.09222552,5.76354703 L0.405413926,0.94983436 C0.379442059,0.7702001 0.452067095,0.59056584 0.594431403,0.479386798 C0.737276671,0.368693254 0.927737029,0.343932856 1.09318744,0.414815564 C3.7432798,1.54942439 12.1192069,5.13676911 15.0920238,6.40974487 C15.2723839,6.48693905 15.3892573,6.66560231 15.3892573,6.8632 C15.3892573,7.06079769 15.2723839,7.23946095 15.0920238,7.31665513 C12.0961208,8.59982635 3.6105347,12.2337789 1.0316245,13.3378013 C0.878198098,13.4033436 0.701685594,13.3810106 0.569902417,13.2785706 C0.43763828,13.1761305 0.37030381,13.0096047 0.393870874,12.8430789 L1.07875863,7.96479496 L8.93669128,6.8632 L1.09222552,5.76354703 Z"
fill={2164260863}
propList={
Array [
"fill",
]
}
/>
</RNSVGGroup>
</RNSVGSvgView>
</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,
}
}
>
<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,
}
}
>
<Text
style={
Object {
"color": "#3d3c40",
"fontSize": 15,
"lineHeight": 20,
"marginLeft": 9,
"opacity": 0.56,
}
}
>
This channel is read-only.
</Text>
</View>
</RCTSafeAreaView>
`;