Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
7db46de
issue#2 init version
CodesOfRa Oct 31, 2018
21a9f1a
issue #2 init version - add tiny change
CodesOfRa Oct 31, 2018
783cb0e
issue #2 init version - aria labels
CodesOfRa Nov 1, 2018
6b20d43
Issue#45: refactor Button
Nov 1, 2018
8f06bb5
Issue#45: refactor dropdown
Nov 2, 2018
b70e315
Issue#45: more refactoring
Nov 5, 2018
99b7b69
fix breaking error, check for data prop to be set for Auto Complete
chrismanciero Nov 5, 2018
e6792f1
Issue#45: more refactoring for Dropdown, Popover, Alert, RTL support,…
Nov 5, 2018
12cd584
Merge pull request #49 from SAP/search-input-bug
droshev Nov 6, 2018
ab5f7c0
Issue#45: refactor Button
Nov 1, 2018
2733fe5
Issue#45: refactor dropdown
Nov 2, 2018
1a593ef
Issue#45: more refactoring
Nov 5, 2018
e1dc935
Issue#45: more refactoring for Dropdown, Popover, Alert, RTL support,…
Nov 5, 2018
5831e2b
Issue#45: resolve merge conflicts
Nov 6, 2018
569ab5e
Issue#45 resolve more conflicts
Nov 6, 2018
250b2f9
Update README.md
InnaAtanasova Nov 6, 2018
5a500fe
init Multi Input component
chrismanciero Nov 6, 2018
3b070e5
remove unused property
chrismanciero Nov 6, 2018
687a23c
add compact style property
chrismanciero Nov 6, 2018
eacae0f
Merge branch 'develop' into feature/Issue#45-transition-to-fiori-fund…
InnaAtanasova Nov 6, 2018
cd93b23
update sample code
chrismanciero Nov 6, 2018
713526a
change compact prop type
chrismanciero Nov 7, 2018
b18db88
update modal component to have show property
chrismanciero Nov 7, 2018
557e9d6
update documentation for Modal
chrismanciero Nov 7, 2018
cc764bb
Merge pull request #52 from SAP/modal-component-update
InnaAtanasova Nov 7, 2018
8d17973
Merge branch 'develop' into feature/Issue#45-transition-to-fiori-fund…
InnaAtanasova Nov 7, 2018
d6176e5
Merge pull request #50 from SAP/feature/Issue#45-transition-to-fiori-…
InnaAtanasova Nov 7, 2018
ec4bbce
Adds styling for the buttons triggering the modals
Nov 7, 2018
a81b68c
append randNum to id for unique values
chrismanciero Nov 7, 2018
e5c7c1c
Merge pull request #53 from SAP/fix-multi-input
InnaAtanasova Nov 7, 2018
df2ae82
Fixes the bug with the routes in gh-pages
Nov 7, 2018
b00f5de
Update CONTRIBUTING.md
InnaAtanasova Nov 9, 2018
9372e50
created unit test for multiInput and search input controls
chrismanciero Nov 9, 2018
7ba88d2
Update unit tests for 100% code coverage
chrismanciero Nov 9, 2018
b837ff9
remove unneeded test file
chrismanciero Nov 10, 2018
5890227
update jest coverage files
chrismanciero Nov 11, 2018
9fc4edf
Unit tests for pagination control 100% code coverage
chrismanciero Nov 11, 2018
9eeb094
Unit test for InlineHelp component 100% code coverage
chrismanciero Nov 11, 2018
6c20c5d
issue #2 handle 00 display
CodesOfRa Nov 11, 2018
293e5fa
issue #2 fixed bugs, cleanded code , documentation added
CodesOfRa Nov 12, 2018
30499d8
Merge branch 'develop' into unit-testing
chrismanciero Nov 13, 2018
cf2ef65
add npm test coverage command to readme
chrismanciero Nov 13, 2018
5fa8b98
add unit test and 100% code coverage for Modal
chrismanciero Nov 13, 2018
d7a045e
Issue#4: implementation of Panel component
Nov 13, 2018
f5dcaf3
Issue#4: deals with the warning for using class instead of className
Nov 13, 2018
c6b863d
Merge pull request #56 from SAP/unit-testing
chrismanciero Nov 13, 2018
b897756
Issue#5: initial commit for Navbar component
Nov 13, 2018
c23be35
Issue#5: adds implementation for the Navbar component, adds navbar op…
Nov 13, 2018
ca8efc0
issue #2 code formating & eslint warnings fix
CodesOfRa Nov 13, 2018
891c64c
Merge pull request #55 from SAP/feature/Issue#2-Time-Component
InnaAtanasova Nov 13, 2018
3d694fa
Issue#36: initial commit for Combobox Input component
Nov 13, 2018
759bda9
Merge branch 'develop' into feature/Issue#5-navbar-component
InnaAtanasova Nov 13, 2018
9b61780
Merge pull request #59 from SAP/feature/Issue#5-navbar-component
InnaAtanasova Nov 13, 2018
f4d63cb
Merge branch 'develop' into feature/Issue#4-panel-component
InnaAtanasova Nov 13, 2018
ca91eb2
Issue#36: adds implementation for the Combobox component
Nov 13, 2018
1fa2e23
Merge branch 'develop' into feature/Issue#36-combobox-input
InnaAtanasova Nov 13, 2018
95fde08
init unit test doc
chrismanciero Nov 14, 2018
c2f5605
more changes
chrismanciero Nov 14, 2018
3d49bd0
more unit test doc
chrismanciero Nov 14, 2018
9b3856c
Merge pull request #61 from SAP/unit-testing-doc
chrismanciero Nov 14, 2018
968fa86
Issue#4: adds an example panel with other components
Nov 14, 2018
dc0184d
Merge pull request #60 from SAP/feature/Issue#36-combobox-input
InnaAtanasova Nov 14, 2018
68dd1d6
Merge pull request #57 from SAP/feature/Issue#4-panel-component
CodesOfRa Nov 14, 2018
84632ca
adds redirection for an empty url
Nov 14, 2018
2bc2d2d
makes the compact mode of the button a bool prop, changes the code in…
Nov 14, 2018
f6a42ff
Merge pull request #62 from SAP/feature/refactor-button-component
InnaAtanasova Nov 14, 2018
c289460
Adding unit tests and code coverage to components
chrismanciero Nov 15, 2018
6fb6d0c
merge changes
chrismanciero Nov 15, 2018
b159c55
update test
chrismanciero Nov 15, 2018
8f4cce2
Merge pull request #63 from SAP/unit-test-components
chrismanciero Nov 15, 2018
e05dfc9
Issue#37: initial commit for Localization editor
Nov 15, 2018
0d9cb47
added more unit test
chrismanciero Nov 15, 2018
31279ed
add toggle and token components
chrismanciero Nov 15, 2018
137799b
Merge pull request #64 from SAP/more-unit-tests
chrismanciero Nov 15, 2018
b93652e
unit test and coverage for Tile component
chrismanciero Nov 15, 2018
6e3d580
unit test and coverage for Tabs component
chrismanciero Nov 16, 2018
7da06e1
create unit test and coverage for Table component
chrismanciero Nov 16, 2018
462adaa
unit test and coverage for dropdown component
chrismanciero Nov 16, 2018
01de46b
Issue:#37: adds localization editor with textarea
Nov 16, 2018
ef59ace
init unit test for Tree
chrismanciero Nov 16, 2018
021cbeb
init unit test for Time component
chrismanciero Nov 16, 2018
6c15841
unit test for comboboxinput
chrismanciero Nov 16, 2018
3b60000
unit test and coverage for form components
chrismanciero Nov 16, 2018
d2f1441
Merge pull request #66 from SAP/batch-of-tests
chrismanciero Nov 16, 2018
8c453a1
Update CONTRIBUTING.md
chrismanciero Nov 16, 2018
c7073b6
add unit test and coverage to SideNavigation
chrismanciero Nov 17, 2018
eab3adc
unit test for InputGroup component
chrismanciero Nov 17, 2018
2a6cac7
unit test for megamenu
chrismanciero Nov 17, 2018
5a13978
init unit test for navbar
chrismanciero Nov 17, 2018
e588d55
init panel unit test
chrismanciero Nov 17, 2018
613e794
init DatePicker unit test
chrismanciero Nov 17, 2018
e342549
update inputgroup to 100% coverage
chrismanciero Nov 17, 2018
7d9fa26
Merge pull request #65 from SAP/feature/Issue#37-localization-editor
CodesOfRa Nov 19, 2018
59c4730
Merge branch 'develop' into another-wave-unit-test
chrismanciero Nov 19, 2018
b754732
update panel unit test coverage
chrismanciero Nov 19, 2018
bfcee9a
Issue#67: migrates to v1.3.2, adds buttom center position for the inl…
Nov 19, 2018
dc483fb
added popover unit test and code coverage
chrismanciero Nov 19, 2018
7c0b829
comment out test for popover
chrismanciero Nov 19, 2018
4d87b57
unit test for localization editor
chrismanciero Nov 19, 2018
d2530b6
Merge pull request #70 from SAP/another-wave-unit-test
InnaAtanasova Nov 19, 2018
60a47d7
Issue#67: adds PropTypes for ActionBar component
Nov 19, 2018
459665a
Issue#67: adds PropTypes for Alert component
Nov 19, 2018
7a1d4a6
Issue#67: adds PropTypes for Badge component, fixes the warnings in t…
Nov 19, 2018
30b2ab9
unit test coverage update for MegaMenu
chrismanciero Nov 19, 2018
c0248f2
100% coverage for MegaMenu
chrismanciero Nov 19, 2018
2d85d3c
update side navigation unit test and coverage
chrismanciero Nov 19, 2018
55f48cd
Create .travis.yml
InnaAtanasova Nov 19, 2018
09bca39
Create unit-tests.sh
InnaAtanasova Nov 19, 2018
703afcd
Update unit-tests.sh
InnaAtanasova Nov 19, 2018
9ad294c
Merge pull request #68 from SAP/feature/Issue#67-migrate-lo-latest-fi…
InnaAtanasova Nov 19, 2018
183a4a6
update time coverage and tests
chrismanciero Nov 19, 2018
46f60b4
Merge branch 'develop' into unit-test-updates
chrismanciero Nov 19, 2018
dcfab1c
snapshot update
chrismanciero Nov 19, 2018
be14107
Merge pull request #72 from SAP/unit-test-updates
InnaAtanasova Nov 19, 2018
fda8a68
Update unit-tests.sh
InnaAtanasova Nov 20, 2018
1285703
#73 test travisCI integration
droshev Nov 20, 2018
6a5bd16
#76 make unit-tests.sh executable
droshev Nov 20, 2018
8b73739
Update README.md
droshev Nov 20, 2018
6ffc8b8
#73 temporarily comment the failing tests
droshev Nov 20, 2018
6beeec4
init issue #3
CodesOfRa Nov 20, 2018
7313668
Merge pull request #74 from SAP/test/#73-travisCI-test
InnaAtanasova Nov 20, 2018
53bd316
adds PropTypes for button
Nov 20, 2018
e7a6eb4
adds PropTypes for Forms
Nov 20, 2018
14f6bf0
adds PropTypes for Identifier
Nov 20, 2018
eb809f7
adds PropTypes for Image
Nov 20, 2018
5fb8614
adds PropTypes for InputGroup
Nov 20, 2018
5502536
adds PropTypes for Popover
Nov 20, 2018
b8e1091
adds PropTypes for Table, adds tr for the thead
Nov 20, 2018
07172f2
deals with some console warnings, adds PropTypes for Toggle
Nov 20, 2018
c508512
adds PropTypes for Tree
Nov 20, 2018
6c9a45f
adds consistent type in the documentation
Nov 20, 2018
602d307
Merge pull request #75 from SAP/feature/Issue#69-typechecking-PropTypes
InnaAtanasova Nov 20, 2018
5e4334c
add timepicker item -- issue #3
CodesOfRa Nov 20, 2018
f282aa5
Merge branch 'feature/Issue#3-TimePicker-Component' of https://github…
CodesOfRa Nov 21, 2018
ee1e490
issue #3 start input validation
CodesOfRa Nov 21, 2018
f895487
updated unit test coverage and eslint warnings
chrismanciero Nov 21, 2018
528bc9c
Merge pull request #76 from SAP/unit-test-cleanup
chrismanciero Nov 21, 2018
5291ede
issue #3 documentation & input validation& send data to Time component
CodesOfRa Nov 21, 2018
5fdc1f7
issue #3 documentation fix
CodesOfRa Nov 21, 2018
e629262
issue #3 final input validation
CodesOfRa Nov 22, 2018
1771a3e
issue #3 fix doc header
CodesOfRa Nov 22, 2018
9d89791
#78 make the package as a library
droshev Nov 22, 2018
02dade2
Merge pull request #79 from SAP/bugfix/#78
InnaAtanasova Nov 22, 2018
7b35070
#78 remove the aboslute paths used in the build library
droshev Nov 22, 2018
d44f10a
Merge pull request #80 from SAP/bugfix/#78
InnaAtanasova Nov 22, 2018
baae5f8
Update README.md
droshev Nov 22, 2018
ef547c6
issue #3 noArrow on Popover
CodesOfRa Nov 22, 2018
3ce9454
Merge pull request #77 from SAP/feature/Issue#3-TimePicker-Component
InnaAtanasova Nov 22, 2018
04d3120
fix error making inputGroup text box uneditable
chrismanciero Nov 25, 2018
59dc1d5
update unit test
chrismanciero Nov 25, 2018
1bc88c2
Update README.md
droshev Nov 26, 2018
f0437a0
Merge pull request #81 from SAP/inputGroup-fix
InnaAtanasova Nov 26, 2018
2e1df0a
clean up of class -> className
chrismanciero Nov 26, 2018
3f50c65
Merge pull request #82 from SAP/style-clean-up
InnaAtanasova Nov 26, 2018
656f937
added unit test and coverage for TimePicker
chrismanciero Nov 27, 2018
382d57e
add more test
chrismanciero Nov 27, 2018
1087d79
update unit test for tree
chrismanciero Nov 27, 2018
a45a40c
Merge pull request #83 from SAP/timePicker-unit-test
chrismanciero Nov 27, 2018
1b73ba0
update unit test for Time component
chrismanciero Nov 27, 2018
9d887da
Merge pull request #84 from SAP/time-unit-test
chrismanciero Nov 27, 2018
b1f9575
Calendar unit tests
chrismanciero Nov 27, 2018
5dee649
unit test for DatePicker
chrismanciero Nov 27, 2018
30454a8
remove console log
chrismanciero Nov 27, 2018
6d56fc6
update unit tests
chrismanciero Nov 27, 2018
8d17745
update tree unit test
chrismanciero Nov 27, 2018
f3a69be
fix test error
chrismanciero Nov 27, 2018
1388167
Merge pull request #85 from SAP/unit-tests-updated
chrismanciero Nov 27, 2018
78c0f0f
update Tree unit tests
chrismanciero Nov 28, 2018
090ae44
commented out, code not being used
chrismanciero Nov 28, 2018
3ae0d9e
update time unit tests
chrismanciero Nov 29, 2018
f2aae15
update datepicker unit test
chrismanciero Nov 29, 2018
bbc66f8
Merge pull request #86 from SAP/update-unit-tests
chrismanciero Nov 29, 2018
93c0a28
adds event handler for the Action bar Back btn
Nov 30, 2018
48b9ecf
Adds in the documentation an example with a function for the Button c…
Nov 30, 2018
df2a480
removes RTL for Alert, updates the tests for Alert component
Nov 30, 2018
dc3cfe6
Adds more sizes for Identifier in the documentation
Nov 30, 2018
7fb87ab
improves import statements
Nov 30, 2018
fe7de54
Merge pull request #88 from SAP/feature/code-improvements
InnaAtanasova Nov 30, 2018
fa61c65
fix calendar unit test failing
chrismanciero Dec 3, 2018
94c10c3
remove console log statement
chrismanciero Dec 3, 2018
63e0b68
update identifier test
chrismanciero Dec 3, 2018
1e8f27b
Merge pull request #89 from SAP/calendar-unit-test-fix
chrismanciero Dec 4, 2018
890f351
pass all Calendar inputs from DatePicker
Dec 5, 2018
b1936dc
adds the inputs for Calendar in DatePicker documentation
Dec 5, 2018
c0847f9
more examples for disable past and future dates
Dec 5, 2018
accc3f4
Issue#90: initial commit for Shellbar
Dec 6, 2018
02c29f1
Issue#90: adds more shellbar components
Dec 7, 2018
9629d7d
Issue#90: adds responsive design
Dec 10, 2018
479e988
Issue#90: moves the binding of onResize method in the constructor
Dec 10, 2018
e2cf3f6
Fix fiori-fundamentals scss import
tanguyf Dec 11, 2018
159fe04
Adds refactoring for Menu component, changes the Shellbar implementat…
Dec 11, 2018
dc4d30f
adds more implementation
Dec 11, 2018
4fb8fd2
Merge pull request #92 from SAP/feature/Issue#91-datepicker-documenta…
InnaAtanasova Dec 11, 2018
218c7b8
Adds Basic Shellbar to documentation
Dec 11, 2018
705e861
Adds in the documentation an example with background image
Dec 11, 2018
aadbeda
Adds color accent to the user identifier
Dec 11, 2018
e0abd8b
Isseu#90: deals with console warnings for className and list keys
Dec 12, 2018
948e58d
Issue#100: updrages to v1.4.0 of FioriFundamentals, adds information …
Dec 12, 2018
9670ed7
Merge pull request #101 from SAP/feature/Issue#100-migration-to-Fiori…
CodesOfRa Dec 13, 2018
c3ce770
Iddue#90: deals with another console warning for key
Dec 13, 2018
fc7483e
Merge branch 'develop' into feature/Issue#90-shellbar
InnaAtanasova Dec 13, 2018
75f650f
Merge pull request #97 from SAP/feature/Issue#90-shellbar
InnaAtanasova Dec 13, 2018
52852f9
Merge pull request #95 from tanguyf/patch-1
InnaAtanasova Dec 14, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": [["react-app", { "absoluteRuntime": false }]]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

