Skip to content

Commit 925398d

Browse files
Swiddisgithub-actions[bot]
authored andcommitted
Add further creation waits to notebooks tests (#1270)
* Replace refresh with wait for creation Signed-off-by: Simeon Widdis <sawiddis@amazon.com> * Remove unused variable Signed-off-by: Simeon Widdis <sawiddis@amazon.com> * Re-add refresh/reload with issue ref Signed-off-by: Simeon Widdis <sawiddis@amazon.com> * Revert "Re-add refresh/reload with issue ref" This reverts commit 6dca5a7. Signed-off-by: Simeon Widdis <sawiddis@amazon.com> --------- Signed-off-by: Simeon Widdis <sawiddis@amazon.com> (cherry picked from commit 8014ae0)
1 parent 8b10f8f commit 925398d

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

cypress/integration/plugins/observability-dashboards/6_notebooks.spec.js

+1-17
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
BASE_PATH,
1111
delayTime,
1212
MARKDOWN_TEXT,
13-
OBSERVABILITY_INDEX_NAME,
1413
} from '../../../utils/constants';
1514

1615
import { skipOn } from '@cypress/skip-test';
@@ -33,22 +32,7 @@ const makeTestNotebook = () => {
3332
cy.get('input[data-test-subj="custom-input-modal-input"]').type(notebookName);
3433
cy.get('button[data-test-subj="custom-input-modal-confirm-button"]').click();
3534

36-
// Force refresh the observablity index and reload page to load notebooks.
37-
cy.request({
38-
method: 'POST',
39-
failOnStatusCode: false,
40-
form: false,
41-
url: 'api/console/proxy',
42-
headers: {
43-
'content-type': 'application/json;charset=UTF-8',
44-
'osd-xsrf': true,
45-
},
46-
qs: {
47-
path: `${OBSERVABILITY_INDEX_NAME}/_refresh`,
48-
method: 'POST',
49-
},
50-
});
51-
cy.reload();
35+
cy.contains(`Notebook "${notebookName}" successfully created`);
5236

5337
cy.get('h1[data-test-subj="notebookTitle"]')
5438
.contains(notebookName)

0 commit comments

Comments
 (0)