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
@@ -333,43 +332,3 @@ See the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/
333
332
<Checkboxvalue="basketball">Basketball</Checkbox>
334
333
</CheckboxGroup>
335
334
```
336
-
337
-
## Testing
338
-
339
-
### Test utils <VersionBadgeversion="beta"style={{marginLeft: 4, verticalAlign: 'bottom'}} />
340
-
341
-
`@react-spectrum/test-utils` offers common checkbox group interaction utilities which you may find helpful when writing tests. See [here](./testing.html#react-spectrum-test-utils) for more information on how to setup these utilities
342
-
in your tests. Below is the full definition of the checkbox group tester and a sample of how you could use it in your test suite.
@@ -399,43 +398,3 @@ respectively for container sizing considerations. Modal sizes on mobile devices
399
398
)}
400
399
</DialogTrigger>
401
400
```
402
-
403
-
## Testing
404
-
405
-
### Test utils <VersionBadgeversion="beta"style={{marginLeft: 4, verticalAlign: 'bottom'}} />
406
-
407
-
`@react-spectrum/test-utils` offers common dialog interaction utilities which you may find helpful when writing tests. See [here](./testing.html#react-spectrum-test-utils) for more information on how to setup these utilities
408
-
in your tests. Below is the full definition of the dialog tester and a sample of how you could use it in your test suite.
@@ -307,43 +306,3 @@ See the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/
307
306
<Radiovalue="dragon">Dragon</Radio>
308
307
</RadioGroup>
309
308
```
310
-
311
-
## Testing
312
-
313
-
### Test utils <VersionBadgeversion="beta"style={{marginLeft: 4, verticalAlign: 'bottom'}} />
314
-
315
-
`@react-spectrum/test-utils` offers common radio group interaction utilities which you may find helpful when writing tests. See [here](./testing.html#react-spectrum-test-utils) for more information on how to setup these utilities
316
-
in your tests. Below is the full definition of the radio group tester and a sample of how you could use it in your test suite.
Copy file name to clipboardExpand all lines: packages/dev/docs/pages/react-aria/testing.mdx
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,20 +201,14 @@ See below for the full definition of the `User` object.
201
201
Below is a list of the ARIA patterns testers currently supported by `createTester`. See the accompanying component testing docs pages for a sample of how to use
Copy file name to clipboardExpand all lines: packages/dev/docs/pages/react-spectrum/testing.mdx
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -395,20 +395,14 @@ See below for the full definition of the `User` object.
395
395
Below is a list of the ARIA patterns testers currently supported by `createTester`. See the accompanying component testing docs pages for a sample of how to use
If you need to customize things further, such as accessing internal state or customizing DOM structure, you can drop down to the lower level Hook-based API. See [useCheckboxGroup](useCheckboxGroup.html) for more details.
613
-
614
-
## Testing
615
-
616
-
### Test utils <VersionBadgeversion="beta"style={{marginLeft: 4, verticalAlign: 'bottom'}} />
617
-
618
-
`@react-aria/test-utils` offers common checkbox group interaction utilities which you may find helpful when writing tests. See [here](./testing.html#react-aria-test-utils) for more information on how to setup these utilities
619
-
in your tests. Below is the full definition of the checkbox group tester and a sample of how you could use it in your test suite.
620
-
621
-
```ts
622
-
// CheckboxGroup.test.ts
623
-
import {render} from'@testing-library/react';
624
-
import {User} from'@react-aria/test-utils';
625
-
626
-
let testUtilUser =newUser({interactionType: 'mouse', advanceTimer: jest.advanceTimersByTime});
627
-
// ...
628
-
629
-
it('CheckboxGroup can select multiple checkboxes', asyncfunction () {
630
-
// Render your test component/app and initialize the checkbox group tester
631
-
let {getByTestId} =render(
632
-
<CheckboxGroupdata-testid="test-checkboxgroup">
633
-
...
634
-
</CheckboxGroup>
635
-
);
636
-
let checkboxGroupTester =testUtilUser.createTester('CheckboxGroup', {root: getByTestId('test-checkboxgroup')});
If you need to customize things further, such as accessing internal state or customizing DOM structure, you can drop down to the lower level Hook-based API. See [useDialog](useDialog.html) for more details.
353
-
354
-
## Testing
355
-
356
-
### Test utils <VersionBadgeversion="beta"style={{marginLeft: 4, verticalAlign: 'bottom'}} />
357
-
358
-
`@react-aria/test-utils` offers common dialog interaction utilities which you may find helpful when writing tests. See [here](./testing.html#react-aria-test-utils) for more information on how to setup these utilities
359
-
in your tests. Below is the full definition of the dialog tester and a sample of how you could use it in your test suite.
360
-
361
-
```ts
362
-
// Dialog.test.ts
363
-
import {render} from'@testing-library/react';
364
-
import {User} from'@react-aria/test-utils';
365
-
366
-
let testUtilUser =newUser({interactionType: 'mouse', advanceTimer: jest.advanceTimersByTime});
367
-
// ...
368
-
369
-
it('Dialog can be opened and closed', asyncfunction () {
370
-
// Render your test component/app and initialize the dialog tester
@@ -631,40 +630,3 @@ RadioGroup provides a <TypeLink links={statelyDocs.links} type={statelyDocs.expo
631
630
### Hooks
632
631
633
632
If you need to customize things further, such as accessing internal state or customizing DOM structure, you can drop down to the lower level Hook-based API. See [useRadioGroup](useRadioGroup.html) for more details.
634
-
635
-
## Testing
636
-
637
-
### Test utils <VersionBadgeversion="beta"style={{marginLeft: 4, verticalAlign: 'bottom'}} />
638
-
639
-
`@react-aria/test-utils` offers common radio group interaction utilities which you may find helpful when writing tests. See [here](./testing.html#react-aria-test-utils) for more information on how to setup these utilities
640
-
in your tests. Below is the full definition of the radio group tester and a sample of how you could use it in your test suite.
641
-
642
-
```ts
643
-
// RadioGroup.test.ts
644
-
import {render} from'@testing-library/react';
645
-
import {User} from'@react-aria/test-utils';
646
-
647
-
let testUtilUser =newUser({interactionType: 'mouse', advanceTimer: jest.advanceTimersByTime});
648
-
// ...
649
-
650
-
it('RadioGroup can switch the selected radio', asyncfunction () {
651
-
// Render your test component/app and initialize the radiogroup tester
652
-
let {getByRole} =render(
653
-
<RadioGroup>
654
-
...
655
-
</RadioGroup>
656
-
);
657
-
658
-
let radioGroupTester =testUtilUser.createTester('RadioGroup', {root: getByRole('radiogroup')});
0 commit comments