Open binghao-guan opened 1 month ago
Hi @binghao-guan, using a ref as a prop is not supported inside test files, which might be causing the issue. Could you also try using the JSX syntax?: await component.update(<SelectBasic modelValue="选项4" />)
. If that doesn't work, you might need to use a wrapper/story component. For more details, see https://playwright.dev/docs/test-components#test-stories.
The following things could be improvement here:
component.update
only accepts a JSX element.Hi@sand4rt, thanks for reply. I'm try do not using ref, It's not work. Then i use JSX Syntax: await component.update(<SelectBasic modelValue="选项4" />)
,it's work.
Glad it works now!
@mxschmitt what do you think of the suggested improvements above?
Version
1.45.3
Steps to reproduce
Expected behavior
when i use jsx, update function update props, component should be rerender;
Actual behavior
component not rerender
Additional context
No response
Environment