Skip to content
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 snapshots and cypress #1367

Merged
merged 7 commits into from
Jan 19, 2024

Conversation

ps48
Copy link
Member

@ps48 ps48 commented Jan 17, 2024

Description

Update notebooks snapshots and cypress

Issues Resolved

#1338

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

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.

@ps48
Copy link
Member Author

ps48 commented Jan 18, 2024

Notebooks CI is fixed as seen here: https://github.com/ps48/dashboards-observability/actions/runs/7566656455/job/20604374203

The current CI failure are due to commits added in the main last PR and some upstream changes will create a separate PR to fix the CI changes.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does FTR also need these changes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the data-test-subjare re-used for FTR linked in there PR 1001 there.

ps48 added 7 commits January 18, 2024 20:07
Signed-off-by: Shenoy Pratik <[email protected]>
Signed-off-by: Shenoy Pratik <[email protected]>
Signed-off-by: Shenoy Pratik <[email protected]>
Signed-off-by: Shenoy Pratik <[email protected]>
Signed-off-by: Shenoy Pratik <[email protected]>
Signed-off-by: Shenoy Pratik <[email protected]>
@ps48 ps48 force-pushed the notebooks_cypress_updates branch from ee01fa4 to fafa8db Compare January 19, 2024 04:07
Copy link

codecov bot commented Jan 19, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (16ce008) 53.86% compared to head (fafa8db) 53.86%.

Files Patch % Lines
...oks/components/paragraph_components/paragraphs.tsx 50.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1367   +/-   ##
=======================================
  Coverage   53.86%   53.86%           
=======================================
  Files         316      316           
  Lines       11309    11309           
  Branches     2955     2955           
=======================================
  Hits         6092     6092           
  Misses       5169     5169           
  Partials       48       48           
Flag Coverage Δ
dashboards-observability 53.86% <77.77%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -31,10 +25,18 @@ const moveToPanelHome = () => {
cy.visit(`${Cypress.env('opensearchDashboards')}/app/observability-dashboards#/`);
};

const moveToNotebookHome = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moveToNotebookHome seems identical to moveToTestNotebook without the timeout, are they both necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moveToNotebookHome -> Loads notebooks home page
moveToTestNotebook -> Loads the test notebook
Both are intended for different types of page loads.

before(() => {
moveToNotebookHome();
cy.get('a[data-test-subj="createNotebookPrimaryBtn"]').click();
cy.get('input[data-test-subj="custom-input-modal-input"]').focus().type(TEST_NOTEBOOK);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the cypress documentation it says "It is unsafe to chain further commands that rely on the subject after .focus()" https://docs.cypress.io/api/commands/focus
It may not cause any issues but its worth keeping an eye on.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense, this wasn't flaky when I tested it out on local with 20 runs. Without focus being called the type wouldn't work as expected. Will leave this one as is, let me know if you think this should be updated before merging in the PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it doesn't need to be updated if it isn't causing issues, but it's definitely something to look at if further issues crop up.

@paulstn paulstn self-requested a review January 19, 2024 18:56
@ps48 ps48 merged commit 8f1f83a into opensearch-project:main Jan 19, 2024
14 of 20 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 19, 2024
* update notebooks cypress

Signed-off-by: Shenoy Pratik <[email protected]>

* update tests for query check

Signed-off-by: Shenoy Pratik <[email protected]>

* update ppl query check

Signed-off-by: Shenoy Pratik <[email protected]>

* fix detele notebooks, page reload issue

Signed-off-by: Shenoy Pratik <[email protected]>

* adding focus to inputs

Signed-off-by: Shenoy Pratik <[email protected]>

* move link check test at the end

Signed-off-by: Shenoy Pratik <[email protected]>

* fix focus for code input tests

Signed-off-by: Shenoy Pratik <[email protected]>

---------

Signed-off-by: Shenoy Pratik <[email protected]>
(cherry picked from commit 8f1f83a)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
paulstn pushed a commit that referenced this pull request Jan 22, 2024
* Update notebooks snapshots and cypress (#1367)

* update notebooks cypress

Signed-off-by: Shenoy Pratik <[email protected]>

* update tests for query check

Signed-off-by: Shenoy Pratik <[email protected]>

* update ppl query check

Signed-off-by: Shenoy Pratik <[email protected]>

* fix detele notebooks, page reload issue

Signed-off-by: Shenoy Pratik <[email protected]>

* adding focus to inputs

Signed-off-by: Shenoy Pratik <[email protected]>

* move link check test at the end

Signed-off-by: Shenoy Pratik <[email protected]>

* fix focus for code input tests

Signed-off-by: Shenoy Pratik <[email protected]>

---------

Signed-off-by: Shenoy Pratik <[email protected]>
(cherry picked from commit 8f1f83a)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* add wrapAll css

Signed-off-by: Shenoy Pratik <[email protected]>

---------

Signed-off-by: Shenoy Pratik <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Shenoy Pratik <[email protected]>
paulstn pushed a commit to paulstn/dashboards-observability that referenced this pull request Jan 22, 2024
* update notebooks cypress

Signed-off-by: Shenoy Pratik <[email protected]>

* update tests for query check

Signed-off-by: Shenoy Pratik <[email protected]>

* update ppl query check

Signed-off-by: Shenoy Pratik <[email protected]>

* fix detele notebooks, page reload issue

Signed-off-by: Shenoy Pratik <[email protected]>

* adding focus to inputs

Signed-off-by: Shenoy Pratik <[email protected]>

* move link check test at the end

Signed-off-by: Shenoy Pratik <[email protected]>

* fix focus for code input tests

Signed-off-by: Shenoy Pratik <[email protected]>

---------

Signed-off-by: Shenoy Pratik <[email protected]>
amsiglan pushed a commit to amsiglan/dashboards-observability that referenced this pull request Jun 7, 2024
…ject#1375)

* Update notebooks snapshots and cypress (opensearch-project#1367)

* update notebooks cypress

Signed-off-by: Shenoy Pratik <[email protected]>

* update tests for query check

Signed-off-by: Shenoy Pratik <[email protected]>

* update ppl query check

Signed-off-by: Shenoy Pratik <[email protected]>

* fix detele notebooks, page reload issue

Signed-off-by: Shenoy Pratik <[email protected]>

* adding focus to inputs

Signed-off-by: Shenoy Pratik <[email protected]>

* move link check test at the end

Signed-off-by: Shenoy Pratik <[email protected]>

* fix focus for code input tests

Signed-off-by: Shenoy Pratik <[email protected]>

---------

Signed-off-by: Shenoy Pratik <[email protected]>
(cherry picked from commit 8f1f83a)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* add wrapAll css

Signed-off-by: Shenoy Pratik <[email protected]>

---------

Signed-off-by: Shenoy Pratik <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Shenoy Pratik <[email protected]>
(cherry picked from commit 19cd16d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants