Skip to content

Fix inline styles in IntegrationTests #22165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions IntegrationTests/AsyncStorageTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

const React = require('react');
const ReactNative = require('react-native');
const {AsyncStorage, Text, View} = ReactNative;
const {AsyncStorage, Text, View, StyleSheet} = ReactNative;
const {TestModule} = ReactNative.NativeModules;

const deepDiffer = require('deepDiffer');
Expand Down Expand Up @@ -191,7 +191,7 @@ class AsyncStorageTest extends React.Component<{}, $FlowFixMeState> {

render() {
return (
<View style={{backgroundColor: 'white', padding: 40}}>
<View style={styles.container}>
<Text>
{/* $FlowFixMe(>=0.54.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error found when Flow v0.54 was deployed.
Expand All @@ -205,6 +205,13 @@ class AsyncStorageTest extends React.Component<{}, $FlowFixMeState> {
}
}

const styles = StyleSheet.create({
container: {
backgroundColor: 'white',
padding: 40,
},
});

AsyncStorageTest.displayName = 'AsyncStorageTest';

module.exports = AsyncStorageTest;
5 changes: 4 additions & 1 deletion IntegrationTests/ImageCachePolicyTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class ImageCachePolicyTest extends React.Component<Props, $FlowFixMeState> {

render() {
return (
<View style={{flex: 1}}>
<View style={styles.container}>
<Text>Hello</Text>
<Image
source={{
Expand Down Expand Up @@ -110,6 +110,9 @@ class ImageCachePolicyTest extends React.Component<Props, $FlowFixMeState> {
}

const styles = StyleSheet.create({
container: {
flex: 1,
},
base: {
width: 100,
height: 100,
Expand Down
11 changes: 9 additions & 2 deletions IntegrationTests/IntegrationTestHarnessTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
const requestAnimationFrame = require('fbjs/lib/requestAnimationFrame');
const React = require('react');
const ReactNative = require('react-native');
const {Text, View} = ReactNative;
const {Text, View, StyleSheet} = ReactNative;
const {TestModule} = ReactNative.NativeModules;

type Props = $ReadOnly<{|
Expand Down Expand Up @@ -54,7 +54,7 @@ class IntegrationTestHarnessTest extends React.Component<Props, State> {

render() {
return (
<View style={{backgroundColor: 'white', padding: 40}}>
<View style={styles.container}>
<Text>
{/* $FlowFixMe(>=0.54.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error found when Flow v0.54 was deployed.
Expand All @@ -67,6 +67,13 @@ class IntegrationTestHarnessTest extends React.Component<Props, State> {
}
}

const styles = StyleSheet.create({
container: {
backgroundColor: 'white',
padding: 40,
},
});

IntegrationTestHarnessTest.displayName = 'IntegrationTestHarnessTest';

module.exports = IntegrationTestHarnessTest;
6 changes: 5 additions & 1 deletion IntegrationTests/SimpleSnapshotTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class SimpleSnapshotTest extends React.Component<{}> {

render() {
return (
<View style={{backgroundColor: 'white', padding: 100}}>
<View style={styles.container}>
<View style={styles.box1} />
<View style={styles.box2} />
</View>
Expand All @@ -43,6 +43,10 @@ class SimpleSnapshotTest extends React.Component<{}> {
}

const styles = StyleSheet.create({
container: {
backgroundColor: 'white',
padding: 100,
},
box1: {
width: 80,
height: 50,
Expand Down