Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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]: userEvent.click(elem) injects ["_constructor-name_"] into element object #24968

Closed
ak99372 opened this issue Nov 24, 2023 · 0 comments
Closed

Comments

@ak99372
Copy link

ak99372 commented Nov 24, 2023

Describe the bug

Calling userEvent.click(inputElement) causes inputElement object (and related objects) being injected with and _constructor-name_ property.

image

including parentElement and related objects

image

This breaks and messes our code that relies on certain properties and object structure (like NodeList).
Is there any way to disable this type of injection?

To Reproduce

const { canvasElement } = context;
const input = canvasElement.querySelector('input');
await userEvent.click(input); 

System

System:
    OS: Windows 11 10.0.22000
    CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor
  Binaries:
    Node: 18.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
    npm: 9.5.1 - C:\Program Files\nodejs\npm.CMD
    pnpm: 7.32.5 - C:\Program Files\nodejs\pnpm.CMD <----- active
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (119.0.2151.72)
  npmPackages:
    @storybook/addon-actions: 7.5.3 => 7.5.3
    @storybook/addon-essentials: 7.5.3 => 7.5.3
    @storybook/addon-interactions: 7.5.3 => 7.5.3
    @storybook/addon-links: 7.5.3 => 7.5.3
    @storybook/blocks: 7.5.3 => 7.5.3
    @storybook/html: 7.5.3 => 7.5.3
    @storybook/html-webpack5: 7.5.3 => 7.5.3
    @storybook/instrumenter: ^7.5.3 => 7.5.3
    @storybook/manager-api: 7.5.3 => 7.5.3
    @storybook/testing-library: 0.2.2 => 0.2.2
    @storybook/theming: 7.5.3 => 7.5.3
    storybook: 7.5.3 => 7.5.3
  npmGlobalPackages:
    storybook: 7.5.3

Additional context

No response

@storybookjs storybookjs locked and limited conversation to collaborators Dec 28, 2023
@vanessayuenn vanessayuenn converted this issue into discussion #25354 Dec 28, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
Archived in project
Development

No branches or pull requests

1 participant