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

Re-enable dataset_selector.spec.js and queries.spec.js under workspace #9082

Merged
merged 4 commits into from
Dec 20, 2024

Conversation

ananzh
Copy link
Member

@ananzh ananzh commented Dec 19, 2024

Description

  • dataset_selector.spec.js
2024-12-19_14-52-14.mp4
  • queries.spec.js
2024-12-19_18-59-21.mp4

Note:

const scopedHistoryNavigationError = /^[^(ScopedHistory instance has fell out of navigation scope)]/;
Cypress.on('uncaught:exception', (err) => {
  /* returning false here prevents Cypress from failing the test */
  if (scopedHistoryNavigationError.test(err.message)) {
    return false;
  }
});

is from #9047

Issues Resolved

NA

Changelog

  • test: Re-enable dataset_selector.spec.js under workspace in ciGroup10

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

@@ -5,3 +5,5 @@

export const DATASOURCE_NAME = 'query-cluster';
export const WORKSPACE_NAME = 'query-workspace';
export const START_TIME = 'Dec 31, 2020 @ 00:00:00.000';
export const END_TIME = 'Dec 31, 2022 @ 23:59:59.999';
Copy link
Contributor

Choose a reason for hiding this comment

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

could we relax these dates to not make it so close to our dataset? more convo here: #9047 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

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

good point. let me update it with other comments.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed it

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.90%. Comparing base (f85cd6d) to head (bc81125).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9082      +/-   ##
==========================================
+ Coverage   60.86%   60.90%   +0.03%     
==========================================
  Files        3808     3808              
  Lines       91175    91178       +3     
  Branches    14396    14396              
==========================================
+ Hits        55495    55531      +36     
+ Misses      32140    32094      -46     
- Partials     3540     3553      +13     
Flag Coverage Δ
Linux_1 28.99% <ø> (-0.01%) ⬇️
Linux_2 56.38% <ø> (-0.01%) ⬇️
Linux_3 38.01% <ø> (+0.06%) ⬆️
Linux_4 29.01% <ø> (-0.01%) ⬇️
Windows_1 29.00% <ø> (-0.01%) ⬇️
Windows_2 56.34% <ø> (-0.01%) ⬇️
Windows_3 38.01% <ø> (+0.06%) ⬆️
Windows_4 29.01% <ø> (-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 ananzh changed the title Re-enable dataset_selector.spec.js under workspace Re-enable dataset_selector.spec.js and queries.spec.js under workspace Dec 20, 2024
opensearch-changeset-bot bot added a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Dec 20, 2024
miscUtils.visitPage(
`app/data-explorer/discover#/?_g=(filters:!(),time:(from:'2015-09-19T13:31:44.000Z',to:'2015-09-24T01:31:44.000Z'))`
);
const miscUtils = new MiscUtils(cy);
Copy link
Collaborator

@LDrago27 LDrago27 Dec 20, 2024

Choose a reason for hiding this comment

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

Do we need the MiscUtils since we are only using this to for navigation which we can do using the cypress commands.

Copy link
Member Author

Choose a reason for hiding this comment

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

Plan to migrate MiscUtils.visitPage from lib to our cypress in a follow up

Copy link
Member Author

@ananzh ananzh Dec 20, 2024

Choose a reason for hiding this comment

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

fixed it

AMoo-Miki
AMoo-Miki previously approved these changes Dec 20, 2024
Signed-off-by: Anan <[email protected]>
opensearch-changeset-bot bot added a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Dec 20, 2024
const testFixtureHandler = new TestFixtureHandler(cy, PATHS.ENGINE);

describe.skip('dataset selector', { scrollBehavior: false }, () => {
describe('empty state', () => {
Copy link
Member

Choose a reason for hiding this comment

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

why do we delete the test for testing the empty state? i think we do need to test when there is no index pattern

Copy link
Member Author

Choose a reason for hiding this comment

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

we moved it to a_check.spec.js

cy.waitForSearch();
cy.getElementByTestId(`queryResultCompleteMsg`).should('be.visible');
cy.get('[class="euiText euiText--small"]').then((text) => cy.log(text));
cy.verifyHitCount(4);
Copy link
Member

Choose a reason for hiding this comment

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

Why do we delete verifying the hit count? If we delete verifying hit count, how are we ensuring the query is persisted across refresh?

Feel like cy.getElementByTestId(queryResultCompleteMsg).should('be.visible'); only does not provide valid proof

Copy link
Member Author

Choose a reason for hiding this comment

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

sure. I added cy.verifyHitCount('10,000');

@ananzh ananzh merged commit 66331eb into opensearch-project:main Dec 20, 2024
69 checks passed
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.

6 participants