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

[TESTID-125,126,127,128,129] Saved Query Test Scope #9229

Open
wants to merge 40 commits into
base: main
Choose a base branch
from

Conversation

ArgusLi
Copy link
Contributor

@ArgusLi ArgusLi commented Jan 21, 2025

Description

Adds a Cypress test suite for Saved Queries Test Scope in the Discover page.

Issues Resolved

Closes #8975, #8977, #8978, #8979, #8980.

Screenshot

saved-queries-1.mp4
saved-queries-2.mp4
saved-queries-3.mp4

Testing the changes

With OSD running, run yarn run cypress open. In E2E specs, you will see 2 new test specs saved_queries.spec.js and saved_queries_old_ui.spec.js. Run saved_queries.spec.js if data.savedQueriesNewUI.enabled: true in the OSD config, else run saved_queries_old_ui.spec.js.

Changelog

  • test: Add cypress integration test for the old and new UI view saved queries.

ArgusLi and others added 27 commits January 8, 2025 21:09
Signed-off-by: Argus Li <[email protected]>
Signed-off-by: Argus Li <[email protected]>
Signed-off-by: Argus Li <[email protected]>
Signed-off-by: Argus Li <[email protected]>
Signed-off-by: Argus Li <[email protected]>
Signed-off-by: Argus Li <[email protected]>
Signed-off-by: Argus Li <[email protected]>
Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.68%. Comparing base (c91df47) to head (d193d64).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9229   +/-   ##
=======================================
  Coverage   61.68%   61.68%           
=======================================
  Files        3816     3816           
  Lines       91693    91693           
  Branches    14516    14516           
=======================================
+ Hits        56557    56559    +2     
+ Misses      31510    31509    -1     
+ Partials     3626     3625    -1     
Flag Coverage Δ
Linux_1 29.04% <ø> (ø)
Linux_2 56.46% <ø> (ø)
Linux_3 39.09% <ø> (+<0.01%) ⬆️
Linux_4 28.97% <ø> (ø)
Windows_1 29.06% <ø> (ø)
Windows_2 56.41% <ø> (ø)
Windows_3 39.09% <ø> (ø)
Windows_4 28.97% <ø> (ø)

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 ananzh changed the title [Discover 2.0 Testing] Saved Query Test Scope [TESTID-125,126,127,128,129] Saved Query Test Scope Jan 21, 2025
@ananzh
Copy link
Member

ananzh commented Jan 21, 2025

@ArgusLi I think we could always assume that data.savedQueriesNewUI.enabled: true is enabled. So could you clean out to remove old UI test and related utility functions? Also update the CI?

@angle943
Copy link
Contributor

@ArgusLi i believe you are having a test failure related to this change: #9150

SAVE_AS_NEW_QUERY_SUFFIX,
validateSaveAsNewQueryMatchingNameHasError,
} from '../../../../../utils/apps/query_enhancements/saved_queries';

Copy link
Contributor

@angle943 angle943 Jan 24, 2025

Choose a reason for hiding this comment

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

can we rename this file to saved_queries.spec.js


// This spec assumes data.savedQueriesNewUI.enabled is true.
export const runSavedQueriesFlyoutUITests = () => {
describe('saved queries flyout UI', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

lets remove flyout UI

ananzh
ananzh previously approved these changes Jan 24, 2025
@LDrago27 LDrago27 added backport 2.x discover_2.0-test Issues that are specific to the Discover 2.0 testing initiative labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x discover_2.0-test Issues that are specific to the Discover 2.0 testing initiative repeat-contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Saved Queries] TESTID-125: Loading a Saved query with filters, time range , query
4 participants