-
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 toggle column Cypress tests execution time #54475
[SIEM] Improves toggle column Cypress tests execution time #54475
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.
Per the discussion in #54463, this should be:
export const CLOSE_PROVIDER_BADGE_BTN = 'button[title="Remove Data Provider"]';
@@ -68,24 +73,24 @@ describe('toggle column in timeline', () => { | |||
cy.get(`[data-test-subj="timeline"] [data-test-subj="header-text-${idField}"]`).should('exist'); | |||
}); | |||
|
|||
it('adds the _id field to the timeline via drag and drop', () => { | |||
it('adds the _index field to the timeline via drag and drop', () => { |
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.
It appears this change was necessary because the _id
column, which was added in a previous test, is not cleared by clearTimeline()
, per the screenshot below:
The Fields Browser Reset Fields
button restores all default fields in the timeline, and there's an example of this feature being tested in the it('resets all fields in the timeline when Reset Fields is clicked')
test, in x-pack/legacy/plugins/siem/cypress/integration/smoke_tests/fields_browser/fields_browser.spec.ts
, but rather than adding this as an additional step in clearTimeline()
, I think a slightly more bulletproof implementation of clearTimeline()
would be to invoke the Create New Timeline
menu item shown in the screenshot below, which will reset all of the state currently cleared by clearTimeline()
, plus much more, including the column state:
Please consider replacing the implementation of clearTimeline()
to use Create New Timeline
, and reverting the changes to this test.
@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.
🙏 works great locally
LGTM
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
…4475) * refactor * replaces 'clearTimeline' for 'createNewTimeline' * fixes typecheck issue Co-authored-by: Elastic Machine <[email protected]>
…4475) * refactor * replaces 'clearTimeline' for 'createNewTimeline' * fixes typecheck issue Co-authored-by: Elastic Machine <[email protected]>
…55027) * refactor * replaces 'clearTimeline' for 'createNewTimeline' * fixes typecheck issue Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
…55028) * refactor * replaces 'clearTimeline' for 'createNewTimeline' * fixes typecheck issue Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
…4475) * refactor * replaces 'clearTimeline' for 'createNewTimeline' * fixes typecheck issue Co-authored-by: Elastic Machine <[email protected]>
Summary
Improves toggle column Cypress tests execution time from 102s to 53s.