I would like to get this element in cypress tests but using only part of string without 'undefined'. How can I do that?
<line-chart-undefined tabindex="0"></line-chart-undefined>
It can be easily done with XPath.
npm i -D cypress-xpath
cypress/support/index.js require('cypress-xpath')
cy object will have xpath command cy.xpath("//*[starts-with(name(), 'line-chart-')]")
It'll find the element that matches the line-chart- tag