News for hackers. Stuff that matters.
Re:Cypress: Fast, easy, and reliable testing for anything th... by Mavvie on Friday December 11, 2020 @12:04AM (#25382500)
What made it hard to reuse code? You can just import/export stuff like normal, unless you mean it was hard to find any logic that could be usefully extracted into a helper?
Re:Cypress: Fast, easy, and reliable testing for anything th... by BurningFrog on Friday December 11, 2020 @12:40AM (#25382706)
We have a lot of data in UI tables, so I wanted to write code that extracted the cell values to a ROWSxCOLUMNS matrix, that I could reuse in each test.

And... I just couldn't figure out a way!

Re:Cypress: Fast, easy, and reliable testing for anything th... by wilsonrocks on Friday December 11, 2020 @01:14AM (#25382882)
Did you try custom commands? I have some for more basic stuff like 'get data-value attribute for the element with data-name attribute of x' which I can use in any test.

That said, I find checking for specific values in the page against other page values to be really difficult so if you're doing that with the table... good luck!

Re:Cypress: Fast, easy, and reliable testing for anything th... by 867-5309 on Friday December 11, 2020 @01:00AM (#25382798)
if that functionality isn't already present in the UI, e.g. by selecting a filter or exporting, then perhaps it belongs in the domain of a scraper rather than a testing tool