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

Fix functional tests for legacy discover plugin #4687

Conversation

abbyhu2000
Copy link
Member

Description

Make sure all the original functional tests pass for the legacy discover plugin.

Issues Resolved

#4653

Screenshot

Testing the changes

Check List

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

@codecov
Copy link

codecov bot commented Aug 5, 2023

Codecov Report

Merging #4687 (6482540) into feature/data-explorer (521f306) will decrease coverage by 0.19%.
Report is 3 commits behind head on feature/data-explorer.
The diff coverage is 57.58%.

@@                    Coverage Diff                    @@
##           feature/data-explorer    #4687      +/-   ##
=========================================================
- Coverage                  66.50%   66.32%   -0.19%     
=========================================================
  Files                       3289     3380      +91     
  Lines                      62821    64661    +1840     
  Branches                    9788    10303     +515     
=========================================================
+ Hits                       41782    42888    +1106     
- Misses                     18658    19241     +583     
- Partials                    2381     2532     +151     
Flag Coverage Δ
Linux_1 34.83% <8.96%> (?)
Linux_2 55.04% <84.33%> (?)
Linux_3 43.93% <43.13%> (?)
Linux_4 35.10% <14.56%> (?)
Windows ?
Windows_1 34.84% <8.96%> (?)
Windows_2 55.01% <84.33%> (?)
Windows_3 43.93% <43.13%> (?)
Windows_4 35.10% <14.56%> (?)

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

Files Changed Coverage Δ
packages/osd-babel-preset/node_preset.js 100.00% <ø> (ø)
...osd-opensearch-archiver/src/lib/docs/test_stubs.ts 68.75% <ø> (ø)
...ch-archiver/src/lib/indices/create_index_stream.ts 69.76% <ø> (ø)
...ch-archiver/src/lib/indices/delete_index_stream.ts 50.00% <ø> (ø)
...ver/src/lib/indices/opensearch_dashboards_index.ts 0.00% <0.00%> (ø)
packages/osd-ui-shared-deps/theme.ts 41.66% <0.00%> (ø)
src/core/server/legacy/legacy_service.ts 75.38% <ø> (ø)
src/core/server/plugins/plugin_context.ts 45.45% <ø> (ø)
src/core/server/rendering/views/template.tsx 100.00% <ø> (ø)
...server/saved_objects/saved_objects_service.mock.ts 100.00% <ø> (ø)
... and 70 more

... and 215 files with indirect coverage changes

@abbyhu2000
Copy link
Member Author

Failure in cigroup1 related to this bug: #4703
Failure in dashboard_state in cigroup4 related to this bug: #4698. The failed three tests have been skipped so it won't affect subsequent test outcome.

@abbyhu2000 abbyhu2000 marked this pull request as ready for review August 9, 2023 04:58
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
@abbyhu2000 abbyhu2000 force-pushed the fix-discover-legacy-functional-tests branch from 5568f6c to e6c906e Compare August 10, 2023 05:01
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
Copy link
Member

@ashwin-pc ashwin-pc left a comment

Choose a reason for hiding this comment

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

Great job fixing these!

@@ -88,6 +95,8 @@ export default function ({ getService, getPageObjects }) {
expect(colorChoiceRetained).to.be(true);
});

// the following three tests are skipped because of save search save window bug:
Copy link
Member

Choose a reason for hiding this comment

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

I see the comment but not the skip. Did you leave this in here accidentally?

Comment on lines +138 to +140
// Have to add steps to actually click on the dashboard; since added browser.refresh() will make
// clickDashboard() to only land on the dashboard listing page
// We need to add browser.refresh() so clickDiscover() lands correctly on the legacy discover page
Copy link
Member

Choose a reason for hiding this comment

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

Not for right now but when we remove Legacy discover in 2.11, is it easy enough to migrate these to Discover 2.0?

@ashwin-pc ashwin-pc merged commit 8ee9c91 into opensearch-project:feature/data-explorer Aug 16, 2023
46 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data explorer Issues related to the Data Explorer project de-angular de-angularize work distinguished-contributor
Projects
Development

Successfully merging this pull request may close these issues.

2 participants