git-point icon indicating copy to clipboard operation
git-point copied to clipboard

Add more tests!

Open andrewda opened this issue 8 years ago • 24 comments
trafficstars

We can use this issue to divide up some work. I'll add a checklist below with what needs to be done and who it's assigned to. Please comment (or edit yourself in) if you'd like to take on a test!

For newcomers:

  1. Choose the component you want to test
  2. Comment here which component you'd like to work on
  3. We'll update this list with your name

Components

  • [x] Badge (@andrewda – #407 )
  • [x] Button (@andrewda – #407)
  • [x] CodeLine (@andrewda – #407)
  • [x] CommentInput (@dyesseyumba - #582)
  • [ ] CommentListItem (@jouderianjr - PR pending)
  • [ ] DiffBlocks (unclaimed)
  • [x] EntityInfo (@andrewda – #407)
  • [x] GithubHtmlView (@whitedogg13 - #819)
  • [ ] GithubStyle (unclaimed)
  • [x] ImageZoom (@jouderianjr - #548)
  • [ ] InlineLabel (@jglover - PR pending)
  • [ ] IssueDescription (@mmendesas - PR pending)
  • [ ] IssueEventListItem (unclaimed)
  • [x] IssueListItem (unclaimed)
  • [x] LabelButton (@andrewda – #407)
  • [x] LabelListItem (@MarioArnt - #818)
  • [ ] MarkdownWebView (unclaimed)
  • [ ] Members (unclaimed)
  • [ ] MentionArea (unclaimed)
  • [x] NotificationIcon (@ZahraTee - #677)
  • [x] NotificationListItem (@alejandronanez - #589)
  • [ ] ParallaxScroll (unclaimed)
  • [ ] RepositoryListItem (unclaimed)
  • [x] RepositoryProfile (@alejandronanez - #531)
  • [x] ~~RepositorySectionTitle (@ZahraTee - #677)~~
  • [ ] SearchBar – Android (@dyesseyumba - PR pending)
  • [ ] SearchBar – iOS (@dyesseyumba - PR pending)
  • [ ] SectionList (@jamesg1 - PR pending)
  • [x] StateBadge (@andrewda – #407)
  • [x] ToggleView (@machour – #407)
  • [x] UserListItem (unclaimed)
  • [x] UserProfile (@alejandronanez - #547)
  • [ ] ViewContainer (@lucaslago - #841)

Sections

Actions

  • [ ] Issue (unclaimed)
  • [ ] Notifications (unclaimed)
  • [ ] Organization (unclaimed)
  • [ ] Repository (unclaimed)
  • [ ] Search (unclaimed)
  • [ ] User (unclaimed)

Reducers

  • [x] Auth (@jglover - #579)
  • [x] Issue (@TFarla - #830)
  • [x] Notifications (@jglover - #567)
  • [x] Organization (@TFarla - #831)
  • [x] Repository (@TFarla - #832)
  • [x] ~~Search (@jglover - #574)~~
  • [x] User (@TFarla - #833)

Screens

  • [ ] Auth (unclaimed)
  • [ ] Issue (unclaimed)
  • [ ] Notifications (unclaimed)
  • [ ] Organization (unclaimed)
  • [ ] Repository (unclaimed)
  • [ ] Search (unclaimed)
  • [ ] User (unclaimed)

Utilities

  • [x] Action Helper (@alejandronanez - #555)
  • [x] Color Helpers (@ibotdotout - #565)
  • [ ] Event Helpers (@andrewda - PR pending)
  • [ ] Loading Animation (unclaimed)
  • [ ] Localization Helper (unclaimed)
  • [x] Migration Helper (@mbelsky - #814)
  • [ ] Method Helpers (@MarioArnt)
  • [x] Text Helper (@ibotdotout - #568)

Miscellaneous

  • [x] API (@jjlljj - #746)
  • [x] Locales – see #478 (@chinesedfan - #594)

andrewda avatar Oct 20 '17 01:10 andrewda

I'll start slow :) Could you give me ImageZoom and CommentListItem? 💃

jouderianjr avatar Oct 20 '17 01:10 jouderianjr

~I can grab userProfile and RepositoryProfile.~ Already edited the list!

alejandronanez avatar Oct 20 '17 02:10 alejandronanez

I'd like to implement tests for <GithubHtmlView /> but I'm not sure how to implement them with Enzyme. (I'm fairly new to testing :relaxed:)

This component does two things:

  1. Transform a given HTML to a new HTML with some modifications
  2. Hands out this new HTML to <HTMLView />

Should I stick to only testing the first part, or should the output result of <HTMLView /> be tested too? What would be the best way to test the HTML transformation (1.) without relying on jest snapshots?

machour avatar Oct 20 '17 16:10 machour

Yea, I'd stick to the first part (we should really only be testing one component per test, and involving <HTMLView /> in any way gets a little iffy). For testing the transformations, how about adding a couple data files to a __tests__/data/html directory along with their corresponding expected result. Feed the input HTML from the data files into <GithubHtmlView /> and compare the output with the expected output from the result file.

andrewda avatar Oct 20 '17 18:10 andrewda

I'll take InlineLabel and perhaps a reducer

jglover avatar Oct 21 '17 15:10 jglover

Thank so much @jglover!!

andrewda avatar Oct 21 '17 15:10 andrewda

I'll take Color Helpers, Text Helper in Utilities

ibotdotout avatar Oct 22 '17 10:10 ibotdotout

Oppps. I haven't noticed that @ibotdotout decided to do tests for color helpers :(

serhii-baraniuk avatar Oct 23 '17 09:10 serhii-baraniuk

Tackled notifications reducer tests, see #567

jglover avatar Oct 23 '17 15:10 jglover

I want to take "SearchBar – Android" and "SearchBar – iOS"

dyesseyumba avatar Oct 25 '17 20:10 dyesseyumba

@dyesseyumba <3

andrewda avatar Oct 25 '17 23:10 andrewda

I'll take "SectionList" please. Thanks

jamesg1 avatar Oct 29 '17 03:10 jamesg1

If this effort is still ongoing, I can take NotificationIcon and RepositorySectionTitle. :)

ZahraTee avatar Dec 20 '17 15:12 ZahraTee

@ZahraTee oh yes it is! We're at ~40% coverage for now, which is better than nothing, but still low. Assigned both tests to you, let us know if you need any help at all with your PR! Thank you 🙏

machour avatar Dec 20 '17 15:12 machour

I'd like to write tests for utils/migration-helper.js

mbelsky avatar Oct 02 '18 09:10 mbelsky

I'd like to test the following:

  • Method Helpers
  • LabelListItem

MarioArnt avatar Oct 02 '18 09:10 MarioArnt

I'd like to test the following:

@MarioArnt fine, but please a separate PR for each component.

lex111 avatar Oct 02 '18 11:10 lex111

I would like to pick up tests for the reducers:

tomodutch avatar Oct 11 '18 04:10 tomodutch

Hi, I'd like to test the ViewContainer component

lucaslago avatar Oct 21 '18 11:10 lucaslago

@lucaslago fine, good luck!

lex111 avatar Oct 21 '18 12:10 lex111

Thank you @lucaslago, appreciate it 🙏🏾

housseindjirdeh avatar Oct 24 '18 02:10 housseindjirdeh

Hi, I'd like to test the IssueDescription component

mmendesas avatar Oct 25 '18 04:10 mmendesas

@mmendesas go for it

alejandronanez avatar Oct 25 '18 13:10 alejandronanez

Can I take IssueListItem?

nersoh avatar Oct 15 '19 10:10 nersoh