vexflow icon indicating copy to clipboard operation
vexflow copied to clipboard

How to test for notes/elements?

Open nathan-kerr opened this issue 1 year ago • 1 comments

I want to write tests for my app, but I'm not sure how to verify things.

For example, I want to write an E2E test (using Cypress) to verify that my app is producing staves with the correct clef/notes.

Browser inspection reveals the vf-stavenote element, but I don't see a way to test its pitch value so I know I haven't drawn a 'c4' when I expected something else. Same for clef and other elements.

I've considered visual regression testing, but this isn't always a good solution. For example, a random generator with a wide range of acceptable notes/elements would be troublesome.

Please advise!

nathan-kerr avatar Sep 23 '24 22:09 nathan-kerr