Commit graph

14 commits

Author SHA1 Message Date
Nick Taylor
4e97623823
Fixed issue with jest picking up the built storybook folder causing tests to run out of memory. (#8096) 2020-05-28 14:22:24 +02:00
Nick Taylor
58135879c8
Configured jest to use the jest-watch-typeahead watch plugin. (#8093)
* Configured jest to use the jest-watch-typeahead watch plugin.

* Added some documentation in regards to jest watch mode.
2020-05-28 10:09:50 +02:00
Nick Taylor
7f8bb406c5
Added coverage threshold to jest configuration. (#7948) 2020-05-19 10:00:48 -04:00
Mac Siri
f75bcf8673
Set Jest's timezone to UTC (#7670) 2020-05-04 14:10:46 -04:00
Nick Taylor
27131f6f42
Request Utility for Frontend (#7317)
* wip

* Added tests.

* Moved request to @utilities/http.

* Now the CSRF token is retrieved properly.
2020-04-22 07:58:15 -04:00
Nick Taylor
8a5109349f
Updated jest code coverage configuration. (#7144) 2020-04-07 17:17:51 -04:00
Nick Taylor
f557c9d474
Created preact component for crayons dropdown (#6961)
* Created barrel files so we can import directly from @crayons.

* Added stories for Dropdown for JSX.

* Tweaked Dropdown Storybook stories.

* Tweaked <Dropdown /> component.

* Added module mapping to jest for @crayons.

* Added tests for <Dropdown /> component.

* Removed Storybook custom decorator that is no longer required.
2020-03-31 09:42:21 -04:00
Nick Taylor
9630a174f9
Added jest config to support test utility modules. (#6154) [deploy] 2020-02-18 12:54:18 -06:00
Nick Taylor
4fe4c4d791
Fixed false negative of a frontend test suite failing. (#6005) 2020-02-10 18:41:45 -06:00
Mario See
faf1c6719b more testing for connect components (#1046)
* adding more tests

- covers article.jsx and elements created from its props and state
- added png as static file that needs stubbing

* video + channelDetails test coverage

* chat + channels tests

* channels cc refactor

* yarn install

* update snapshot and string spacing

* chat.jsx test

mostly tests rendering elements
- does not test imported components, as those are already tested separately
- does not imported functions from actions or utils as those will be tested separately as well

* cleaning up

- mocked response with flush promises for state/component to reflect appropriate changes

* snapshot updates
2018-11-19 15:07:54 -05:00
Mac Siri
4ab0a070ea
Improve Onboarding's spec & Update snapshots (#1111) [ci skip] 2018-11-14 16:18:02 -05:00
Nick Taylor
18980034d3 Nick/feature/search to preact (#532)
* Works, but lots of cleanup/questions.

* Fixed comment.

* Only want the search script to load once with InstantClick active.

* Removed unnecessary DOMContentLoaded from copy paste.

* 🔧 Enabled (P)React Devtools.

* Updated comment about reactToEvent.

* Removed unnecessary server-side generated JS for search.

* <Search /> component now has component state.

* Search functions are in there own module now.

* 👷Refactor

* Render propped it up.

* Fixed issue with encoding of search term.

* Removed data-no-instant attr from script.

* 👷Refactor

* Now flash of search loading is avoided..

* Moved search under components folder.

* Tests

* fixedEncodeURIComponent does not need to be exported.

* Tests

* Folders to ignore from the VS Code Local History extension.

* Tests

* Snapshot test for <Search /> component.

* Tests

* Now the <SearchContainer /> handles the '/' key shortcut.

* Made the search box ID a prop defaulting to 'nav-search'

* Excluded barrel files from code coverage.

* Componentized search CSS.

* Storybook stories for <Search /> component.

* Removed extension folders to ignore.

* Fixed logic for "/" key triggering search.

* updated jest snapshot for <Search /> component.

* updated package.json lock file.

* Disabled the import/prefer-default-export rule.

* Now search term clears if not on a non-search results page.

* removed comment that is no longer valid.

* No longer using render prop for Search. Doesn't make sense as it's not stuff that is reused.

* Added preact-render-spy do dev deps.
2018-07-19 17:02:48 -04:00
Nick Taylor
261b6683b3 Onboarding welcome Storybook stories (#385) 2018-06-05 14:50:30 -04:00
Mac Siri
301c6080e3 Initial commit 2018-02-28 16:11:08 -05:00