mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Do not display filter when doing snapshot tests on iOS
This commit is contained in:
@@ -170,7 +170,10 @@ RNTesterList.ComponentExamples.concat(RNTesterList.APIExamples).forEach(
|
||||
render() {
|
||||
return (
|
||||
<SnapshotViewIOS>
|
||||
<RNTesterExampleContainer module={ExampleModule} />
|
||||
<RNTesterExampleContainer
|
||||
module={ExampleModule}
|
||||
displayFilter={false}
|
||||
/>
|
||||
</SnapshotViewIOS>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user