react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

Aria pattern utils

Open LFDanLu opened this issue 1 year ago โ€ข 12 comments

Closes

โœ… Pull Request Checklist:

  • [ ] Included link to corresponding React Spectrum GitHub Issue.
  • [ ] Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • [ ] Filled out test instructions.
  • [ ] Updated documentation (if it already exists for this component).
  • [ ] Looked at the Accessibility Practices for this feature - Aria Practices

๐Ÿ“ Test Instructions:

๐Ÿงข Your Project:

LFDanLu avatar Apr 16 '24 00:04 LFDanLu

## API Changes

@react-aria/test-utils

/@react-aria/test-utils:DEFAULT_LONG_PRESS_TIME

-DEFAULT_LONG_PRESS_TIME {
-  UNTYPED
-}

/@react-aria/test-utils:triggerLongPress

 triggerLongPress {
-  element: HTMLElement
-  opts: any
+  opts: {
+    element: HTMLElement
+  advanceTimer: (number) => void | Promise<unknown>
+  pointerOpts?: {
+  
+}
+}
   returnVal: undefined
 }

/@react-aria/test-utils:UserOpts

+UserOpts {
+  advanceTimer?: (number) => void | Promise<unknown>
+  interactionType?: 'mouse' | 'touch' | 'keyboard'
+}

/@react-aria/test-utils:BaseTesterOpts

+BaseTesterOpts {
+  root: HTMLElement
+}

/@react-aria/test-utils:PatternNames

+PatternNames {
+  P: undefined
+}

/@react-aria/test-utils:User

+User {
+  advanceTimer: UserOpts['advanceTimer']
+  constructor: (UserOpts) => void
+  createTester: (T, ObjectOptionsTypes<T>) => ObjectType<T>
+  interactionType: UserOpts['interactionType']
+  user: any
+}

@react-spectrum/test-utils

/@react-spectrum/test-utils:DEFAULT_LONG_PRESS_TIME

-DEFAULT_LONG_PRESS_TIME {
-  UNTYPED
-}

/@react-spectrum/test-utils:triggerLongPress

 triggerLongPress {
-  element: HTMLElement
-  opts: any
+  opts: {
+    element: HTMLElement
+  advanceTimer: (number) => void | Promise<unknown>
+  pointerOpts?: {
+  
+}
+}
   returnVal: undefined
 }

/@react-spectrum/test-utils:UserOpts

+UserOpts {
+  advanceTimer?: (number) => void | Promise<unknown>
+  interactionType?: 'mouse' | 'touch' | 'keyboard'
+}

/@react-spectrum/test-utils:BaseTesterOpts

+BaseTesterOpts {
+  root: HTMLElement
+}

/@react-spectrum/test-utils:PatternNames

+PatternNames {
+  P: undefined
+}

/@react-spectrum/test-utils:User

+User {
+  advanceTimer: UserOpts['advanceTimer']
+  constructor: (UserOpts) => void
+  createTester: (T, ObjectOptionsTypes<T>) => ObjectType<T>
+  interactionType: UserOpts['interactionType']
+  user: any
+}

rspbot avatar Sep 24 '24 20:09 rspbot