From c3dfaf04051f2fe07d65ced8fcbbaf35377bc2c2 Mon Sep 17 00:00:00 2001 From: Camille Moinier Date: Thu, 6 Jun 2024 17:37:37 +0200 Subject: [PATCH] feat: try without request like in gn-ui --- apps/datahub-e2e/src/e2e/search.cy.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/apps/datahub-e2e/src/e2e/search.cy.ts b/apps/datahub-e2e/src/e2e/search.cy.ts index 484bb96..c370d0c 100644 --- a/apps/datahub-e2e/src/e2e/search.cy.ts +++ b/apps/datahub-e2e/src/e2e/search.cy.ts @@ -92,15 +92,11 @@ describe('search', () => { cy.login() cy.clearFavorites() cy.visit('/search') - cy.intercept('PUT', '**/geonetwork/srv/api/userselections/**').as( - 'addFavoriteRequest' - ) cy.get('mel-datahub-results-card-search') .eq(1) .find('mel-datahub-heart-toggle') .first() .click() - cy.wait('@addFavoriteRequest').its('response.statusCode').should('eq', 201) cy.get('mel-datahub-results-card-favorite').as('favoriteCard') }) @@ -111,9 +107,7 @@ describe('search', () => { .should('have.text', ' Jeux de données suivis ') }) it('should display record results in favorite cards inside a carousel', () => { - cy.get('mel-datahub-custom-carousel') - .find('mel-datahub-results-card-favorite') - .first() + cy.get('@favoriteCard') .find('h1') .should( 'have.text', @@ -132,9 +126,6 @@ describe('search', () => { }) describe('interactions with dataset', () => { - beforeEach(() => { - cy.get('mel-datahub-results-card-favorite').first().as('firstResult') - }) it('should open the dataset page in the same application on click', () => { cy.get('@firstResult').find('h1').click() cy.url().should('include', 'dataset')