-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[SIEM] Improves flyout button Cypress tests time execution #54463
Conversation
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"]'; |
There was a problem hiding this comment.
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"]';
There was a problem hiding this 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. 🚀
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
…4463) * refactor * replaces 'clearTimeline' for 'createNewTimeline' Co-authored-by: Elastic Machine <[email protected]>
…4463) * refactor * replaces 'clearTimeline' for 'createNewTimeline' Co-authored-by: Elastic Machine <[email protected]>
…55009) * refactor * replaces 'clearTimeline' for 'createNewTimeline' Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
…55010) * refactor * replaces 'clearTimeline' for 'createNewTimeline' Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
…4463) * refactor * replaces 'clearTimeline' for 'createNewTimeline' Co-authored-by: Elastic Machine <[email protected]>
Summary
Improves flyout button Cypress tests time execution from 25s to 9s.