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

Testing creation of edge connections in v12 beta #3948

Closed
vonazt opened this issue Feb 26, 2024 · 1 comment
Closed

Testing creation of edge connections in v12 beta #3948

vonazt opened this issue Feb 26, 2024 · 1 comment

Comments

@vonazt
Copy link

vonazt commented Feb 26, 2024

Describe the Bug

When using react-testing-library in v11, we were able to test the creation of edge connections between nodes using this code:

       await waitFor(() => {
          fireEvent.click(sourceHandle);
          fireEvent.click(targetHandle);
        });

When we try this in v12, we get TypeError: s.elementFromPoint is not a function when trying to click on the target handle. Has there been some change in how edge connections are created when clicking on handles?

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Create one node with a source handle and another with a target handle
  2. Assign each a data-testid
  3. Using react-testing-library, get the sourceHandle and the targetHandle, e.g. const sourceHandle = screen.getByTestId('<some-data-testid');
  4. Click on the sourceHandle and then the targetHandle, e,g:
await waitFor(() =>
  fireEvent.click(sourceHandle);
  fireEvent.click()
});

Expected behavior

As a user, I expected for an edge connection to be created and for the test to pass.

Screenshots or Videos

Screenshot 2024-02-26 at 15 06 49

Platform

  • OS: [macOS]
  • Browser: [Chrome]
  • Testing library: @testing-library/react v14.1.2
  • Version: [12.0.0-next.9]

Additional context

No response

@vonazt vonazt closed this as completed Feb 27, 2024
@moklick
Copy link
Member

moklick commented Feb 27, 2024

how could you solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants