This video shows how to escape special characters like "$", "[]", and "^" when creating regular expressions to use with cy.contains command. You can escape the characters yourself or use the Lodash method Cypress._.escapeRegExp bundled with Cypress to do it for you
const suffix = '$/day'
const regex = new RegExp(Cypress._.escapeRegExp(suffix))
cy.contains(regex).should('have.id', 'rate')
Find the full recipe at https://glebbahmutov.com/cypress-exam...
En esta página del sitio puede ver el video en línea Escape Regular Expression Text When Using cy.contains Command de Duración hora minuto segunda en buena calidad , que subió el usuario gleb bahmutov 25 julio 2023, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 605 veces y le gustó 28 a los espectadores. Disfruta viendo!