-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tidy up with constants and start test writing
- Loading branch information
1 parent
162fbe8
commit 12856db
Showing
4 changed files
with
53 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -187,5 +187,6 @@ export default { | |
stageImage: "community" | ||
} | ||
] | ||
} | ||
}, | ||
resetAllFilters: "Reset all filters" | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// @flow | ||
import React from "react"; | ||
import { shallow } from "enzyme"; | ||
import ResetAllFiltersButton from "./ResetAllFiltersButton"; | ||
|
||
it("renders correctly", () => { | ||
const output = shallow(<ResetAllFiltersButton visible onPress={() => {}} />); | ||
expect(output).toMatchSnapshot(); | ||
}); |
33 changes: 33 additions & 0 deletions
33
src/screens/EventsScreen/__snapshots__/ResetAllFiltersButton.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`renders correctly 1`] = ` | ||
<AnimatedComponent | ||
onLayout={[Function]} | ||
style={ | ||
Array [ | ||
Object { | ||
"flexDirection": "row", | ||
"justifyContent": "flex-end", | ||
}, | ||
Object { | ||
"marginTop": 1, | ||
"opacity": 1, | ||
}, | ||
] | ||
} | ||
> | ||
<FilterHeaderButton | ||
active={false} | ||
badgeValue={null} | ||
label="Reset all filters" | ||
onPress={[Function]} | ||
style={ | ||
Object { | ||
"minHeight": 0, | ||
"paddingTop": 16, | ||
} | ||
} | ||
text="Reset all filters" | ||
/> | ||
</AnimatedComponent> | ||
`; |