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

[SIEM] Improves flyout button Cypress tests time execution #54463

Merged
merged 4 commits into from
Jan 16, 2020

Conversation

MadameSheema
Copy link
Member

Summary

Improves flyout button Cypress tests time execution from 25s to 9s.

@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)


export const CLOSE_TIMELINE_BTN = '[data-test-subj="close-timeline"]';

export const CLOSE_PROVIDER_BADGE_BTN = '[data-test-subj="closeProviderBadge"]';
Copy link
Contributor

Choose a reason for hiding this comment

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

To verify the clearTimeline() helper is working, I added an invocation of clearTimeline() to the end of the it('renders the data provider of a host dragged from the All Hosts widget on the hosts page) test in x-pack/legacy/plugins/siem/cypress/integration/smoke_tests/timeline/data_providers.spec.ts. I observed that the data provider was not being cleared by clearTimeline(), and traced the issue to this selector, which doesn't appear to match anything.

Changing the selector to the following fixed it:

export const CLOSE_PROVIDER_BADGE_BTN = 'button[title="Remove Data Provider"]';

Copy link
Contributor

@andrew-goldstein andrew-goldstein left a comment

Choose a reason for hiding this comment

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

I ran the new clearTimeline() helper against another test (not included in this PR) and found a minor issue with the selector used to clear data providers. With the suggested fix in the comments, this PR LGTM. 🚀

@MadameSheema
Copy link
Member Author

@elasticmachine merge upstream

Copy link
Contributor

@andrew-goldstein andrew-goldstein left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@MadameSheema
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@MadameSheema MadameSheema merged commit 81a7f89 into elastic:master Jan 16, 2020
@MadameSheema MadameSheema deleted the flyout-button-refactor branch January 16, 2020 09:11
MadameSheema added a commit to MadameSheema/kibana that referenced this pull request Jan 16, 2020
…4463)

* refactor

* replaces 'clearTimeline' for 'createNewTimeline'

Co-authored-by: Elastic Machine <[email protected]>
MadameSheema added a commit to MadameSheema/kibana that referenced this pull request Jan 16, 2020
…4463)

* refactor

* replaces 'clearTimeline' for 'createNewTimeline'

Co-authored-by: Elastic Machine <[email protected]>
MadameSheema added a commit that referenced this pull request Jan 16, 2020
…55009)

* refactor

* replaces 'clearTimeline' for 'createNewTimeline'

Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
MadameSheema added a commit that referenced this pull request Jan 16, 2020
…55010)

* refactor

* replaces 'clearTimeline' for 'createNewTimeline'

Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
jkelastic pushed a commit to jkelastic/kibana that referenced this pull request Jan 17, 2020
…4463)

* refactor

* replaces 'clearTimeline' for 'createNewTimeline'

Co-authored-by: Elastic Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:SIEM v7.6.0 v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants