Skip to content

Commit

Permalink
Add further creation waits to notebooks tests (#1270)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
Swiddis authored May 6, 2024
1 parent a2034d4 commit 8014ae0
Showing 1 changed file with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
BASE_PATH,
delayTime,
MARKDOWN_TEXT,
OBSERVABILITY_INDEX_NAME,
} from '../../../utils/constants';

import { skipOn } from '@cypress/skip-test';
Expand All @@ -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)
Expand Down

0 comments on commit 8014ae0

Please sign in to comment.