From 7f1709ded666ef72fee2b5ef546a22be268cf807 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 09:55:59 +0800 Subject: [PATCH] Add further creation waits to notebooks tests (#1270) (#1275) * Replace refresh with wait for creation Signed-off-by: Simeon Widdis * Remove unused variable Signed-off-by: Simeon Widdis * Re-add refresh/reload with issue ref Signed-off-by: Simeon Widdis * Revert "Re-add refresh/reload with issue ref" This reverts commit 6dca5a7ed773b0ba57f0b12f14ee78c80682c87c. Signed-off-by: Simeon Widdis --------- Signed-off-by: Simeon Widdis (cherry picked from commit 8014ae0c3b57adc3193bd00fb2cbc9999aa78915) Co-authored-by: Simeon Widdis --- .../6_notebooks.spec.js | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/cypress/integration/plugins/observability-dashboards/6_notebooks.spec.js b/cypress/integration/plugins/observability-dashboards/6_notebooks.spec.js index 005b219b9..c4f0bd896 100644 --- a/cypress/integration/plugins/observability-dashboards/6_notebooks.spec.js +++ b/cypress/integration/plugins/observability-dashboards/6_notebooks.spec.js @@ -10,7 +10,6 @@ import { BASE_PATH, delayTime, MARKDOWN_TEXT, - OBSERVABILITY_INDEX_NAME, } from '../../../utils/constants'; import { skipOn } from '@cypress/skip-test'; @@ -33,22 +32,7 @@ const makeTestNotebook = () => { cy.get('input[data-test-subj="custom-input-modal-input"]').type(notebookName); cy.get('button[data-test-subj="custom-input-modal-confirm-button"]').click(); - // Force refresh the observablity index and reload page to load notebooks. - cy.request({ - method: 'POST', - failOnStatusCode: false, - form: false, - url: 'api/console/proxy', - headers: { - 'content-type': 'application/json;charset=UTF-8', - 'osd-xsrf': true, - }, - qs: { - path: `${OBSERVABILITY_INDEX_NAME}/_refresh`, - method: 'POST', - }, - }); - cy.reload(); + cy.contains(`Notebook "${notebookName}" successfully created`); cy.get('h1[data-test-subj="notebookTitle"]') .contains(notebookName)