cortexjs.io
cortexjs.io copied to clipboard
Aria-label missing for Cypress tests
Good day @arnog - I hope you are well. I have been using this library for a while now and have no complaints, it has really been outstanding, thank you. I want to find out if the aria-label ([aria-label="math input field"]) has been removed from the math-field, as I use this for Cypress tests, and it can no longer find it anymore. Is there an alternative solution I can try if it has been removed? I am currently using the aria label to find the 'input' field and 'paste' latex mathematics in it to test some of my personal work.
Glad to hear you're enjoying the proeect.
The aria-label
has been transitioned to an "element internals" attribute, so, it's visible by screen readers, but may not appear in the regular DOM.
Any reason why you couldn't use the tagName
property, which should be "MATH-FIELD"
? In Cypress, I believe you could use cy.get('math-field')
.
Hi @arnog - Thanx for the fast reply - I can get it like that, but when I use the type API from Cypress, some of the LaTeX commands do not work properly- it keeps replacing the curly left brace with the command for it instead of it being part of the latex command being executed - for example, if I type \text{ - it converts this to \text\left\lbrace\right} as input? Is there perhaps a workaround or something I need to do to stop that from happening? I am also trying to type in formulas that make use of \frac and when a power has more than one therm to include the ^{term goes here} the same thing happens and the math looks horrible :-(
Then when you press enter you get this: