Testing Spreadsheet in Reactjs

Posted by: 16pa1a0576 on 16 April 2021, 4:33 pm EST

  • Posted 16 April 2021, 4:33 pm EST

    I have a React component like using Spreadsheets and Worksheet. I am unit testing this component using, react-testing-library and jest, but unable to achieve that.

    Please guide me how I can do that.

    Regards,

    Venkatesh.

  • Posted 19 April 2021, 5:52 pm EST

    Hi,

    This issue needs further investigation hence we escalated this issue to the concerned team. We will update you regarding this as soon as we get any information. The internal ID for this issue will be SJS-8453.

    Regards

    Avinash

  • Posted 20 April 2021, 1:47 am EST

    Thanks for the update.

  • Posted 28 April 2021, 12:13 am EST

    Hi, Any update regarding this testing with React Testing Library?

  • Posted 28 April 2021, 11:29 am EST

    Hi,

    Please refer to the attached sample that demonstrates how you could test the spread using JEST and let us know if you face any issues.

    Regards,

    Avinash

    jest-testing-spread 2.zip

  • Posted 28 April 2021, 6:34 pm EST

    Hi,

    I have a column with button in header. I want to test onclick functionality on that button. How can i do that ?

    Regards,

    16pa1a0576.

  • Posted 29 April 2021, 7:01 pm EST

    Hi 16pa1a0576,

    We are unable to acheive the required functionality using the current public API hence we have escalated this issue to the concerned team for further investigation. We will update you as we get any information from the team, The internal ID for this issue will be SJS-8611.

    Regards,

    Avinash

  • Posted 16 May 2021, 4:48 pm EST

    Hi, any update on this?

  • Posted 17 May 2021, 4:04 pm EST

    Hi,

    The Devs are looking into it. Currently, we don’t have any information but we have asked the Devs regarding the same. We will update once we have any information.

    Regards

    Avinash

  • Posted 18 May 2021, 10:25 pm EST

    Hi,

    The Devs informed us that SpreadJS rendering in canvas, and provide enough API to get the specified cell bounds, hence, if you know how to simulate the click on any (x,y) point of the page, that will be no problem to click on the header.

    so you just need to know how to simulate a click in a canvas element with jest, which we are not sure how to do.

    Regards

    Avinash

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels