Commit Graph

284 Commits

Author SHA1 Message Date
Ryan Gossiaux
2b705fd1ae Fix tests after introduction of babel step 2021-12-30 09:56:22 -10:00
Ryan Gossiaux
809cf84164 Add open slot prop to <Menu> 2021-12-30 09:46:29 -10:00
Ryan Gossiaux
a96c4a2339 Add svelte-inline-compile 2021-12-30 09:41:42 -10:00
Ryan Gossiaux
3068c88f8c Add support for svelte-inline-compile to jest 2021-12-30 09:40:10 -10:00
Ryan Gossiaux
a9a0fd3109 1.0.0-beta.6 2021-12-29 11:01:57 -10:00
Ryan Gossiaux
0550274e88 Add .gitattributes to exclude test files from stats
Want this to show up as a Svelte library, not TS, and this seems to be the best way to do it.
2021-12-29 10:58:07 -10:00
Ryan Gossiaux
7578037da5 Add Tabs tests 2021-12-29 10:53:12 -10:00
Ryan Gossiaux
0996de1e6e Add test data to Tab components 2021-12-29 10:32:28 -10:00
Ryan Gossiaux
9772e49054 Fix active tab selection on mount
When this runs, $api.tabs has not been updated yet, so the calculation was not correct.
This caused various bugs like defaultIndex not working and aria-selected not being set, etc.
2021-12-29 10:29:26 -10:00
Ryan Gossiaux
70c68d00fe Tab: fix aria-controls
When porting, I thought I was being clever by just using ids instead of refs in $api.panels
But I didn't notice that the refs let you distinguish those panels which are rendered from those which are not.
My implementation had aria-controls= set for all tabs, even when their panels were not in the DOM.
2021-12-28 16:51:36 -10:00
Ryan Gossiaux
90e633f8a8 1.0.0-beta.5 2021-12-28 15:13:36 -10:00
Ryan Gossiaux
6bb337fb7a Add Popover tests 2021-12-28 15:12:46 -10:00
Ryan Gossiaux
d9117431d6 Add an id to PopoverOverlay 2021-12-28 15:12:16 -10:00
Ryan Gossiaux
5bff629363 PopoverButton: fix aria-controls when Popover is closed 2021-12-28 11:36:18 -10:00
Ryan Gossiaux
c99b74c089 Prettier
Didn't run this on every single file because it messes up the formatting of the some of the TestRenderer constructions
2021-12-28 09:28:36 -10:00
Ryan Gossiaux
23a98b50ed Add remaining Menu tests 2021-12-28 09:12:16 -10:00
Ryan Gossiaux
41774ec075 Fix searching for MenuItems 2021-12-28 09:08:51 -10:00
Ryan Gossiaux
d7348b35b6 Conditionally forward MenuItem click events only if the MenuItem is not disabled
This is obviously a lot easier in React, but at any rate this mimics upstream behavior here.
2021-12-28 09:03:43 -10:00
Ryan Gossiaux
2c09162fc0 Initial Menu tests 2021-12-27 22:00:10 -10:00
Ryan Gossiaux
fe0388cc44 Misc fixes to Menus
* Disabled prop not forwarded correctly to MenuButton
* Active element not set correctly when Menu is opened
* Log message had wrong component name
2021-12-27 21:58:34 -10:00
Ryan Gossiaux
6af4b2a3b6 Add initial RadioGroup tests
Basically all the ones that aren't annoying to write
2021-12-27 15:51:43 -08:00
Ryan Gossiaux
303c68f79c First pass at Listbox tests 2021-12-27 15:19:00 -08:00
Ryan Gossiaux
b37e0f3c9c Remaining Disclosure tests
Minus the render prop tests
2021-12-27 12:56:32 -08:00
Ryan Gossiaux
1bed7dbea7 Initial Disclosure tests 2021-12-26 23:36:37 -08:00
Ryan Gossiaux
206b83963e Fix a couple <Disclosure> mistakes
* Incorrect error messages from <DisclosurePanel>
* Not using buttonId correctly (don't think this had any practical impact though)
2021-12-26 22:58:55 -08:00
Ryan Gossiaux
d1940e5d16 Add nested dialog tests 2021-12-26 22:45:03 -08:00
Ryan Gossiaux
9bd9901ef6 Add more Dialog tests 2021-12-26 18:08:03 -08:00
Ryan Gossiaux
08021bbf21 Add support for <Form> tag 2021-12-26 18:07:47 -08:00
Ryan Gossiaux
b207405a1e Exclude test files from packaging 2021-12-26 17:41:58 -08:00
Ryan Gossiaux
76efee0e21 1.0.0-beta.4 2021-12-26 17:04:43 -08:00
Ryan Gossiaux
77dd80caa2 Add more Dialog tests
This caught an issue with <FocusTrap> already.
2021-12-26 16:53:44 -08:00
Ryan Gossiaux
a2745e1770 Fixes to issues with Dialog, FocusTrap, and StackContextProvider
* StackContextProvider had some reactivity that didn't make sense and would cause an infinite loop if it ever triggered.
* FocusTrap and Dialog did not work together properly all of the time. A top-level <Dialog> with initial state of closed would not have the FocusTrap triggered correctly when it was opened. Needed to make it reactive to changes in `containers`
2021-12-26 16:28:37 -08:00
Ryan Gossiaux
10f2eab08d Add initial batch of Dialog tests 2021-12-26 12:01:18 -08:00
Ryan Gossiaux
39dda7eb76 Refactor out circular dependency in Transition components
This was causing problems with Jest even though it was otherwise fine.
2021-12-26 12:01:18 -08:00
Ryan Gossiaux
3801d35d0f Fix Dialog error message when bad props are passed 2021-12-26 11:48:13 -08:00
Ryan Gossiaux
a033e8ca4a Add <Input> element
Most likely this is only useful for tests
2021-12-26 11:47:20 -08:00
Ryan Gossiaux
ea8693e1ec Add remaining Switch tests 2021-12-25 15:57:35 -08:00
Ryan Gossiaux
1156a0923e Add a few more Switch tests and the accessibility-assertions file 2021-12-25 08:30:41 -08:00
Ryan Gossiaux
e417a9956d npm install -D @testing-library/jest-dom 2021-12-25 08:30:41 -08:00
rgossiaux
4b4b6eba4e Github action for Jest (#26) 2021-12-25 01:27:54 -08:00
Ryan Gossiaux
237236f8d7 Add first test 2021-12-25 01:19:03 -08:00
Ryan Gossiaux
740d91ab06 Add initial test scaffolding 2021-12-25 01:19:03 -08:00
Ryan Gossiaux
ef5960377d npm install -D @testing-library/svelte 2021-12-25 01:19:03 -08:00
Ryan Gossiaux
ac826703a9 Config setup for jest testing 2021-12-25 01:19:03 -08:00
Ryan Gossiaux
3b4e2048c9 npm install -D jest babel-jest svelte-jester ts-jest @types/jest 2021-12-25 01:19:03 -08:00
rgossiaux
1b777011a1 Update README.md
Typos, minor tweaks
2021-12-22 18:37:25 -08:00
rgossiaux
dc26fb8844 Update README.md
Initial documentation
2021-12-22 18:34:09 -08:00
Ryan Gossiaux
9e72505fd3 1.0.0-beta.3 2021-12-22 16:55:48 -08:00
Ryan Gossiaux
b26cc4c6c3 Actually export dl/dd/dt 2021-12-22 16:55:33 -08:00
Ryan Gossiaux
8bfdac11a4 Bump to version 1.0.0-beta.2 2021-12-22 15:08:16 -08:00