Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

test: component description conformance test #400

Merged
merged 7 commits into from
Nov 2, 2018

Conversation

levithomason
Copy link
Member

@levithomason levithomason commented Oct 24, 2018

This PR adds a failing conformance test for missing component descriptions. It also attempts to add some heuristics around detecting an unhelpful component description.

Workflow changes

Watch and rebuild component info JSON files during tests. This enables changes to doc info, like descriptions, to be picked up and tested between tests. Specifically, conformance tests can now be run in watch mode and successfully pick up on changes to documentation concerns.

Tests added

  1. has a docblock description
  2. docblock description is long enough to be meaningful
  3. docblock description is short enough to be quickly understood

@levithomason levithomason force-pushed the test/component-descriptions branch 2 times, most recently from abb8135 to 25b312d Compare October 24, 2018 22:29
@levithomason levithomason changed the title [WIP] test: component description conformance test test: component description conformance test Oct 24, 2018
"test:visual": "gulp screener",
"test:projects:cra-ts": "gulp test:projects:cra-ts",
"test:watch": "yarn test --watchAll",
"test:watch": "gulp test:watch",
Copy link
Member Author

Choose a reason for hiding this comment

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

This change was required to run jest's watch and gulp's doc watch commands in parallel. The watchers never exit so they cannot be started in series.

@codecov
Copy link

codecov bot commented Nov 1, 2018

Codecov Report

Merging #400 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #400   +/-   ##
=======================================
  Coverage   91.76%   91.76%           
=======================================
  Files          41       41           
  Lines        1324     1324           
  Branches      168      168           
=======================================
  Hits         1215     1215           
  Misses        105      105           
  Partials        4        4
Impacted Files Coverage Δ
src/components/Layout/Layout.tsx 97.95% <ø> (ø) ⬆️
src/components/Menu/Menu.tsx 100% <ø> (ø) ⬆️
src/components/List/ListItem.tsx 100% <ø> (ø) ⬆️
src/components/Menu/MenuItem.tsx 80% <ø> (ø) ⬆️
src/components/List/List.tsx 100% <ø> (ø) ⬆️
src/components/Label/Label.tsx 87.23% <ø> (ø) ⬆️
src/components/Chat/ChatItem.tsx 95.65% <ø> (ø) ⬆️
src/components/Button/ButtonGroup.tsx 97.29% <ø> (ø) ⬆️
src/components/RadioGroup/RadioGroupItem.tsx 100% <ø> (ø) ⬆️
src/components/Segment/Segment.tsx 100% <ø> (ø) ⬆️
... and 1 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 f898e99...1686b03. Read the comment docs.

Copy link
Member

@miroslavstastny miroslavstastny left a comment

Choose a reason for hiding this comment

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

Review+ on the changes, but I am not approving as I made changes as well.

@@ -45,6 +45,7 @@ export interface RadioGroupItemState {
}

/**
* A single radio with a radio group.
Copy link
Contributor

Choose a reason for hiding this comment

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

'A single radio within a radio group.' might be better description

Copy link
Contributor

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

Approved with one suggestion for consideration in the RadioGroupItem's description.

@levithomason levithomason merged commit 39d46ba into master Nov 2, 2018
@levithomason levithomason deleted the test/component-descriptions branch November 2, 2018 22:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants