diff --git a/client/cypress/support/commands.js b/client/cypress/support/commands.js index 66ea16ef..80348c92 100644 --- a/client/cypress/support/commands.js +++ b/client/cypress/support/commands.js @@ -22,4 +22,10 @@ // // // -- This will overwrite an existing command -- -// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) \ No newline at end of file +// 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) +}) \ No newline at end of file