-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GN-117 Remove need to assert on dom (#148)
* context experiments * basic context setup * tidy up debugging * uncommen event listener for expected closing behaviour * make debug clearer * clean up console logging for clarity * move globalnavcontext provider up to header component * GN-117 add useCallback to clickOutside hook to maintain reference to id of open dropdown * GN-117 Refactor Nav component to class. Add custom hook and context for open dropdown state and nav area click outside detection * GN-117 Begin conversion of Account class component to functional component * GN-117 Remove commented out lines * GN-117 Reinstate propTypes for Naccount placeholder component * Side effect sideline (#150) * side effect shenanigans * Magical useRef() * update key event to use e.key rather than e.keycode for better cross platform * Move myAccount isExpanded state into GlobalNavContext * Remove redundant event binding * Make megamenu click detection more 'reacty' * Manage context of opened menus * Rename Naccount component to Account Co-authored-by: John Davey <[email protected]> * Tests needed * GN-117 Tidy up redundant arguments and commented out logic for useClickOutside hook * GN-117 Change directory structure for hooks and react context. Make useClickOutside re-useable. * GN-117 Import GlobalNavContextProvider from new location for Account tests * GN-117 Fixing broken unit tests * GN-117 Fixing broken tests * GN-117 Fixing broken tests * Replace simulate click * GN-117 Revert some tests to shallow rendering after adding defaults to context * GN-117 Revert to shallow mounting for a previously failing unit test * GN-117 Convert unit test from shallow to mount due to issues around enzyme support of useContext 'enzymejs/enzyme#2176' * GN-117 Rename GlobalNavContext to HeaderContext * GN-117 remove unused dependencies from account test * GN-117 Tidy up unit tests * testing custom hook useClickOutside * basic setup * Custom hook test * Update test * Rename test Co-authored-by: w@rren <[email protected]>
- Loading branch information
1 parent
5102461
commit 482e52e
Showing
11 changed files
with
614 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.