You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 1, 2020. It is now read-only.
* Add middle click tab closing (#2069)
by adding a onMouseDown directive to both tab file icon and
tab name and checking the resulting React.MouseEvent for a
middle click
* Fix unused imports and whitespace in Tabs ui test (#2069)
* Update Tabs component test snapshot (#2069)
* Fix Tabs ui test to correctly retrieve children (#2069)
* Differentiate between single und multiple tabs in test (#2069)
* Use mousedown event for tab selection and closing (#2069)
by middle clicking and let the tab itself handle the logic
for it by checking React.MouseEvent.button value
* Update classnames dependency to lastest master branch
and write own @types module declaration so that it can be used in
testing nstead of using a mock. The mock does not suffice as the
way the actual module previously had to be imported was
"import * as classNames" where classNames was the actual function.
It is not possible to build a module in typescript/es6 imports, which
will directly return a function in the same way the dependency did
in commonjs module syntax. Instead when defining a function to be
returned as default export it is returned as an Object like this
"{ default: [Function] }", which is correctly resolved when importing
with "import classNames from 'classnames'".
This only previously worked in production as webpacks ts-loader,
handles this issue, whereas when testing the sources are only compiled
with tsc.
There is an update to the classnames dependency on the current master,
but there hasn't been a release since 2006. So options were to setup
webpack for tests as well or add updated classnames dependency which
sets a "default" value on its commonjs exports.
Links for reference:
JedWatson/classnames#152JedWatson/classnames#106DefinitelyTyped/DefinitelyTyped#25206microsoft/TypeScript#2719
* Fix tab click onMouseDown callback
* Test tab clicks to select/close trigger callbacks
* Mock child react components directly to test smaller unit
* Reset calls to callback mocks in each test case
* Add tests for tabs interaction with FileIcon/Sneakable
0 commit comments