Fix TextInput-cursorPlacement test
Summary: Changelog: [Internal] - In internal e2e testing, json.stringify is unstable and will occasionally re-order keys. Fix so it's consistent across tests Reviewed By: kacieb Differential Revision: D28397174 fbshipit-source-id: 0f2db697d245654c88c3dff3d083bc82890d4bc1
This commit is contained in:
Родитель
6b713f519f
Коммит
ec2dc9e4f2
|
@ -367,7 +367,7 @@ class TokenizedTextExample extends React.Component<
|
||||||
type SelectionExampleState = {
|
type SelectionExampleState = {
|
||||||
selection: $ReadOnly<{|
|
selection: $ReadOnly<{|
|
||||||
start: number,
|
start: number,
|
||||||
end?: number,
|
end: number,
|
||||||
|}>,
|
|}>,
|
||||||
value: string,
|
value: string,
|
||||||
...
|
...
|
||||||
|
@ -436,7 +436,8 @@ class SelectionExample extends React.Component<
|
||||||
</View>
|
</View>
|
||||||
<View>
|
<View>
|
||||||
<Text testID={`${this.props.testID}-selection`}>
|
<Text testID={`${this.props.testID}-selection`}>
|
||||||
selection = {JSON.stringify(this.state.selection).replace(/"/g, '')}
|
selection ={' '}
|
||||||
|
{`{start:${this.state.selection.start},end:${this.state.selection.end}}`}
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
testID={`${this.props.testID}-cursor-start`}
|
testID={`${this.props.testID}-cursor-start`}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче