diff --git a/tools/e2e/commands.ts b/tools/e2e/commands.ts index 2e29d3b5d6..7e3b1a9291 100644 --- a/tools/e2e/commands.ts +++ b/tools/e2e/commands.ts @@ -1,3 +1,4 @@ +/* eslint-disable cypress/no-unnecessary-waiting */ // *********************************************** // This example commands.js shows you how to // create various custom commands and overwrite @@ -61,10 +62,10 @@ Cypress.Commands.add('clearFavorites', () => { cy.request({ url: '/geonetwork/srv/api/me', headers: { accept: 'application/json' }, - }) - .its('body') - .its('id') - .as('myId') + }).as('request') + + cy.wait(3000) + cy.get('@request').its('body').its('id').as('myId') cy.window().then(function () { cy.request({