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-116, TESTID-115, TESTID-61 - Tests for Saved Searches in Dashboard #9288

Merged
merged 7 commits into from
Jan 30, 2025

Conversation

angle943
Copy link
Collaborator

Description

Adds tests for Saved Searches in Dashboards: #8961 , #8960 , #8959

Issues Resolved

closes #8961
closes #8960
closes #8959

Changelog

  • test: add tests for saved searches in dashboards

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

codecov bot commented Jan 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.72%. Comparing base (6c83d4e) to head (3595893).
Report is 39 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9288      +/-   ##
==========================================
+ Coverage   61.70%   61.72%   +0.01%     
==========================================
  Files        3816     3816              
  Lines       91824    91824              
  Branches    14542    14542              
==========================================
+ Hits        56664    56674      +10     
+ Misses      31506    31495      -11     
- Partials     3654     3655       +1     
Flag Coverage Δ
Linux_1 28.99% <ø> (ø)
Linux_2 56.46% <ø> (ø)
Linux_3 39.18% <ø> (-0.01%) ⬇️
Linux_4 28.91% <ø> (ø)
Windows_1 29.02% <ø> (+0.01%) ⬆️
Windows_2 56.41% <ø> (ø)
Windows_3 39.18% <ø> (ø)
Windows_4 28.91% <ø> (ø)

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.

cy.getElementByTestId('docTableField').should('be.visible');

// set a date where there should be no results
setDatePickerDatesAndSearchIfRelevant(
Copy link
Collaborator

Choose a reason for hiding this comment

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

lets change to a valid time range where we have atleast some hits which is different from the expected hits in the config. That will ensure that changing time ranges actually updates the underlying search.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok sounds good. i'm a bit concerned though about timezone differences between my env and the CI/CD (or does that matter)? Lets see though, i'll push out a change that works on my end

@ananzh ananzh added discover_2.0-test Issues that are specific to the Discover 2.0 testing initiative backport 2.x v2.19.0 labels Jan 28, 2025
ananzh
ananzh previously approved these changes Jan 30, 2025
@LDrago27 LDrago27 merged commit 85e2187 into opensearch-project:main Jan 30, 2025
70 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-9288-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 85e2187c1d50e5d9214e302467033c21297ca41b
# Push it to GitHub
git push --set-upstream origin backport/backport-9288-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-9288-to-2.x.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.19 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.19 2.19
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.19
# Create a new branch
git switch --create backport/backport-9288-to-2.19
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 85e2187c1d50e5d9214e302467033c21297ca41b
# Push it to GitHub
git push --set-upstream origin backport/backport-9288-to-2.19
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.19

Then, create a pull request where the base branch is 2.19 and the compare/head branch is backport/backport-9288-to-2.19.

sumukhswamy pushed a commit to sumukhswamy/OpenSearch-Dashboards that referenced this pull request Feb 18, 2025
…oard (opensearch-project#9288)

* add tests for saved searches in dashboard: TESTID-116, TESTID-115, TESTID-61

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

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

* update test case to change date to where we have some results

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

* add to ci group 12

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>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 19, 2025
…oard (#9288)

* add tests for saved searches in dashboard: TESTID-116, TESTID-115, TESTID-61

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

* Changeset file for PR #9288 created/updated

* update test case to change date to where we have some results

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

* add to ci group 12

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>
(cherry picked from commit 85e2187)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
sejli pushed a commit that referenced this pull request Feb 19, 2025
…oard (#9288) (#9419)

* add tests for saved searches in dashboard: TESTID-116, TESTID-115, TESTID-61



* Changeset file for PR #9288 created/updated

* update test case to change date to where we have some results



* add to ci group 12



---------



(cherry picked from commit 85e2187)

Signed-off-by: Justin Kim <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
ananzh pushed a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Feb 20, 2025
…oard (opensearch-project#9288) (opensearch-project#9419)

* add tests for saved searches in dashboard: TESTID-116, TESTID-115, TESTID-61



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

* update test case to change date to where we have some results



* add to ci group 12



---------



(cherry picked from commit 85e2187)

Signed-off-by: Justin Kim <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants