Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report][3.5.17] [VDialog] Wrong type passed as event handler to onAfterEnter in unit testing #19694

Closed
kingyue737 opened this issue Apr 26, 2024 · 1 comment
Labels
S: triage upstream Problem with a third party library that we may have to work around

Comments

@kingyue737
Copy link
Contributor

Environment

Vuetify Version: 3.5.17
Last working version: 3.5.17
Vue Version: 3.4.22
Browsers: Edge 124.0.0.0
OS: Windows 10

Steps to reproduce

Mount dialog in a vitest unit testing

Expected Behavior

No warning

Actual Behavior

stderr | src/tests/MyComponent.test.js > displays message
[Vue warn]: Wrong type passed as event handler to onAfterEnter - did you forget @ or : in front of your prop?
Expected function or array of functions, received type string. 
  at <Transition name="dialog-transition" appear=true persisted=true  ... > 
  at <VDialogTransition appear=true persisted=true target=undefined  ... > 
  at <MaybeTransition appear=true persisted=true transition= {
  component: {
    name: 'VDialogTransition',
    props: { target: [Object], _as: [Function: String] },
    setup: [Function: setup],
    _setup: [Function: setup],
    filterProps: [Function: filterProps]
  }
}  ... > 
  at <VOverlay ref=Ref< {
  _disableGlobalStack: [Getter/Setter],
  absolute: [Getter/Setter],
  attach: [Getter/Setter],
  closeOnBack: [Getter/Setter],
  contained: [Getter/Setter],
  contentClass: [Getter/Setter],
  contentProps: [Getter/Setter],
  disabled: [Getter/Setter],
  opacity: [Getter/Setter],
  noClickAnimation: [Getter/Setter],
  modelValue: [Getter/Setter],
  persistent: [Getter/Setter],
  scrim: [Getter/Setter],
  zIndex: [Getter/Setter],
  target: [Getter/Setter],
  activator: [Getter/Setter],
  activatorProps: [Getter/Setter],
  openOnClick: [Getter/Setter],
  openOnHover: [Getter/Setter],
  openOnFocus: [Getter/Setter],
  closeOnContentClick: [Getter/Setter],
  closeDelay: [Getter/Setter],
  openDelay: [Getter/Setter],
  class: [Getter/Setter],
  style: [Getter/Setter],
  height: [Getter/Setter],
  maxHeight: [Getter/Setter],
  maxWidth: [Getter/Setter],
  minHeight: [Getter/Setter],
  minWidth: [Getter/Setter],
  width: [Getter/Setter],
  eager: [Getter/Setter],
  locationStrategy: [Getter/Setter],
  location: [Getter/Setter],
  origin: [Getter/Setter],
  offset: [Getter/Setter],
  scrollStrategy: [Getter/Setter],
  theme: [Getter/Setter],
  transition: [Getter/Setter],
  _as: [Getter/Setter],
  activatorEl: [Getter/Setter],
  scrimEl: [Getter/Setter],
  animateClick: [Getter/Setter],
  contentEl: [Getter/Setter],
  globalTop: [Getter/Setter],
  localTop: [Getter/Setter],
  updateLocation: [Getter/Setter],
  '$vuetify': [Getter/Setter]
} > class="v-dialog" style= {}  ... > 
  at <VDialog modelValue=true onUpdate:modelValue=fn > 
  at <MyComponent ref="VTU_COMPONENT" > 
  at <VTUROOT>
[Vue warn]: Wrong type passed as event handler to onAfterLeave - did you forget @ or : in front of your prop?
Expected function or array of functions, received type string. 
  at <Transition name="dialog-transition" appear=true persisted=true  ... > 
  at <VDialogTransition appear=true persisted=true target=undefined  ... > 
  at <MaybeTransition appear=true persisted=true transition= {
  component: {
    name: 'VDialogTransition',
    props: { target: [Object], _as: [Function: String] },
    setup: [Function: setup],
    _setup: [Function: setup],
    filterProps: [Function: filterProps]
  }
}  ... > 
  at <VOverlay ref=Ref< {
  _disableGlobalStack: [Getter/Setter],
  absolute: [Getter/Setter],
  attach: [Getter/Setter],
  closeOnBack: [Getter/Setter],
  contained: [Getter/Setter],
  contentClass: [Getter/Setter],
  contentProps: [Getter/Setter],
  disabled: [Getter/Setter],
  opacity: [Getter/Setter],
  noClickAnimation: [Getter/Setter],
  modelValue: [Getter/Setter],
  persistent: [Getter/Setter],
  scrim: [Getter/Setter],
  zIndex: [Getter/Setter],
  target: [Getter/Setter],
  activator: [Getter/Setter],
  activatorProps: [Getter/Setter],
  openOnClick: [Getter/Setter],
  openOnHover: [Getter/Setter],
  openOnFocus: [Getter/Setter],
  closeOnContentClick: [Getter/Setter],
  closeDelay: [Getter/Setter],
  openDelay: [Getter/Setter],
  class: [Getter/Setter],
  style: [Getter/Setter],
  height: [Getter/Setter],
  maxHeight: [Getter/Setter],
  maxWidth: [Getter/Setter],
  minHeight: [Getter/Setter],
  minWidth: [Getter/Setter],
  width: [Getter/Setter],
  eager: [Getter/Setter],
  locationStrategy: [Getter/Setter],
  location: [Getter/Setter],
  origin: [Getter/Setter],
  offset: [Getter/Setter],
  scrollStrategy: [Getter/Setter],
  theme: [Getter/Setter],
  transition: [Getter/Setter],
  _as: [Getter/Setter],
  activatorEl: [Getter/Setter],
  scrimEl: [Getter/Setter],
  animateClick: [Getter/Setter],
  contentEl: [Getter/Setter],
  globalTop: [Getter/Setter],
  localTop: [Getter/Setter],
  updateLocation: [Getter/Setter],
  '$vuetify': [Getter/Setter]
} > class="v-dialog" style= {}  ... > 
  at <VDialog modelValue=true onUpdate:modelValue=fn > 
  at <MyComponent ref="VTU_COMPONENT" > 
  at <VTUROOT>

Reproduction Link

https://stackblitz.com/edit/node-mbqjrp

Other comments

No warning with vue < v3.4.22. Not sure whether a bug of vue or vuetify

@KaelWD
Copy link
Member

KaelWD commented Apr 26, 2024

vuejs/test-utils#2411

@KaelWD KaelWD closed this as not planned Won't fix, can't repro, duplicate, stale Apr 26, 2024
@KaelWD KaelWD added the upstream Problem with a third party library that we may have to work around label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: triage upstream Problem with a third party library that we may have to work around
Projects
None yet
Development

No branches or pull requests

2 participants