3

I'm using mxGraph library in React App. I need to create unit tests for components that draw graph. I'm using jest and react testing library. But this library cannot render out mxGraph's elements. Maybe because, while testing it cannot define screen resolution, and render out properly.

Is it possible to test mxGraph drawings or is there any examples or practices with it?

Abdulbosid
  • 354
  • 1
  • 2
  • 12

1 Answers1

2

I don't think RTL is the best tool for this kind of testing. It does not compute any graphical value like height and width of the elements or their positions. I would suggest you use something like Cypress for this kind of tests

Gio Polvara
  • 23,416
  • 10
  • 66
  • 62