# production
/build
/dist

# misc
.DS_Store
Expand Down
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
language: node_js
node_js:
- 8.9.0
dist: trusty
git:
depth: false
branches:
only:
- develop
- "/^feature\\/.*$/"
jobs:
include:
- stage: "Fundamental-react build"
name: "Unit tests"
script: "./ci-scripts/unit-tests.sh"
notifications:
email:
on_failure: always
on_success: change
59 changes: 31 additions & 28 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

We're excited that you're interested in contributing to Fundamental-react! Your contribution can make this library even better. Please read the guidelines regarding contributions:

- [Issues and Bugs](#issues-and-bugs)
- [Feature Requests](#feature-requests)
- [Contribute Code](#contribute-code)
- [Issues and Bugs](#issues-and-bugs)
- [Feature Requests](#feature-requests)
- [Contribute Code](#contribute-code)

## Issues and Bugs

If you find a bug or some other issue with any part of the library, please [submit an issue](https://github.com/SAP/fundamental-react/issues). Before doing so, please make sure that:

- The issue is not a duplicate issue.
- The issue has not been fixed in a newer release of the library.
- The issue is reproducible.
- Your explanation is clear and complete.
- You provide example code and/or screenshots (recommended).
- The issue is not a duplicate issue.
- The issue has not been fixed in a newer release of the library.
- The issue is reproducible.
- Your explanation is clear and complete.
- You provide example code and/or screenshots (recommended).

If you meet the above criteria, you can submit issues with our [GitHub issue tracker](https://github.com/SAP/fundamental-react/issues/new). Please use [labels](#usage-of-labels) to categorize your issue.

Expand All @@ -28,25 +28,25 @@ GitHub offers labels to categorize issues. You can use the following labels:

Labels for issue categories:

- bug: Issues in the code.
- documentation: Issues with the documentation.
- enhancement: Enhancement requests.
- bug: Something isn't working / Issues in the code.
- documentation: Issues with the documentation (repo and website documentation).
- enhancement: New feature or enhancement requests.

Status of open issues:

- (no label): The default status.
- unconfirmed: The issue needs to be confirmed as being a bug or future enhancement.
- approved: The issue is confirmed as being a bug to be fixed or enhancement to be developed.
- author action: The issue's creator needs to provide additional information.
- contribution welcome: The fix or enhancement is approved and you are invited to contribute to it.
- (no label): The default status.
- unconfirmed: The issue needs to be confirmed as being a bug or future enhancement.
- approved: The issue is confirmed as being a bug to be fixed or enhancement to be developed.
- author action: The issue's creator needs to provide additional information.
- contribution welcome: The fix or enhancement is approved and you are invited to contribute to it.

Status of closed issues:

- fixed: A fix for the issue was provided.
- duplicate: The issue is also reported in a different ticket and is being managed there.
- invalid: The reported issue will not be addressed.
- works: The issue cannot be reproduced, or the feature is working as expected.
- wontfix: The issue will not be fixed.
- fixed: A fix for the issue was provided.
- duplicate: The issue is also reported in a different ticket and is being managed there.
- invalid: The reported issue will not be addressed.
- works: The issue cannot be reproduced, or the feature is working as expected.
- wontfix: The issue will not be fixed.

## Contribute Code

Expand All @@ -57,7 +57,6 @@ There are three important things to consider:
1. You must be aware of the Apache License (which describes contributions) and **agree to the Contributors License Agreement**. This is common practice in all major Open Source projects. If you are an individual contributor, use _[CLA assistant](https://cla-assistant.io/)_. CLA assistant is an open source tool that integrates with GitHub and enables a one-click-experience for accepting the CLA. If you are contributing on behalf of a company, see the [Company Contributors](#company-contributors) section below for details.
2. You must follow **code style, quality, and product standards requirements**. You can find more information on the coding guidelines below.


### Contributor License Agreement

When you contribute (code, documentation, or anything else), you must be aware that your contribution is covered by the same [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0) that is applied to Fundamental-react itself.
Expand All @@ -72,15 +71,19 @@ If employees of a company contribute code, in **addition** to the individual agr
A company representative authorized to do so needs to download, fill out, and print
the [Corporate Contributor License Agreement](/docs/SAP%20Corporate%20Contributor%20License%20Agreement.pdf) form. Then either:

- Scan it and e-mail it to [opensource@sap.com](mailto:opensource@sap.com),
- Fax it to: +49 6227 78-45813,
- Send it by mail to: _Industry Standards & Open Source Team, Dietmar-Hopp-Allee 16, 69190 Walldorf, Germany_.
- Scan it and e-mail it to [opensource@sap.com](mailto:opensource@sap.com),
- Fax it to: +49 6227 78-45813,
- Send it by mail to: _Industry Standards & Open Source Team, Dietmar-Hopp-Allee 16, 69190 Walldorf, Germany_.

The form lists all employees who are authorized to contribute on behalf of your company. When this list changes, please let us know.

### Contribution Content Guidelines

You must follow the coding style as best you can when submitting code. Take note of naming conventions, separation of concerns, and formatting rules. You can use the code formatter [Prettier](https://prettier.io/) to handle some of this for you automatically.
You must follow the coding style as best you can when submitting code. Take note of naming conventions, separation of concerns, and formatting rules. You can use the code formatter [Prettier](https://prettier.io/) to handle some of this for you automatically.

### Unit testing

All components should have associated unit tests created with a code coverage score of at least 85%. Be an overachiever and shoot for 100% :) [Learn how to create unit tests](./UNIT-TESTING.md)

### How to contribute - the Process

Expand All @@ -90,7 +93,7 @@ You must follow the coding style as best you can when submitting code. Take note
4. Create a Pull Request from your forked repository to github.com/SAP/fundamental-react. In the subject of the pull request, briefly describe the bug fix or enhancement you're contributing. In the pull request description, please provide a link to the issue in the issue tracker.
5. Follow the link posted by the CLA assistant to your pull request and accept it, as described above.
6. Wait for our code review and approval. We may ask you for additional commits, or make changes to your pull request ourselves.
- Note that the Fundamental-react developers also have their regular duties so, depending on the required effort for reviewing, testing, and clarification, this may take a while.
- Note that the Fundamental-react developers also have their regular duties so, depending on the required effort for reviewing, testing, and clarification, this may take a while.
7. Once the change has been approved, we inform you in a comment.
8. Your pull request cannot be merged directly into the branch (internal SAP processes), but is merged internally and immediately appears in the public repository as well.
9. We close the pull request. You can then delete the now obsolete branch.
9. We close the pull request. You can then delete the now obsolete branch.
34 changes: 22 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@

# Fundamental-react
React.JS components for [SAP Fiori Fundamentals](https://github.com/SAP/fundamental)
- [Playground](https://sap.github.io/fundamental-react/)

- [Playground](https://sap.github.io/fundamental-react/)
- [npm package fundamental-react](https://www.npmjs.com/package/fundamental-react)
- [![Build Status](https://travis-ci.org/SAP/fundamental-react.svg?branch=develop)](https://travis-ci.org/SAP/fundamental-react)
- [GitHub repo of Angular implementation of SAP Fiori Fundamentals](https://github.com/SAP/fundamental-ngx)
- [GitHub repo of Vue implementation of SAP Fiori Fundamentals](https://github.com/SAP/fundamental-vue)

## Description

Expand Down Expand Up @@ -30,24 +33,31 @@ Lint errors are shown in the console.

Launches the test runner in the interactive watch mode.

#### `npm run build`
#### `npm test -- --coverage`

Builds the app for production to the `build` folder.
Launches the test runner and display code coverage report.

#### `npm test -- --coverage --watch`

## Download and Installation
Launches the test runner and display code coverage report and interactive watch mode.

#### 1. Download Fundamental UI:
#### `npm run build`

Builds the app for production to the `build` folder.

`npm install --save fundamental-ui`
## Download and Installation

#### 1. Download Fiori Fundamentals:

#### 2. Include the Fundamental UI CSS in your React application. In your App.css or App.scss file include the following lines:
`npm install --save fiori-fundamentals`

`@import '../node_modules/fundamental-ui/scss/icons/'`
`@import '../node_modules/fundamental-ui/dist/fonts/'`
`@import '../node_modules/fundamental-ui/scss/all.scss'`
#### 2. Include the Fiori Fundamentals CSS in your React application. In your App.css or App.scss file include the following lines:

```
$fd-icons-path: "~fiori-fundamentals/scss/icons/";
$fd-fonts-path: "~fiori-fundamentals/scss/fonts/";
@import '../node_modules/fiori-fundamentals/scss/all.scss';
```

## Known Issues

Expand All @@ -59,7 +69,7 @@ If you encounter an issue, you can [create a ticket](https://github.com/SAP/fund

## Contributing

If you want to contribute, please check the [CONTRIBUTING.md](./CONTRIBUTING.md) documentation for contribution guidelines.
If you want to contribute, please check the [CONTRIBUTING.md](./CONTRIBUTING.md) documentation for contribution guidelines.

## License

Expand Down
50 changes: 50 additions & 0 deletions UNIT-TESTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Unit Testing

To help improve the stability of the Fundamental React components, unit testing and code coverage reports are created using [Jest](https://jestjs.io/) and [Enzyme](https://github.com/airbnb/enzyme)

- [Set-up](#set-up)
- [Running Tests and Code Coverage](#running-tests-and-code-coverage)
- [Creating a unit test](#creating-a-unit-test)

## Set-up

To ensure that you have the proper npm modules installed for unit testing, from the terminal window:
`npm install`

## Running Tests and Code Coverage

Configuration is setup to look for .test.js files in the /src/ directory.

#### `npm test`

Launches the test runner in the interactive watch mode.

#### `npm test -- --coverage`

Launches the test runner and display code coverage report. The code coverage report will only be applied to the Components main .js file. Coverage reports will not be created for .Component.js files.

#### `npm test -- --coverage --watch`

Launches the test runner and display code coverage report as well starts interactive watch mode.

## Creating a Unit Test

Depending on the component, there are different approaches to creating unit tests. The easiest way to make sure that a component is rendered with the desired output is by creating a [snapshot](https://jestjs.io/docs/en/tutorial-react#snapshot-testing). The first time a snapshot is created it will render the component based off the prop values sent to the component. Each subsequent unit test will check against the snapshot to make sure the component is rendering exactly as before.

Testing user interaction of a component can be done with Enzyme and Jest. Please refer to [Enzyme's documentation](https://github.com/airbnb/enzyme#basic-usage) on how to interact with the DOM.

## Viewing results

You can view a nice visual representation of the code coverage status as well as see what lines are missing coverage. In the repository of your fundamental-react project navigate to <directory of fundamental-react>/coverage/lcov-report/index.html. From here you can click on the component name you want to view coverage for view the lines covered in the JS file. Placing your mouse over a highlighted line of code will display a tooltip.

## Common issues

### Invariant Violation: Target container is not a DOM element.

This issue is usually caused because the modules being imported are not properly defined. An example of improperly defining modules to be imported is by grouping all the components needed and just referencing the whole library.

Ex: `import {Popover, Time} from '../';`

The correct solution is to import the modules from their defined location.
<br/><br/>
Ex: `import {Popover} from '../Popover/Popover'; import {Time} from '../Time/Time';`
Empty file added assets/.gitkeep
Empty file.
Binary file added assets/01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/06.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/07.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/08.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/09.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/headshot-male.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added assets/index.js
Empty file.
14 changes: 14 additions & 0 deletions ci-scripts/unit-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -e
set -o pipefail

echo "-----"
echo "Running unit tests and code coverage for core"
exec 5>&1
output=$(npm test src --watch=false --code-coverage --browsers=ChromeHeadless | tee /dev/fd/5)
coverage=$(echo $output | grep -i "does not meet global threshold" || true)
if [[ -n "$coverage" ]]; then
echo "Error: Tests did not meet coverage expectations"
exit 1
fi

Loading