Skip to content
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

Updated testIds in RN StoryListView to use kind #3129

Merged
merged 3 commits into from
Mar 2, 2018

Conversation

Gongreg
Copy link
Member

@Gongreg Gongreg commented Mar 2, 2018

Hello,

I've been working on integrating Detox with storybook. Everything looks really promising because of included StoryListView in RN storybook. The only issue with it is that it doesn't scope stories by the kind. So if you have to stories with same name i.e. Default state they will both have same testIDs and it will be difficult to understand which story to click.

Issue: Not Scoped testIDS in StoryListView.

What I did

Added kind to testID.

How to test

N/A (no tests here)

Is this testable with jest or storyshots?

Could be.

Does this need a new example in the kitchen sink apps?

No.

Does this need an update to the documentation?

No.

@Hypnosphi Hypnosphi added bug react-native patch:yes Bugfix & documentation PR that need to be picked to main branch labels Mar 2, 2018
@@ -14,12 +14,12 @@ SectionHeader.propTypes = {
selected: PropTypes.bool.isRequired,
};

const ListItem = ({ title, selected, onPress }) => (
const ListItem = ({ kind, title, selected, onPress }) => (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a propType for this to make eslint happy =)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hypnosphi, thanks edited the file through github and missed the propTypes below.

@codecov
Copy link

codecov bot commented Mar 2, 2018

Codecov Report

Merging #3129 into master will increase coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #3129      +/-   ##
=========================================
+ Coverage   36.08%   36.1%   +0.01%     
=========================================
  Files         438     438              
  Lines        9447    9443       -4     
  Branches      911     886      -25     
=========================================
  Hits         3409    3409              
- Misses       5451    5464      +13     
+ Partials      587     570      -17
Impacted Files Coverage Δ
...tive/src/preview/components/StoryListView/index.js 0% <0%> (ø) ⬆️
...modules/ui/components/stories_panel/text_filter.js 30.98% <0%> (ø) ⬆️
addons/a11y/src/components/Report/Info.js 0% <0%> (ø) ⬆️
addons/info/src/components/types/proptypes.js 88.88% <0%> (ø) ⬆️
app/react-native/src/bin/storybook-build.js 0% <0%> (ø) ⬆️
addons/knobs/src/components/types/Array.js 34.14% <0%> (ø) ⬆️
addons/info/src/components/types/Enum.js 0% <0%> (ø) ⬆️
app/angular/src/server/angular-cli_config.js 0% <0%> (ø) ⬆️
lib/ui/src/modules/shortcuts/actions/shortcuts.js 22.41% <0%> (ø) ⬆️
addons/knobs/src/angular/helpers.js 76.97% <0%> (ø) ⬆️
... and 50 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4da021e...fa2774c. Read the comment docs.

@Hypnosphi Hypnosphi merged commit de93812 into master Mar 2, 2018
@Hypnosphi Hypnosphi deleted the story-list-view-test-id-kind branch March 2, 2018 12:00
@Hypnosphi Hypnosphi added patch:done Patch/release PRs already cherry-picked to main/release branch and removed patch:done Patch/release PRs already cherry-picked to main/release branch labels Mar 6, 2018
Hypnosphi added a commit that referenced this pull request Mar 6, 2018
Updated testIds in RN StoryListView to use kind
@Hypnosphi Hypnosphi added the patch:done Patch/release PRs already cherry-picked to main/release branch label Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch react-native
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants