Cypress is supposed to allow regular expressions in its 'contains' function, but it is finding no match, whereas there are a lot of elements containing the search text. I have to put in the full name to allow it to find it - but I want to get all the elements with names starting with 'Tier2_Forest' not just one.
For instance, this works:
cy.get('#database-col')
.find('div.el-row div.card header.card-header p.card-header-title')
.contains('Tier2_Forest : Tier2_Forest_ManEvents')
.as('dbCard');
But this doesn't:
cy.get('#database-col')
.find('div.el-row div.card header.card-header p.card-header-title')
.contains('Tier2_Forest')
.as('dbCard');
Have also unsuccessfully tried it in the format recommended by Cypress for regex - i.e. line starts with that phrase:
contains(/^Tier2_Forest/)
For some reason when I use contains('.db') it returns a list of elements containing '.db' at the end of their names - but I don't want those...
Snippet of the generated DOM:
[
]