-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update notebooks tests #1001
Update notebooks tests #1001
Conversation
Signed-off-by: Shenoy Pratik <[email protected]>
Signed-off-by: Shenoy Pratik <[email protected]>
Local run results6_notebooks.spec.js.mp4
|
@Hailong-am, @wanglam Can you please review this PR? The dependent PR in dashboards-observability is merged in. |
const moveToTestNotebook = () => { | ||
cy.visit(`${BASE_PATH}/app/observability-notebooks#/`, { | ||
timeout: delayTime * 3, | ||
}); | ||
|
||
// Reload page to load notebooks if they are not flushed in OpenSearch index yet. | ||
cy.reload(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we check if they are already flushed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or should we force flush the index before load?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good suggestion, will look further on how to use the flush API here. The current issue is when page loads and the Flush is in process, browser loads an empty notebooks home page. I'll check if there's a way for force flush via cypress requests. Not sure, if there's a way to check if the flush process is complete as it is auto triggered for the observability index.
|
||
describe('clean up all test data', () => { | ||
it('Cleans up test notebooks', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Shall we record the created notebook ids and just clear these items?
const moveToTestNotebook = () => { | ||
cy.visit(`${BASE_PATH}/app/observability-notebooks#/`, { | ||
timeout: delayTime * 3, | ||
}); | ||
|
||
// Reload page to load notebooks if they are not flushed in OpenSearch index yet. | ||
cy.reload(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or should we force flush the index before load?
@ps48 Added |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-1001-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a1d3ca1ecef3e25777dbb850793db72d506f22f6
# Push it to GitHub
git push --set-upstream origin backport/backport-1001-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x Then, create a pull request where the |
@ps48 The backport to |
Description
Update notebooks tests, this PR depends on notebooks updates to be merged by this PR: opensearch-project/dashboards-observability#1367
Issues Resolved
#897
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.