Skip to content

Commit 81278d1

Browse files
javachefacebook-github-bot-4
authored andcommitted
Fix UIExplorer integration tests
Reviewed By: @vjeux Differential Revision: D2510761 fb-gh-sync-id: 21ec8988305ba9f3526277a8b445676ac4fcf3aa
1 parent ea8d0b6 commit 81278d1

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

Examples/UIExplorer/UIExplorerIntegrationTests/UIExplorerIntegrationTests.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,13 @@ - (void)testTheTester_ExpectError
5858
expectErrorRegex:@"because shouldThrow"];
5959
}
6060

61-
RCT_TEST(TimersTest)
61+
// This list should be kept in sync with IntegrationTestsApp.js
6262
RCT_TEST(IntegrationTestHarnessTest)
63+
RCT_TEST(TimersTest)
6364
RCT_TEST(AsyncStorageTest)
64-
// RCT_TEST(LayoutEventsTest) -- Disabled: #8153468
65+
RCT_TEST(LayoutEventsTest)
6566
RCT_TEST(AppEventsTest)
67+
RCT_TEST(SimpleSnapshotTest)
6668
RCT_TEST(PromiseTest)
67-
// RCT_TEST(SimpleSnapshotTest) -- Disabled: #8153475
6869

6970
@end

Examples/UIExplorer/UIExplorerIntegrationTests/js/IntegrationTestsApp.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ var {
2323
View,
2424
} = React;
2525

26+
/* Keep this list in sync with UIExplorerIntegrationTests.m */
2627
var TESTS = [
2728
require('./IntegrationTestHarnessTest'),
2829
require('./TimersTest'),

Examples/UIExplorer/UIExplorerIntegrationTests/js/LayoutEventsTest.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var TestModule = NativeModules.TestModule;
2525
var deepDiffer = require('deepDiffer');
2626

2727
function debug() {
28-
//console.log.apply(null, arguments);
28+
// console.log.apply(null, arguments);
2929
}
3030

3131
type LayoutEvent = {
@@ -46,22 +46,25 @@ var LayoutEventsTest = React.createClass({
4646
};
4747
},
4848
animateViewLayout: function() {
49+
debug('animateViewLayout invoked');
4950
LayoutAnimation.configureNext(
5051
LayoutAnimation.Presets.spring,
5152
() => {
52-
debug('layout animation done.');
53+
debug('animateViewLayout done');
5354
this.checkLayout(this.addWrapText);
5455
}
5556
);
5657
this.setState({viewStyle: {margin: 60}});
5758
},
5859
addWrapText: function() {
60+
debug('addWrapText invoked');
5961
this.setState(
6062
{extraText: ' And a bunch more text to wrap around a few lines.'},
6163
() => this.checkLayout(this.changeContainer)
6264
);
6365
},
6466
changeContainer: function() {
67+
debug('changeContainer invoked');
6568
this.setState(
6669
{containerStyle: {width: 280}},
6770
() => this.checkLayout(TestModule.markTestCompleted)
@@ -113,6 +116,7 @@ var LayoutEventsTest = React.createClass({
113116
var viewStyle = [styles.view, this.state.viewStyle];
114117
var textLayout = this.state.textLayout || {width: '?', height: '?'};
115118
var imageLayout = this.state.imageLayout || {x: '?', y: '?'};
119+
debug('viewLayout', this.state.viewLayout);
116120
return (
117121
<View style={[styles.container, this.state.containerStyle]}>
118122
<View ref="view" onLayout={this.onViewLayout} style={viewStyle}>
@@ -122,9 +126,6 @@ var LayoutEventsTest = React.createClass({
122126
style={styles.image}
123127
source={{uri: 'uie_thumb_big.png'}}
124128
/>
125-
<Text>
126-
ViewLayout: {JSON.stringify(this.state.viewLayout, null, ' ') + '\n\n'}
127-
</Text>
128129
<Text ref="txt" onLayout={this.onTextLayout} style={styles.text}>
129130
A simple piece of text.{this.state.extraText}
130131
</Text>

0 commit comments

Comments
 (0)