Do not display filter when doing snapshot tests on iOS

This commit is contained in:
Mike Grabowski
2019-01-03 21:48:46 +01:00
parent e0093fc98d
commit c88a7ca24a
2 changed files with 12 additions and 1 deletions
+4 -1
View File
@@ -170,7 +170,10 @@ RNTesterList.ComponentExamples.concat(RNTesterList.APIExamples).forEach(
render() {
return (
<SnapshotViewIOS>
<RNTesterExampleContainer module={ExampleModule} />
<RNTesterExampleContainer
module={ExampleModule}
displayFilter={false}
/>
</SnapshotViewIOS>
);
}
+8
View File
@@ -43,6 +43,14 @@ class RNTesterExampleContainer extends React.Component {
return <Example />;
}
if (this.props.displayFilter === false) {
return (
<RNTesterPage title={this.props.title}>
{this.props.module.examples.map(this.renderExample)}
</RNTesterPage>
);
}
const filter = ({example, filterRegex}) => filterRegex.test(example.title);
const sections = [