mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Add support for cy.get("&id") (translates to [cy-id="id"])
This commit is contained in:
parent
6236f53b4f
commit
ec83eb0a27
@ -22,4 +22,10 @@
|
||||
//
|
||||
//
|
||||
// -- This will overwrite an existing command --
|
||||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
||||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
||||
Cypress.Commands.overwriteQuery('get', function (originalFn, ...args) {
|
||||
if (args.length > 0 && typeof args[0] === 'string' && args[0].startsWith('&')) {
|
||||
args[0] = `[cy-id="${args[0].substring(1)}"]`
|
||||
}
|
||||
return originalFn.apply(this, args)
|
||||
})
|
Loading…
Reference in New Issue
Block a user