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

[2.x Manual Backport] Backport cypress related work to 2.x and 2 missing backports #9261

Merged
merged 26 commits into from
Jan 23, 2025

Conversation

ananzh
Copy link
Member

@ananzh ananzh commented Jan 23, 2025

Description

Backport PRs and Order

Changelog

  • skip

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

ashwin-pc and others added 25 commits January 23, 2025 15:01
…#8799)

* [Discover] Makes caching dataset options optional.

* Adds unit test

* Changeset file for PR opensearch-project#8799 created/updated

* Update test

Signed-off-by: Kawika Avilla <[email protected]>

---------

Signed-off-by: Kawika Avilla <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: Kawika Avilla <[email protected]>
* Update Cypress to v12 (opensearch-project#8926)

* Update cypress to v12

Signed-off-by: Daniel Rowe <[email protected]>

* Add required e2e.js

Signed-off-by: Daniel Rowe <[email protected]>

* Changeset file for PR opensearch-project#8926 created/updated

* Update license header

Signed-off-by: Daniel Rowe <[email protected]>

* Update license in e2e.js

Signed-off-by: Daniel Rowe <[email protected]>

---------

Signed-off-by: Daniel Rowe <[email protected]>
Signed-off-by: Daniel Rowe <[email protected]>
Co-authored-by: Daniel Rowe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>

* fix: support imports without extensions in cypress webpack build (opensearch-project#8993)

* fix: support imports without extensions in cypress webpack build

Signed-off-by: Daniel Rowe <[email protected]>

* Changeset file for PR opensearch-project#8993 created/updated

* use typescript config

Signed-off-by: Daniel Rowe <[email protected]>

* fix lint

Signed-off-by: Daniel Rowe <[email protected]>

* disable new test isolation feature

This isolation was causing regressions

Signed-off-by: Daniel Rowe <[email protected]>

---------

Signed-off-by: Daniel Rowe <[email protected]>
Signed-off-by: Daniel Rowe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>

---------

Signed-off-by: Daniel Rowe <[email protected]>
Signed-off-by: Daniel Rowe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…earch-project#9027)

* Update Cypress to v12 (opensearch-project#8926)

* Update cypress to v12

Signed-off-by: Daniel Rowe <[email protected]>

* Add required e2e.js

Signed-off-by: Daniel Rowe <[email protected]>

* Changeset file for PR opensearch-project#8926 created/updated

* Update license header

Signed-off-by: Daniel Rowe <[email protected]>

* Update license in e2e.js

Signed-off-by: Daniel Rowe <[email protected]>

---------

Signed-off-by: Daniel Rowe <[email protected]>
Signed-off-by: Daniel Rowe <[email protected]>
Co-authored-by: Daniel Rowe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>

* fix: support imports without extensions in cypress webpack build (opensearch-project#8993)

* fix: support imports without extensions in cypress webpack build

Signed-off-by: Daniel Rowe <[email protected]>

* Changeset file for PR opensearch-project#8993 created/updated

* use typescript config

Signed-off-by: Daniel Rowe <[email protected]>

* fix lint

Signed-off-by: Daniel Rowe <[email protected]>

* disable new test isolation feature

This isolation was causing regressions

Signed-off-by: Daniel Rowe <[email protected]>

---------

Signed-off-by: Daniel Rowe <[email protected]>
Signed-off-by: Daniel Rowe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>

* Add data-test-subj tags.

Signed-off-by: Argus Li <[email protected]>

---------

Signed-off-by: Daniel Rowe <[email protected]>
Signed-off-by: Daniel Rowe <[email protected]>
Signed-off-by: Argus Li <[email protected]>
Co-authored-by: Daniel Rowe <[email protected]>
Co-authored-by: Daniel Rowe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…rch-project#9048)

* migrate query enhacenement tests

Signed-off-by: abbyhu2000 <[email protected]>

* ignore lint in data files

Signed-off-by: abbyhu2000 <[email protected]>

* remove yarn lock changes

Signed-off-by: abbyhu2000 <[email protected]>

* add changelog

Signed-off-by: abbyhu2000 <[email protected]>

---------

Signed-off-by: abbyhu2000 <[email protected]>
…ct#9049)

* Add data-test-subj for discover
Signed-off-by: Anan Zhuang <[email protected]>
* fix comment
Signed-off-by: Anan Zhuang <[email protected]>

---------

Signed-off-by: Anan Zhuang <[email protected]>
)

* Add missing data-test-subj tags for data plugin
* Update Snapshots
* Fix as per the comments

---------

Signed-off-by: Suchit Sahoo <[email protected]>
Co-authored-by: Anan Zhuang <[email protected]>
…pensearch-project#9060)

* Follow up on opensearch-project#9048 by updating data and utilities

Feature branch PRs:
opensearch-project#9038
opensearch-project#9006

Signed-off-by: Anan <[email protected]>

* fix comment

Signed-off-by: Anan <[email protected]>

* update path and add utility from suchit commit

Signed-off-by: Anan <[email protected]>

* update the path to run sample test

Signed-off-by: Anan <[email protected]>

* fix PR comments

Signed-off-by: Anan <[email protected]>

* skip tests before enable workspace

Signed-off-by: Anan <[email protected]>

---------

Signed-off-by: Anan <[email protected]>
…ypings (opensearch-project#9074)

* refactor some query-enhancement utility functions, add some missing typings

Signed-off-by: Justin Kim <[email protected]>

* Changeset file for PR opensearch-project#9074 created/updated

---------

Signed-off-by: Justin Kim <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
opensearch-project#9082)

* Re-enable dataset_selector.spec.js and queries.spec.js under workspace

Signed-off-by: Anan <[email protected]>

* fix comment

Signed-off-by: Anan <[email protected]>

* add verifyHitCount for PPL

Signed-off-by: Anan <[email protected]>

* Changeset file for PR opensearch-project#9082 created/updated

---------

Signed-off-by: Anan <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…ean up (opensearch-project#9129)

* Make createWorkspaceIndexPatterns to handle no default cluster and clean up

Signed-off-by: Anan <[email protected]>

* Changeset file for PR opensearch-project#9129 created/updated

---------

Signed-off-by: Anan <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…pensearch-project#9119)

* Add test for filtering functionality for discover, which enables query enhancement
* Make test more robust: Add logic to use date picker start and end buttons if set to absolute times. Check the table length directly instead of number of hits to avoid bug where not all results load.

---------

Signed-off-by: Argus Li <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…opensearch-project#9112)

* Add tests for saved search creation and loading for query enhancement
* click on a random element before typing on query editor to bypass the popover that appears
* address pr comments - refactor to create saved search as an api call
* address pr comments - specifically navigate to discover page before setting datasource

Signed-off-by: Justin Kim <[email protected]>

---------

Signed-off-by: Justin Kim <[email protected]>
Signed-off-by: Anan Zhuang <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: Anan Zhuang <[email protected]>
…ject#9153)

* fix: 0 rendered in discover when there are no results

Signed-off-by: Daniel Rowe <[email protected]>

* Changeset file for PR opensearch-project#9153 created/updated

---------

Signed-off-by: Daniel Rowe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
* update saved search
* minor refactor4 on setDatePickerDatesAndSearchIfRelevant

Signed-off-by: Justin Kim <[email protected]>

---------

Signed-off-by: Justin Kim <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
* chore: use relative paths in cypress

when we move to running tests in parallel we won't be able to use a single
hardcoded basepath as these can differ by tasks

Signed-off-by: Daniel Rowe <[email protected]>

* Changeset file for PR opensearch-project#9079 created/updated

---------

Signed-off-by: Daniel Rowe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…d 124: View list of Saved query) (opensearch-project#9166)

* add spec for old ui

Signed-off-by: Argus Li <[email protected]>

* Add comment about cleaning up saved queries

Signed-off-by: Argus Li <[email protected]>

* Add data-test-subj for save query new ui

Signed-off-by: Argus Li <[email protected]>

* Add data-test-subj for save query button for new ui

Signed-off-by: Argus Li <[email protected]>

* Add data-test-subj for open query button in query management popover

Signed-off-by: Argus Li <[email protected]>

* Add new ui spec to test list saved queries

Signed-off-by: Argus Li <[email protected]>

* Fix DataSource url

Signed-off-by: Argus Li <[email protected]>

* Changeset file for PR opensearch-project#9166 created/updated

* Address Justin's comments.

Signed-off-by: Argus Li <[email protected]>

* Remove final force.

Signed-off-by: Argus Li <[email protected]>

* Fix final force.

Signed-off-by: Argus Li <[email protected]>

* Move utils to Suchit's suggested location, fix comments

Signed-off-by: Argus Li <[email protected]>

* Rename specs, change cypress workflow to use new save query ui, merge old ui and new ui commands

Signed-off-by: Argus Li <[email protected]>

* fix import

Signed-off-by: Argus Li <[email protected]>

---------

Signed-off-by: Argus Li <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…h test spec (opensearch-project#9200)

* wait for the page to be loaded before loading a saved search
* when loading a saved search and saving it as a new saved search, use a different name

Signed-off-by: Justin Kim <[email protected]>

---------

Signed-off-by: Justin Kim <[email protected]>
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 59.09091% with 9 lines in your changes missing coverage. Please review.

Project coverage is 61.14%. Comparing base (e2abd3a) to head (ec8750b).
Report is 1 commits behind head on 2.x.

Files with missing lines Patch % Lines
...over/public/application/components/chart/chart.tsx 0.00% 3 Missing ⚠️
...ry/query_string/dataset_service/dataset_service.ts 85.71% 0 Missing and 1 partial ⚠️
...ta/public/ui/dataset_selector/dataset_explorer.tsx 0.00% 1 Missing ⚠️
...lugins/data/public/ui/saved_query_form/helpers.tsx 0.00% 1 Missing ⚠️
...i/saved_query_management/saved_query_list_item.tsx 0.00% 1 Missing ⚠️
...failure_modal/shard_failure_description_header.tsx 0.00% 1 Missing ⚠️
...c/application/components/no_results/no_results.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##              2.x    #9261   +/-   ##
=======================================
  Coverage   61.13%   61.14%           
=======================================
  Files        3815     3815           
  Lines       91522    91528    +6     
  Branches    14454    14459    +5     
=======================================
+ Hits        55951    55963   +12     
+ Misses      32010    32003    -7     
- Partials     3561     3562    +1     
Flag Coverage Δ
Linux_1 29.13% <0.00%> (-0.01%) ⬇️
Linux_2 56.60% <ø> (ø)
Linux_3 38.06% <43.75%> (+0.01%) ⬆️
Linux_4 29.18% <33.33%> (+<0.01%) ⬆️
Windows_1 29.14% <0.00%> (-0.01%) ⬇️
Windows_2 56.55% <ø> (ø)
Windows_3 38.06% <43.75%> (+0.02%) ⬆️
Windows_4 29.18% <33.33%> (+<0.01%) ⬆️

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.

@ananzh
Copy link
Member Author

ananzh commented Jan 23, 2025

@sejli ciGroup11 still fails. could you help?

@ananzh ananzh merged commit 0916f05 into opensearch-project:2.x Jan 23, 2025
65 of 68 checks passed
@ananzh ananzh added discover_2.0-test Issues that are specific to the Discover 2.0 testing initiative v2.19.0 labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discover_2.0-test Issues that are specific to the Discover 2.0 testing initiative Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry v2.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants