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

Add CITs for index management to show hidden and rollup indices and update existing tabs test to reflect all tabs #112010

Conversation

cuff-links
Copy link
Contributor

@cuff-links cuff-links commented Sep 13, 2021

Summary

This PR is to add the test coverage for showing system Indices and also for showing rollup Indices. It's a follow-up to https://github.com/elastic/kibana-team/issues/342.

Test cases being covered

  • Shows system indices
    Shows Rollup Indices (After adding a mock rollup index) (Removed after finding out that we can't load the rollups plugin to test this. Covered by Functional Test.)
  • Ensures all tabs are on home screen (Update to existing test)
  • Close Index Test

@cuff-links cuff-links added Feature:Index Management Index and index templates UI test-jest-integration v8.0.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes auto-backport Deprecated - use backport:version if exact versions are needed v7.15.1 labels Sep 13, 2021
@cuff-links cuff-links requested a review from a team as a code owner September 13, 2021 18:41
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-stack-management (Team:Stack Management)

@cuff-links cuff-links changed the title Updated tabs test to reflect all 4 tabs. Add CITs for Index Management To Show Hidden and Rollup Indices and Update Existing Test To Reflect All Tabs Sep 13, 2021
@cuff-links cuff-links changed the title Add CITs for Index Management To Show Hidden and Rollup Indices and Update Existing Test To Reflect All Tabs Add CITs for index management to show hidden and rollup indices and update existing tabs test to reflect all tabs Sep 13, 2021
@cuff-links cuff-links marked this pull request as draft September 13, 2021 20:09
@cuff-links cuff-links marked this pull request as ready for review September 17, 2021 04:27
…the context menu updating after closing the index.
@cuff-links cuff-links marked this pull request as draft September 21, 2021 18:30
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
indexManagement 525.9KB 526.1KB +117.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream


await act(async () => {
await nextTick();
component.update();
Copy link
Contributor

Choose a reason for hiding this comment

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

I think our current understanding of flaky tests is that we don't need to use nextTick() instead I think we put the setup() in an act() wrapper, similar to this:

await act(async () => {
    testBed = await setup();
});
const { component } = testBed;
component.update();

The code in Index Management is a bit older than in ILM, that is why there are still nextTcik() calls. But could you please update your new tests with this snippet?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, please please never use nextTick() anymore 👍

.childAt(1)
.childAt(0)
.find('button[data-test-subj="indexTableContextMenuButton"]')
.at(0);
Copy link
Contributor

Choose a reason for hiding this comment

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

This code looks a bit confusing, I think that's because the context buttons don't have specific data-test-subj values. I suggest add a value in this file to use in the tests.

Copy link
Contributor

@yuliacech yuliacech left a comment

Choose a reason for hiding this comment

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

Thanks a lot for working on these tests, @cuff-links!
I left 2 comments, I think the one about nextTick could be great to fix before merging and the 2nd one is non-blocking for me.

@cuff-links
Copy link
Contributor Author

This PR is closed in favor of #113692 and #114404 which address the same changes but splits them into their own PRs.

@cuff-links cuff-links closed this Oct 19, 2021
@cuff-links cuff-links deleted the Update_Index_Management_CITs_To_Use_Testbed_And_Add_Coverage branch October 19, 2021 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Index Management Index and index templates UI release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more test-jest-integration v7.15.1 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants