From 181c03959b07d86e74525de91e629364663f8ce8 Mon Sep 17 00:00:00 2001 From: Jeffrey Dowdle Date: Thu, 14 Nov 2024 11:13:58 +1100 Subject: [PATCH] test(@dpc-sdp/ripple-tide-search): fix falky maps test --- examples/nuxt-app/test/features/maps/vsba.feature | 1 + packages/ripple-test-utils/step_definitions/common/mocks.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/examples/nuxt-app/test/features/maps/vsba.feature b/examples/nuxt-app/test/features/maps/vsba.feature index dca4fe3270..55ffbd6d03 100644 --- a/examples/nuxt-app/test/features/maps/vsba.feature +++ b/examples/nuxt-app/test/features/maps/vsba.feature @@ -87,6 +87,7 @@ Feature: School buildings map Scenario: Click on cluster should zoom in Given the "/api/tide/elasticsearch/elasticsearch_index_develop_node/_search" network request is stubbed with fixture "/map-table/vsba/response-all" and status 200 as alias "searchReq" And I visit the page "/map" + And we wait for alias "searchReq" And the map is loaded When I click the map component at coordinates 650 429 When I wait 2 seconds diff --git a/packages/ripple-test-utils/step_definitions/common/mocks.ts b/packages/ripple-test-utils/step_definitions/common/mocks.ts index dc60b3a77a..4cea9d7b77 100644 --- a/packages/ripple-test-utils/step_definitions/common/mocks.ts +++ b/packages/ripple-test-utils/step_definitions/common/mocks.ts @@ -210,6 +210,10 @@ Given( } ) +Given('we wait for alias {string}', (alias: string) => { + cy.wait(`@${alias}`) +}) + Given( 'the {string} network request is delayed by {int} milliseconds and stubbed with fixture {string}, status {int} and alias {string}', (