From f9367662f838d73e1c957e04af9a75f0affd034b Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Mon, 2 Sep 2024 20:21:30 -0700 Subject: [PATCH] Fix intercept logic for createDashboard (#1522) Signed-off-by: Simeon Widdis --- .../plugins/observability-dashboards/4_panels.spec.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cypress/integration/plugins/observability-dashboards/4_panels.spec.js b/cypress/integration/plugins/observability-dashboards/4_panels.spec.js index 2c03c7df1..4b63d5e54 100644 --- a/cypress/integration/plugins/observability-dashboards/4_panels.spec.js +++ b/cypress/integration/plugins/observability-dashboards/4_panels.spec.js @@ -30,11 +30,13 @@ describe('Testing panels table', () => { cy.get('input.euiFieldText').focus().type(TEST_PANEL, { delay: 50, }); + cy.intercept('POST', `${BASE_PATH}/api/saved_objects/*`).as( + 'createDashboard' + ); cy.get('.euiButton__text') .contains(/^Create$/) .trigger('mouseover') .click(); - cy.intercept('POST', '/api/saved_objects/*').as('createDashboard'); cy.wait('@createDashboard'); cy.contains(TEST_PANEL).should('exist');