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

chore: Prop spreading unit tests #184

Merged
merged 24 commits into from Jan 15, 2019
Merged

Conversation

greg-a-smith
Copy link
Contributor

@greg-a-smith greg-a-smith commented Jan 12, 2019

I have added a number of unit tests to verify that props can be spread through each component and end up in the emitted HTML. The tests use data-sample as the HTML attribute (prop). There are a number of components and elements that do not allow these props to be spread and I tried to put a skipped test with a description of the test needed so it helps the developer(s) adding the additional prop spreading functionality.

NOTE: Most of the .test files were also changed from 2 space indents to 4 so my apologies for the massive diffs in these files. I didn't change any existing tests. The only thing I did was add a describe block called "Prop spreading" that contains the prop spreading tests.

Fixes #167.

@jbadan
Copy link
Contributor

jbadan commented Jan 14, 2019

Looks good 🚢 (once we get the publishing working ;) )

@bcullman
Copy link
Contributor

@greg-a-smith So, to be clear the added xtest in this PR (44 by my count) demonstrate locations in the code that prop spreading is not yet complete.

@greg-a-smith
Copy link
Contributor Author

@bcullman That's correct, for the most part. There are a couple places where it might get fairly complicated so I just left a generic comment that more tests will need to be added as functionality is added.

@greg-a-smith greg-a-smith merged commit 824bc45 into master Jan 15, 2019
@greg-a-smith greg-a-smith deleted the chore/prop-spreading-unit-tests branch January 15, 2019 03:00
greg-a-smith added a commit that referenced this pull request Mar 5, 2019
* Added configuration for enzyme adapter

* Added prop spreading tests for ActionBar

* Added prop spreading tests for Alert and Badge

* Added prop spreading tests for Breadcrumb and Button

* Added prop spreading tests for Calendar and ComboboxInput

* Added TODO markers on the comments for skipped tests

* Added prop spreading tests for DatePicker and Dropdown

* Added prop spreading tests for Forms and Icon

* Added prop spreading tests for Identifier and Image

* Added prop spreading tests for InlineHelp and InputGroup

* Added prop spreading tests for ListGroup and LocalizationEditor

* Added prop spreading tests for MegaMenu and Menu

* Added prop spreading tests for Modal and MultiInput

* Added prop spreading tests for Pagination and Panel

* Added prop spreading tests for Popover and SearchInput

* Added prop spreading tests for Shellbar and SideNavigation

* Added prop spreading tests for SideNavigation and Table

* Added prop spreading tests for Tabs and Tile

* Added prop spreading tests for Time and TimePicker

* Added prop spreading tests for Toggle and Token

* Added prop spreading tests for Tree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants