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

[TEST] refactor all tests to be consistent across different source codes #9319

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

Conversation

angle943
Copy link
Contributor

@angle943 angle943 commented Feb 1, 2025

Description

Refactor all tests so that code can be consistent across different source codes.

  • Where neo and OSD differs will be dictated by Cypress.env('SOURCE_CODE')
  • I also removed unused custom commands and functions

BREAKING CHANGES:

  • SECONDARY_ENGINE.url -> PATHS.SECONDARY_ENGINE
  • Every test must use prepareTestSuite() function
  • getRandomizedDatasourceName() is removed. Use DATASOURCE_NAME instead
  • cy.deleteIndex() -> cy.osd.deleteIndex()
  • cy.addDataSource() -> cy.osd.addDataSource()
  • cy.deleteDataSourceByName() -> cy.osd.deleteDataSourceByName()
  • cy.deleteAllDataSources() -> cy.osd.deleteAllDataSources()
  • cy.osd.openWorkspaceDashboard -> cy.openWorkspaceDashboard()

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

Copy link
Contributor

github-actions bot commented Feb 1, 2025

❌ Invalid Additional Prefix With Skip Entry Option

If your Changelog section includes the 'skip' entry option, it cannot also include other changelog entry prefixes. The option 'skip' must be alone when used. Please review your Changelog section again.

@github-actions github-actions bot added failed changeset Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry and removed failed changeset labels Feb 1, 2025
Copy link

codecov bot commented Feb 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.71%. Comparing base (0da7752) to head (f38c3e8).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9319   +/-   ##
=======================================
  Coverage   61.70%   61.71%           
=======================================
  Files        3816     3816           
  Lines       91829    91829           
  Branches    14543    14543           
=======================================
+ Hits        56666    56668    +2     
+ Misses      31507    31506    -1     
+ Partials     3656     3655    -1     
Flag Coverage Δ
Linux_1 28.99% <ø> (ø)
Linux_2 56.46% <ø> (ø)
Linux_3 39.18% <ø> (+<0.01%) ⬆️
Linux_4 28.90% <ø> (ø)
Windows_1 29.00% <ø> (ø)
Windows_2 56.41% <ø> (ø)
Windows_3 39.18% <ø> (ø)
Windows_4 28.90% <ø> (ø)

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.

@@ -266,3 +169,117 @@ Cypress.Commands.add('setRelativeTopNavDate', (time, timeUnit) => {
cy.getElementByTestId('superDatePickerRelativeDateInputUnitSelector').select(timeUnit);
cy.getElementByTestId('querySubmitButton').click();
});

Copy link
Collaborator

Choose a reason for hiding this comment

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

What exactly separates a normal command from an OSD command ? I feel we should have some criteria for segregating between the 2 commands also, if possible put them in separate files. This will help to delineate them and put forth a procedure for future contributors to adhere to .

@ananzh ananzh added discover_2.0-test Issues that are specific to the Discover 2.0 testing initiative v2.20.0 backport 2.x and removed v2.20.0 labels Feb 4, 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 seasoned-contributor Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry v2.20.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants